4 Replies Latest reply on May 11, 2011 2:29 AM by Ales Justin

    JBoss class loader ignore a letter case in the class file name

    Myryan Dzhachvadze Newbie

      Hi.

       

      I have one problem after migration from jboss 5 to 6 version. Our project use the Aspose product. Their jars contains obfuscated classes.

      So, there is a lot of classes like aa.class and Aa.class. When I try to deploy app under jboss 6 I've got the exception:

       

      14:47:29,520 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/defgo]] Exception sending context initialized event to listener instance of class net.defgo.StartupContextListener: java.lang.NoClassDefFoundError: com/aspose/cells/bc (wrong name: com/aspose/cells/bC)

              at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]

              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]

              at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]

              at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.GA]

              at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_24]

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.GA]

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.GA]

              at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_24]

              at com.aspose.cells.License.a(Unknown Source) [:]

              at com.aspose.cells.License.setLicense(Unknown Source) [:]

              at net.defgo.StartupContextListener.loadAsposeCellsLicense(StartupContextListener.java:224) [:]

       

      By my test, it seems that JBoss6 cannot recognize different classes that with same characters in different case. For test I built two simple classes named as "Aa.java" and "AA.java", please see attached t.jar. When call their getMsg() method in standalone application or in JSP files with other application servers such as tomcat, both classes work fine. But with JBoss6, I got the exception.

       

      Could you please tell me how can I solve this issue?