14 Replies Latest reply on Jun 29, 2009 12:53 PM by Adriano Taves

    Is this JBoss or an iBatis issue?  Classpath issues...

    Alexander Sack Novice

      Alright, I'm using 404CR2 with EAR isolation on. I have the following EAR:

      my.ear
      META-INF/application.xml
      my.jar
      lib/ibatis-common-2.jar
      lib/ibatis-sqlmap-2.jar
      lib/ibatis-dao-2.jar

      my.jar
      META-INF/MANIFEST.MF
      com/blah/blah/conifg/sql-map-config.xml

      The my.jar MANIFEST.MF file has Class-Path entries for lib/ibatis-*.jar entries, etc. The my.jar is full of EJB3 beans.

      When I deploy the EAR with 404CR2, iBatis claims it can't find com/blah/blah/config/sql-map-config.xml using getReaderResource() which is suppose to look for the file within the current runninng thread's classpath. Looking at the source, it uses getClass().getLoader() to load the file as well as its own default classloader (Thread.currentThread().getCointextClassLoader()). Why isn't the mu.jar file in the current classpath during runtime?

      If I grab the parent classloader, its visible but now another class in ane xternal JAR file shared across EARs is no longer visible during iBatis configuration (there is a typeHandler class that is used in a common library).

      It seems to me that no matter what, my.jar should be visible at runtime without playing with the context classloader. Help!