1 Reply Latest reply on Apr 27, 2012 9:51 PM by mar10

    ClassNotFoundException for messageListenerInterface class of a connector

    mar10

      Hi,

       

      I am trying to port an application to JBoss 7.1.1-final. Everything runs fine on Sailfin.

      I have a problem with a MDB that acts as messagelistener for  a connector (jca 1.5 compliant).

      I get a ClassNotFoundException because the messageLlistenerInterface class can not be found.

      I do not know how to solve this problem. Reading other threads didn't help of the JBoss documentation.

      Suggestions are welcome.

       

      Before is information on the exception, Java class and the connector.

       

      Caused by: java.lang.ClassNotFoundException: com.ericsson.ngin.session.api.Service from [Module "deployment.TestEjb1.jar:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

              at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.handleAnnotations(TransactionAttributeMergingProcessor.java:79)

              ... 8 more

       

      My MDB looks like this.

       

      @MessageDriven(name = "TestService",

          messageListenerInterface = Service.class,

          activationConfig = { @ActivationConfigProperty (

              propertyName = "serviceName",

              propertyValue = "com.ericsson.testear.testejb1.TestService")

          })

      @ResourceAdapter("SessionRA.rar")

      public class SessionMDB {

      }

       

      I have deployed & enabled my rar. JBoss doesn't report any problems, so I guess that must be ok.

      I have updated the standalone.xml to add properties of the connector. This looks like this.

          <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
              <resource-adapters>
                  <resource-adapter>
                      <archive>
                          SessionRA.rar
                      </archive>
                      <transaction-support>NoTransaction</transaction-support>
                      <connection-definitions>
                          <connection-definition class-name="com.ericsson.ngin.session.ra.boilerplate.ManagedConnectionFactoryImpl" jndi-name="java:/jca/SessionConnectionFactory" use-java-context="true" pool-name="SessionConnectionFactory" use-ccm="true"/>
                      </connection-definitions>
                  </resource-adapter>
              </resource-adapters>
          </subsystem>

       

      /Martien

        • 1. Re: ClassNotFoundException for messageListenerInterface class of a connector
          mar10

          A collegue suggested to include the com.ericsson.ngin.session.api.Service in the EAR containing the EJB. That is how he solved this problem on Occas.

          The ClassNotFoundException disappeared. I got a new exception in return.

          Somehow JBoss links my EJB to the HornetQ, even though I used the annotation

          @ResourceAdapter("SessionRA.rar"). Strange.

           

          I also found an connector related exception, so I posted a new discussion:

          https://community.jboss.org/message/732791#732791

           

          18:45:35,485 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "TestEar-1.0-SNAPSHOT.ear"

          18:45:35,599 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "TestEjb1.jar"

          18:45:36,249 INFO  [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment "TestEar-1.0-SNAPSHOT.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"TestEar-1.0-SNAPSHOT.ear\".\"TestEjb1.jar\".component.TestService.CREATEjboss.ra.HornetQMissing[jboss.deployment.subunit.\"TestEar-1.0-SNAPSHOT.ear\".\"TestEjb1.jar\".component.TestService.CREATEjboss.ra.HornetQ]"]}

          18:45:36,289 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment TestEjb1.jar in 38ms

          18:45:36,302 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment TestEar-1.0-SNAPSHOT.ear in 52ms

          18:45:36,307 INFO  [org.jboss.as.controller] (HttpManagementService-threads - 1) JBAS014774: Service status report

          JBAS014775:    New missing/unsatisfied dependencies:

                service jboss.ra.HornetQ (missing) dependents: [service jboss.deployment.subunit."TestEar-1.0-SNAPSHOT.ear"."TestEjb1.jar".component.TestService.CREATE]