1 Reply Latest reply on Nov 8, 2011 8:03 AM by Wolf-Dieter Fink

    Using deployed resource adapter or other classes

    Jens Mander Newbie



      I implemented an resource adapter for filesystem access and deployed it the JBoss AS6. All works perfect so now I'd like to migrate it to AS7. It was not just copying the files to standalone/deployment but I guess I finally managed it. The adapter is registered in JNDI and console output as well as the management interface are looking good. Now my application has a dependency to that adapter as follows:




      I am injecting the factory like that:


      @Resource(mappedName = "java:/filesystem")
      FsConnectionFactory fsConnFactory;


      Unfortunately I can't deploy the application due to a java.lang.ClassNotFoundException. The complete log looks like that:


      Caused by: java.lang.ClassNotFoundException: de.hd.frog.txfs.FsConnectionFactory from [Module "deployment.CAT-ear.ear.Duck-impl.jar:main" from Service Module Loader]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
              ... 16 more


      For JBoss AS6 I guess there was no need to specify that the adapter is deployed and so so classloader could find it. Due to the massiv changes in AS7 in terms of classloading it now probably is?

      May anybody tell me how to set up this dependency? Is there a way to specify that my frog.rar is available to all other deployment units or that my application needs the deployed frog.rar?

      I hope someone may give me some piece of advise how to manage it. Thanks a lot.


      Best regards