3 Replies Latest reply on Nov 9, 2015 1:07 AM by armahdi

    loginmodule cannot see deployed resource adapter

    armahdi

      This is a similar problem to JCA and Class Loading on WildFly 8.2.0/9.0.0CR2 which I also stated at java - Wildfly Class Loading issue with jca resourceadapter - Stack Overflow

      But this time i am using a loginmodule jar that was custom created. Its a small module with a class that uses MyConnectorSpec class which comes form the MyConnector.jar that is embedded inside the mycommunicatorappConnector.rar resourceadapter which i deploy by placing it in the deployments folder.

       

      My login module is a jar that I have placed as a module under WFHOME/modules/com/mycomp/security/auth/spi/main/ With a module.xml

      version1:

      <module xmlns="urn:jboss:module:1.1" name="com.mycomp.security.auth.spi">
      <resources>
          <resource-root path="LoginModules-1.18.jar"/>
        </resources>
      
      
                <dependencies>
                  <module name="mycommunicatorappConnector-1.2.0.rar"/> <!--adding deployment. infront never works for me as suggested in some sites-->
                  <module name="org.picketbox"/>
                  <module name="javax.api"/>
        <module name="javax.jms.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.resource.api"/>
        <module name="com.progress.open4gl"/>
        <module name="org.apache.log4j"/> 
                  <module name="org.picketlink" />
                  <module name="org.picketlink.core"/>
                  <!--
        <module name="com.mycommunicatorapp.progressra"/>
        <module name="org.picketlink.core" meta-inf="import" annotations="true"/>
        <module name="org.picketlink.core.api" meta-inf="import" annotations="true"/>
        <module name="org.picketlink.idm" meta-inf="import" annotations="true"/>
        <module name="org.picketlink.idm.api" meta-inf="import" annotations="true"/>-->
           </dependencies>
      </module>
      

       

      Then I deployed a webservice that uses a security domain, this is where the login module is referenced:

      <security-domain name="remoteappws" cache-type="default">
                          <authentication>
                              <login-module code="com.mycomp.security.auth.spi.StarbaseLoginModule" flag="required" module="com.mycomp.security.auth.spi">
                                  <module-option name="dsJndiName" value="java:/eis/remoteApp"/>
                              </login-module>
                          </authentication>
                      </security-domain>
      

      upon retreiving my wsdl

       

      by localhost:8080/remoteApp/remote.wsdl

       

      the login module is triggered, and asks for username password. the user name and password is read and then the loginmodule tries to connect to the mycommunictaorApp using a class mycommunicatorappConnector-1.2.0.jar in the mycommunicatorappConnector-1.2.0.rar.

      If i use the version1 i get

      Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main

       

      17:09:12,287 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /shares/shares.wsdl: java.lang.RuntimeException: java.lang.RuntimeException: WFLYSEC0007: Runtime Exce

      ption:

              at org.wildfly.extension.undertow.security.JAASIdentityManagerImpl.verifyCredential(JAASIdentityManagerImpl.java:140)

              at org.wildfly.extension.undertow.security.JAASIdentityManagerImpl.verify(JAASIdentityManagerImpl.java:94)

              at io.undertow.security.impl.BasicAuthenticationMechanism.authenticate(BasicAuthenticationMechanism.java:118)

              at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:233)

              at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:250)

              at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.access$100(SecurityContextImpl.java:219)

              at io.undertow.security.impl.SecurityContextImpl.attemptAuthentication(SecurityContextImpl.java:121)

              at io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:96)

              at io.undertow.security.impl.SecurityContextImpl.authenticate(SecurityContextImpl.java:89)

              at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:55)

              at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

              at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)

              at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

              at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

              at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)

              at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

              at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)

              at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)

              at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

              at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

              at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)

              at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)

              at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

              at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)

              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:198)

              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:788)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.RuntimeException: WFLYSEC0007: Runtime Exception:

              at org.jboss.as.security.plugins.ModuleClassLoaderLocator.get(ModuleClassLoaderLocator.java:62)

              at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:317)

              at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:146)

              at org.wildfly.extension.undertow.security.JAASIdentityManagerImpl.verifyCredential(JAASIdentityManagerImpl.java:123)

              ... 32 more

      Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main

              at org.jboss.modules.Module.addPaths(Module.java:1042)

              at org.jboss.modules.Module.link(Module.java:1398)

              at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)

              at org.jboss.as.security.plugins.SecurityActions.getModuleClassLoader(SecurityActions.java:48)

              at org.jboss.as.security.plugins.ModuleClassLoaderLocator.get(ModuleClassLoaderLocator.java:53)

              ... 35 more

       

      if i use the version2:

       

      Another module.xml version2 that I used

      <module xmlns="urn:jboss:module:1.1" name="com.mycomp.security.auth.spi">
        <resources>
          <resource-root path="LoginModules-1.18.jar"/>
        </resources>
      
      
                <dependencies>
                  <module name="com.mycommunicatorapp.progressra"/> <!-- this is a jar that is also present inside the 
                  <module name="org.picketbox"/>
                  <module name="javax.api"/>
             <module name="javax.jms.api"/>
             <module name="javax.transaction.api"/>
             <module name="javax.resource.api"/>
             <module name="com.mycommunicatorapp.open4gl"/>
             <module name="org.apache.log4j"/> 
                  <module name="org.picketlink" />
                  <module name="org.picketlink.core"/>
                  <!--<module name="org.picketlink.core" meta-inf="import" annotations="true"/>
        <module name="org.picketlink.core.api" meta-inf="import" annotations="true"/>
        <module name="org.picketlink.idm" meta-inf="import" annotations="true"/>
        <module name="org.picketlink.idm.api" meta-inf="import" annotations="true"/>-->
           </dependencies>
      </module
      


      i get

      javax.security.auth.login.LoginException: com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec cannot be cast to com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec

         at com.mycomp.security.auth.spi.StarbaseLoginModule.login(StarbaseLoginModule.java:161)

         at com.mycomp.security.auth.spi.StarbaseLoginModule.login(StarbaseLoginModule.java:102)

         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       

       

      If i run everything with -verbose:class -verbose:gc with version2 of the module.xml to explain everything it shows me this

       

      [Loaded javax.naming.LinkRef from C:\Program Files\Java\jdk1.8.0_66\jre\lib\rt.jar]

      16:59:00,897 INFO  [com.mycomp.security.auth.spi.StarbaseLoginModule] (default task-2) factory created

      16:59:00,898 INFO  [com.mycomp.security.auth.spi.StarbaseLoginModule] (default task-2) MyCommunicatorAppConnectionSpec creating

      [Loaded com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec from jar:file:/C:/JAVA/WF9/wildfly-10.0.0.CR4/wildfly-10.0.0.CR4/modules/com/mycommunicatorapp/progressra/main/mycommunicatorappConnector-1.2.0.jar!/] 

      16:59:00,902 INFO  [com.mycomp.security.auth.spi.StarbaseLoginModule] (default task-2) MyCommunicatorAppConnectionSpec created  // this is using the JAR that I supplied externally

      [Loaded com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec from vfs:/C:/JAVA/WF9/wildfly-10.0.0.CR4/wildfly-10.0.0.CR4/bin/content/mycommunicatorappConnector-1.2.0.rar/mycommunicatorappConnector-1.2.0.jar]

      16:59:00,903 INFO  [com.mycomp.security.auth.spi.StarbaseLoginModule] (default task-2) login : Username Password excom.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec cannot be cast to com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec

      [Loaded java.lang.Throwable$PrintStreamOrWriter from C:\Program Files\Java\jdk1.8.0_66\jre\lib\rt.jar]

      [Loaded java.lang.Throwable$WrappedPrintStream from C:\Program Files\Java\jdk1.8.0_66\jre\lib\rt.jar]

      16:59:00,907 ERROR [stderr] (default task-2) java.lang.ClassCastException: com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec cannot be cast to com.mycomp.mycommunicatorapp.MyCommunicatorAppConnectionSpec

       

       

       

      What I understand is:

      the login module was compiled with a jar inside the resourceadapter, If i can make the first version1 of module.xml work i think it should work but that doesnt. and in order to solve (workaround ) that issue i reference a jar externally which makes it load it twice once from inside the rar and once from the jar established in the modules directory in WF.

       

      Also, i have tried this in WF9 and WF10.0.0CR4

       

      With the link above with same issue but in an ear, this issue is from a jars perspective. Somehow I have some War projects that work fine. and they use the same strategy as in module.xml version1 and it doesnot complain.

       

      I will really appreciate some insight.What am i missing or doing wrongly.

       

      Thanks

      Syed

       

      P.S : how do i know if this is a classloading issue. Is there a way to know which classloader loaded which class it just said Loaded but doesn't specify which classloader?

        • 1. Re: loginmodule cannot see deployed resource adapter
          armahdi

          I am still working this problem out and havent really made any headway still.

          One thing that I see that is a big red flag for me is that on the page : https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly

          it says:

           

          Deployment Module Names

          Module names for top level deployments follow the format deployment.myarchive.war while sub deployments are named like deployment.myear.ear.mywar.war.

          This means that it is possible for a deployment to import classes from another deployment using the other deployments module name, the details of how to add an explicit module dependency are explained below.

           

           

          According to the statement above it means that when I have   <module name="deployment.mycommunicatorappConnector-1.2.0.rar"/>  in my jboss-deployment-structure.xml then it should pick it up. I have seen however that if i put deployment.myrar name it usually gives exception that ModuleNotFoundException even though it just says some lines before that it wsa deployed with the runtime name  mycommunicatorappConnector-1.2.0.rar

          Caused by: org.jboss.modules.ModuleNotFoundException: mycommunicatorappConnector-1.2.0.rar:main

          Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main


          I have added a jboss-deployment-structure.xml in META-INF folder inside the Jar and as well as a similar file as a module.xml file.

          I am pretty much stuck at this point.


          Any help would be appreciated.

          Thanks

          • 2. Re: loginmodule cannot see deployed resource adapter
            armahdi

            I tried a few things today. and they didnt work. (P.S i am on WF 9 currently but have tried the same on WF10)

            the idea is that I need to get deployment.mycommunicatorappConnector-1.2.0.rar to be referenced for the mycommunicatorappConnector-1.2.0.jar that it contains . Somehow the rar gets deployed but i cannot refer to it as a library..

             

            So what i did next was to make the rar as a global module (so i tried adding the deployment

            <global-modules>  
             <module name="deployment.mycommunicatorappConnector-1.2.0.rar"/>         
              </global-modules>
            


            It did not work. I need this to work as I know this is the actual issue If i can make this rar as global i think most of the issues are going to be solved. I dont know why the deployed RAR is not taken as a global module. .

             

            17:08:03,479 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "MyWebServicesAd-1.3-SNAPSHOT.war" (runtime-name: "MyWebServicesAd-1.

            3-SNAPSHOT.war")

            17:08:03,479 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "mycommunicatorappConnector-1.2.0.rar" (runtime-name: "mycommunicatorappConnector-1.2.0.rar")

            17:08:03,630 INFO  [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Final

            17:08:03,863 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry messages.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/mycommunicatorappConnector-1.2.0.rar/mess

            ages-10.2b07.jar  does not point to a valid jar for a Class-Path reference.

            17:08:03,864 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry schema.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/mycommunicatorappConnector-1.2.0.rar/messag

            es-10.2b07.jar  does not point to a valid jar for a Class-Path reference.

            17:08:04,066 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.module.service."deployment.mycommunicatorappConnector-1.2.0.rar".main: org.jboss.msc.service.St

            artException in service jboss.module.service."deployment.mycommunicatorappConnector-1.2.0.rar".main: WFLYSRV0179: Failed to load module: deployment.mycommunicatorappConnector-1.2.0.rar:main

                    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    at java.lang.Thread.run(Thread.java:745)

            Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main

                    at org.jboss.modules.Module.addPaths(Module.java:1042)

                    at org.jboss.modules.Module.link(Module.java:1398)

                    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)

                    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)

                    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)

                    ... 5 more

             

             

            17:08:04,746 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0059: Class Path entry messages.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/MyWebServicesAd-1.3-SNA

            PSHOT.war/WEB-INF/lib/messages-10.2b07.jar  does not point to a valid jar for a Class-Path reference.

            17:08:04,747 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0059: Class Path entry schema.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/MyWebServicesAd-1.3-SNAPS

            HOT.war/WEB-INF/lib/messages-10.2b07.jar  does not point to a valid jar for a Class-Path reference.

            17:08:04,876 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.module.service."deployment.MyWebServicesAd-1.3-SNAPSHOT.war".main: org.jboss.

            msc.service.StartException in service jboss.module.service."deployment.MyWebServicesAd-1.3-SNAPSHOT.war".main: WFLYSRV0179: Failed to load module: deployment.MyWebServicesAd-1.3-SNAP

            SHOT.war:main

                    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    at java.lang.Thread.run(Thread.java:745)

            Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main

                    at org.jboss.modules.Module.addPaths(Module.java:1042)

                    at org.jboss.modules.Module.link(Module.java:1398)

                    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)

                    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)

                    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)

                    ... 5 more

             

            17:08:04,885 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "mycommunicatorappConnector-1.2.0.rar")]) - failur

            e description: {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.mycommunicatorappConnector-1.2.0.rar\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"dep

            loyment.mycommunicatorappConnector-1.2.0.rar\".main: WFLYSRV0179: Failed to load module: deployment.mycommunicatorappConnector-1.2.0.rar:main

                Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar.rar:main"}}

            17:08:04,888 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "MyWebServicesAd-1.3-SNAPSHOT.wa

            r")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.MyWebServicesAd-1.3-SNAPSHOT.war\".main" => "org.jboss.msc.service.StartException in servic

            e jboss.module.service.\"deployment.MyWebServicesAd-1.3-SNAPSHOT.war\".main: WFLYSRV0179: Failed to load module: deployment.MyWebServicesAd-1.3-SNAPSHOT.war:main

                Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main"}}

            17:08:04,955 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "MyWebServicesAd-1.3-SNAPSHOT.war" (runtime-name : "MyWebServicesAd-1.3-SNAPSHOT.war")

            17:08:04,958 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "mycommunicatorappConnector-1.2.0.rar" (runtime-name : "mycommunicatorappConnector-1.2.0.rar")

             

             

             

            So next I made a module like Re: Confused by Help - How does one create a global module? and craeated a folder structure for the rar file itself:

            <global-modules>

                            <module name="javax.resource.api"/>

                        <module name="org.jboss.progressrar"/>

                

                        </global-modules>

            it gave me this below error. I have seen that these two methods are already implemented but it still says that they need to be implemented.

             

             

            17:00:56,156 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0059: Class Path entry schema.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/mycommunicatorappConnector-1.2.0.rar/messag

            es-10.2b07.jar  does not point to a valid jar for a Class-Path reference.

            17:00:56,493 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 58) MSC000001: Failed to start service jboss.ra.deployer."mycommunicatorappConnector-1.2.0.rar": org.jboss.msc.service.StartExcepti

            on in service jboss.ra.deployer."mycommunicatorappConnector-1.2.0.rar": WFLYJCA0046: Failed to start RA deployment [mycommunicatorappConnector-1.2.0.rar]

                    at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$1.run(ResourceAdapterDeploymentService.java:155)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    at java.lang.Thread.run(Thread.java:745)

                    at org.jboss.threads.JBossThread.run(JBossThread.java:320)

            Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/C:/JAVA/WF9/wildfly-9.0.0.Final/standalone/tmp/vfs/temp/temp2ecb94579039da5c/content-d474ef935372f240/cont

            ents/

                    at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2004)

                    at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:207)

                    at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:116)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                    at java.lang.Thread.run(Thread.java:745)

            Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR

            Section: 6.5.3.2

            Description: A ManagedConnectionFactory must implement a "public boolean equals(Object)" method.

            Code: com.mycomp.progress.ProgressManagedConnectionFactory

             

             

            Severity: ERROR

            Section: 6.5.3.2

            Description: A ManagedConnectionFactory must implement a "public int hashCode()" method.

            Code: com.mycomp.progress.ProgressManagedConnectionFactory

                    ... 8 more

            • 3. Re: loginmodule cannot see deployed resource adapter
              armahdi

              I solved this issue. And the solution is quite interesting. the custom login module was a jar and used the jar from the RAR resource adapter. I had seen in my wars which were in a similar scenario they never had any issue. the reason was that I had supplied a jboss-deployment-structure.xml in the WEB-INF.

               

              first I tried to make a jboss-deployment-structure.xml in the jar and made it as a module. It did not work. So i did exactly what I would do with a war. I dropped the jar into the deployments directory. That was it.

               

              For completeness,

              I made the dependent jars as global modules as they are used in the resourceAdapter RAR as well as other modules/applications that use the RAR's jar to define connections through the RAR.

               

              Question: if some from Jboss can answer this, dropping the jar in the deployments directory should be pretty much the same as making a module in the $WF_HOME/module/ directory and making that module as a global module. Why is it that dropping in the deployments directory gives a total different behaviour. Is the classloader that does the deployment a singleton and is different from the classloader that loads the modules.