0 Replies Latest reply on Feb 3, 2014 4:05 AM by Nicky Mølholm

    Class visibility problems from HornetQ authentication using a custom loginmodule

    Nicky Mølholm Newbie

      Using: JBoss 7.2

      With: EAR containing a login module (inside an embedded EJB jar)

       

       

      Login module authentication works with:

      • Web authentication (jax-ws fx)
      • A few (ahem) unmanaged threads from within the EAR file

       

      However this does NOT work:

      • Authentication from a JMS client

       

      Caused by:

      09:15:25,898 DEBUG [org.jboss.security] (Old I/O server worker (parentId: 2047027234, [id: 0x7a032822, /127.0.0.1:5445])) PBOX000206: Login failure: javax.security.auth.login.LoginException: unable to find LoginModule class: com.apc.security.HelloWorldLoginModule from [Module "org.jboss.as.messaging:main" from local module loader @3df78040 (finder: local module finder @44050988 (roots: /Users/nickymolholm/Work/JBoss7/jboss-as/modules,/Users/nickymolholm/Work/JBoss7/jboss-as/modules/system/layers/base))]

       

      So basically the module cannot see the login module inside the EAR file. That makes sense I guess (...).

       

      My question is:

      • Do I really have to put my login module classes inside a JBoss module - and then define a dependency to it inside the module.xml file belonging to org.jboss.as.messaging ?
        • I know for sure that this approach works (since I have tried it).
        • But something tells me that it shouldn’t be necessary to edit the module dependencies for a provided JBoss module
      • I tried specifying a dependency to the module.myear.ear.myejb.jar JAR file (inside the org.jboss.as.messaging module.xml file). But that didn’t work (seems like that type of dependencies isn't supported).