Skip to main content

Custom Realm not found

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
rschumeyer
Offline
Joined: 2014-05-06

I am trying to follow the procedure to create a custom realm outlined in the Application Development Guide, p. 4-6, "Creating a Custom Realm".

I created a loginModule that extends com.sun.appserv.security.AppservPasswordLoginModule.

I created a realm the extends com.sun.appserv.security.AppservRealm.

I compile to a jar, and placed the jar in glassfish4\glassfish\domains\domain1\lib.

I added this to \glassfish4\glassfish\domains\domain1\config\login.conf:

myRealm {
com.example.LoginModule required;
};

I added to \glassfish4\glassfish\domains\domain1\config\domain.xml:

And I added a section in web.xml to use myRealm.

It looks like the myRealm class is found (I can tell that the constructor runs).

However, it seems that the login module is not found. I get this warning:

WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Invalid null input: name

I'm not sure what I'm missing here.