4 Replies Latest reply on Oct 27, 2009 12:59 AM by Mark Wen

    Deployment of Richfaces + Spring 2.5 Project  to JBoss 5

    Mark Wen Newbie

      Hi Everyone,

      I have problem with deploying my Richfaces 3.3.0 + Spring 2.5 + Hibernate 3.2 project to JBoss AS 5.0. The project has the following jar files in the web-inf/lib folder:

      acegi-jsf-1.1.3.jar
      activation-1.1.jar
      antlr-2.7.6.jar
      aopalliance-1.0.jar
      asm-1.5.3.jar
      asm-attrs-1.5.3.jar
      aspectjrt-1.6.0.jar
      aspectjweaver-1.6.0.jar
      avalon-framework-4.2.0.jar
      backport-util-concurrent-3.1.jar
      batik-all-1.7.jar
      bsh-2.0b4.jar
      cglib-2.1_3.jar
      commons-beanutils-1.7.0.jar
      commons-codec-1.3.jar
      commons-collections-3.2.jar
      commons-dbcp-1.2.1.jar
      commons-digester-1.8.1.jar
      commons-discovery-0.4.jar
      commons-el-1.0.jar
      commons-fileupload-1.2.1.jar
      commons-httpclient-3.0.jar
      commons-io-1.3.1.jar
      commons-lang-2.3.jar
      commons-logging-1.0.4.jar
      commons-pool-1.2.jar
      commons-validator-1.3.0.jar
      corejsf-validator-1.0.jar
      darkX-3.3.0.GA.jar
      displaytag-1.1.1.jar
      dom4j-1.6.1.jar
      dwr-2.0.1.jar
      ehcache-1.4.1.jar
      ejb3-persistence-1.0.1.GA.jar
      fop.jar
      freemarker-2.3.8.jar
      glassX-3.3.0.GA.jar
      hamcrest-core-1.1.jar
      hamcrest-library-1.1.jar
      hibernate-3.2.6.ga.jar
      hibernate-annotations-3.3.1.GA.jar
      hibernate-commons-annotations-3.0.0.ga.jar
      hibernate-core-3.3.0.CR1.jar
      hibernate-tools-3.2.0.ga.jar
      hibernate-validator-3.1.0.CR1.jar
      iText-2.1.0.jar
      jasperreports-3.1.4.jar
      jcommon-1.0.0.jar
      jfreechart-1.0.12.jar
      jhighlight-1.0.jar
      jmock-2.4.0.jar
      jmock-junit4-2.4.0.jar
      jsf-api-1.2_12.jar
      jsf-facelets-1.1.15.B1.jar
      jsf-impl-1.2_12.jar
      jsr107cache-1.0.jar
      jstl-1.2.jar
      jta-1.1.jar
      jtidy-r8-20060801.jar
      junit-4.4.jar
      junit-dep-4.4.jar
      jxl-2.6.jar
      laguna-3.3.0.GA.jar
      mail-1.4.jar
      mysql-connector-java-5.1.7-bin.jar
      nekohtml-0.9.5.jar
      oro-2.0.8.jar
      oscache-2.3.jar
      persistence-api-1.0.jar
      poi-3.2.jar
      richfaces-api-3.3.0.GA.jar
      richfaces-impl-3.3.0.GA.jar
      richfaces-ui-3.3.0.GA.jar
      serializer-2.7.0.jar
      shale-test-1.0.4.jar
      slf4j-api-1.4.2.jar
      slf4j-simple-1.4.2.jar
      spring-2.5.6.jar
      spring-aop-2.5.6.jar
      spring-aspects-2.5.6.jar
      spring-beans-2.5.6.jar
      spring-context-2.5.6.jar
      spring-context-support-2.5.6.jar
      spring-core-2.5.6.jar
      spring-dao-2.0.jar
      spring-jdbc-2.5.6.jar
      spring-jpa-2.0.jar
      spring-orm-2.5.6.jar
      spring-security-acl-2.0.4.jar
      spring-security-core-2.0.4.jar
      spring-security-core-tiger-2.0.4.jar
      spring-security-taglibs-2.0.4.jar
      spring-test.jar
      spring-tx-2.5.6.jar
      spring-web-2.5.6.jar
      spring-webmvc-2.5.6.jar
      standard.jar
      Tidy.jar
      tomahawk12-1.1.9.jar
      velocity-1.4.jar
      velocity-dep-1.4.jar
      xmlgraphics-commons-1.3.1.jar

      This project works perfectly under Tomcat 6.0.

      To deploy it under JBoss AS 5, I've already removed some jar files (log4j, xml-apis*.jar, xerces*.jar, xalan*.jar) from the this folder, as suggested by some posts on the internet. However, I still couldn't make it, and the root error message is:

      Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.parsers.DocumentBuilder.setEntityResolver(Lorg/xml/sax/EntityResolver;)V" the class loader (instance of
      org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/springframework/beans/factory/xml/DefaultDocumentLoader, and the class loader (instance of ) for resolved class,
      javax/xml/parsers/DocumentBuilder, have different Class objects for the type org/xml/sax/EntityResolver used in the signature
      at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilder(DefaultDocumentLoader.java:132)
      at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:74)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
      ... 71 more

      I've also tried isolated class-loading, which didn't work.

      Anyone has any idea of how to solve this kind of issue?

      Thanks in advance.