users@glassfish.java.net

Custom Realms and Classpath

From: <glassfish_at_javadesktop.org>
Date: Wed, 04 Mar 2009 20:12:45 PST

Hi,

I followed the steps at http://blogs.sun.com/pblaha/entry/develop_custom_realm_in_netbeans but instead of using their lib directory (which does not work) I placed my jar file in /glassfish/domains/domain1/lib/ext instead. Unfortunately I now get:

java.lang.ClassNotFoundException: com.sun.appserv.security.AppservRealm

I don't want to have to copy my jar file into /glassfish/lib because I will then have to copy the JDBC driver jar as well as any other dependencies into the global classpath. I tried copying appserv-rt.jar into /glassfish/domains/domain1/lib/ext but it then complained about yet another missing dependency. I don't want to copy all of /glassfish/lib into my domain-specific lib.

How can I configure a custom realm such that the realm JAR is in the domain-specific lib directory and the glassfish libraries remain in the global lib directory?

Thank you,
Gili
[Message sent by forum member 'cowwoc' (cowwoc)]

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