Deploying Drools Guvnor – javax.security.auth.login.LoginException: unable to find LoginModule

I was doing another new deployment of Drools Guvnor on Apache Tomcat 6.0.20 today on a co-worker’s machine.  Once again, I received the Security Exception for unable to locate a login configuration.  I was able to quickly fix that error.  But then I received this error:

INFO  20-06 11:35:50,343 (SecurityServiceImpl.java:login:75)      Logging in user \[drools1\]
ERROR 20-06 11:35:50,345 (SecurityServiceImpl.java:login:95)      Unable to login.
javax.security.auth.login.LoginException: unable to find LoginModule class: com.sun.security.auth.module.LdapLoginModule
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
    at org.jboss.seam.security.Identity.authenticate(Identity.java:335)
    at org.jboss.seam.security.Identity.authenticate(Identity.java:324)
    at org.drools.guvnor.server.security.SecurityServiceImpl.login(SecurityServiceImpl.java:93)
    at org.drools.guvnor.server.SecurityServiceServlet.login(SecurityServiceServlet.java:73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)

After a little bit of trial and error, I finally remembered to check the JAVA_HOME environment variable.  It was set to a Java 5 JRE.  I switched the JAVA_HOME to be a Java 6 JRE and restarted Tomcat.  The error was fixed then.

Advertisements

About stevewall123

I am a Lead Software Engineer in Minneapolis working for Thomson Reuters. I am currently working on projects using Java, JavaScript, Spring, Drools, Hazelcast, Liquibase and Tomcat. Previously, I used C#, GWT, Grails, Groovy, JMS and JBoss Drools Guvnor. In the past I have worked on projects using J2EE, Swing, Webwork, Hibernate, Spring, Spring-WS, JMS, JUnit and Ant.
This entry was posted in Drools Guvnor and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s