1 Reply Latest reply: Sep 11, 2012 5:59 AM by Pëtr Andreev RSS

    Resource Adapter ClassNotFoundException

    Marco Porta Newbie

      Hi all,

      under JBoss7.1.1 I deployed a rar resource adapter and configured it in standalone.xml as follows:

       

       

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
                  <resource-adapters>
                      <resource-adapter>
                          <archive>
                              eis.rar
                          </archive>
                          <transaction-support>NoTransaction</transaction-support>
                          <config-property name="ConnectionURL">
                              OMITTED
                          </config-property>
                          <config-property name="ServerName">
                              OMITTED
                          </config-property>
                          <config-property name="PortNumber">
                              OMITTED
                          </config-property>
                          <connection-definitions>
                              <connection-definition class-name="com.ibm.connector2.cics.ECIManagedConnectionFactory" jndi-name="java:/eis/cics_ag" pool-name="CTGConnectionFactory">
                                  <pool>
                                      <min-pool-size>10</min-pool-size>
                                      <max-pool-size>100</max-pool-size>
                                  </pool>
                                  <security>
                                      <application/>
                                  </security>
                              </connection-definition>
                          </connection-definitions>
                      </resource-adapter>
                  </resource-adapters>
              </subsystem>
      
      

       

      Then I deployed a war application that makes a llokup of the jndi defined above. The lookup wento fine, but i receive a ClassNotFoundException since ECIConnectionFactory  (contained in a jar inside the rar) is not visibile to war

       

       

      java.lang.ClassNotFoundException: com.ibm.connector2.cics.ECIConnectionFactory from [Module "deployment.xxx.war:main" from Service Module Loader]
      

       

      How can I make the class visible to my war?

       

      Thanks for your help!

       

      Marco

        • 1. Re: Resource Adapter ClassNotFoundException
          Pëtr Andreev Newbie

          try to declare the dependency on RA in your WAR, i.e.

           

          WEB-INF/jboss-deployment-structure.xml:

           

           

          <?xml version="1.0"?>

           

          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

              <deployment>

                  <dependencies>

                      <module name="deployment.eis.rar"/>

                  </dependencies>

              </deployment>

          </jboss-deployment-structure>