users@glassfish.java.net

Re: ProgrammaticLogin

From: <glassfish_at_javadesktop.org>
Date: Mon, 04 Jan 2010 12:33:17 PST

Hi,

In Glassfish v3, client libraries have been split in small JARs, and as "nasradu8" has already said, you only need to reference "gf-client.jar" in the classpath, because it contains the needed "Class-Path:" references in "META-INF/MANIFEST" to the required JARs (relative paths from glassfish v3 server installation, or application client container libraries extracted from "$GF_HOME/glassfish/lib/appclient.jar", that can be generated with "$GF_HOME/glassfish/bin/package-appclient" command).

You don't need to include the "security.jar" explicitly in the classpath (because it is also referenced from "gf-client.jar"), but this library alone, can be useful to edit/compile applications that use "ProgrammaticLogic" class (i.e: code completion assistance with NetBeans).

I don't speak deutch, but I think the exception "Programmatic login failed: java.lang.SecurityException: Anmeldekonfiguration kann nicht gefunden werden." means that it has been "Unable to locate a login configuration". You can get the client exception messages in english with the jvm arg "-Duser.language=en".
Maybe, have you mistyped the jvm arg "-Djava.security.auth.login.config=<path>/appclientlogin.conf"?
If you run unit/ integration test from an IDE, try to force the system property in the source of the tests with this code:
[code]
System.setProperty("java.security.auth.login.config", "<path>/appclientlogin.conf");
[/code]

Finally, from the error message of Glassfish (server side), I think the problem is probably due to JDBC realm configuration settings (wrong table/field names, digest algorithm, JNDI name of the JDBC datasource, ...), or incorrect JDBC connection pool settings (user/password, security mechanism, ...).
This thread talks about a similar problem (but with Glassfish v2):
http://forums.java.net/jive/thread.jspa?messageID=213773


Good luck.
[Message sent by forum member 'jmarine' (jmarine_at_tinet.org)]

http://forums.java.net/jive/thread.jspa?messageID=378674