Discussions

EJB programming & troubleshooting: JBoss 3.2.6 Classloader Problem

  1. JBoss 3.2.6 Classloader Problem (3 messages)

    I´ve been developing Entreprise Apps for some time now and I´ve never had any problems to run multiple ears in the same JBoss instance. What i usually do is I add/modify the following code in JBOSS_HOME/server/default/conf/jboss-service.xml:
    <mbean code="org.jboss.deployment.EARDeployer" name="jboss.j2ee:service=EARDeployer">
      <attribute name="Isolated">true</attribute>
    </mbean>

    And in JBOSS_HOME/server/default/deploy/jbossweb-tomcat50.sar/META-INF/jboss-service.xml:

    <attribute name="UseJBossWebLoader">false</attribute>

    However, I have to use the same jar versions in all apps. Now, I´ve switched to MyEclipse IDE and the EAR structure is a little different since the IDE handles automatically jar versions and all. It deploys fine until I made those changes in the JBoss 3.2.6 configuration. When I change the files above I get the following exception:

    java.lang.NoSuchMethodException:
    org.jboss.ejb.StatelessSessionContainer.removeHome(javax.ejb.Handle)

    I have no idea what that is... when i set UseJBossWebLoader to true, which means that the jboss classloader should override all other jars and the isolated attr is set to false, it deploys fine, but when i try to deploy multiple ears, i get the exception above. I dont have any libs that could compromise the application, just the usual ones that exist in all my other apps:

    activation.jar (Impl version 1.0.2)
    commons-logging.jar (1.0.2)
    commons-beanutils.jar (1.5)
    commons-collections.jar (2.1)
    commons-digester.jar (1.3)
    commons-fileupload.jar
    commons-lang.jar (1.0.1)
    commons-validator.jar (1.0.2)
    jakarta-oro.jar
    jaxen-full.jar (1.0 FCS)
    jstl.jar (1.1.2)
    saxpath.jar (1.0)
    standard.jar (1.1.2)
    struts-legacy.jar (1.0)
    display.jar
    iText.jar
    jaxb-rt-1.0-ea.jar (1.0-ea)
    jaxb-xjc-1.0-ea.jar (1.0-ea)
    log4j-1.2.9.jar
    mail.jar (1.3.1)
    md5.jar
    rowset.jar
    struts.jar (1.1)
    xalan.jar (impl vers. xalan-j_2_5_2)
    xercesImpl.jar (Xerces-J_2_3_0)

    Is there any jar in the list above that might be conflicting with JBoss 3.2.6?

    I have no idea what Im doing wrong, could somebody please help me? Thanks!

    Luiz.

    Threaded Messages (3)

  2. #/%#!! Server[ Go to top ]

    Did you ever solve that problem? I have the same trouble now (with v. 4.0.0).
    Kind regards Jesper
  3. Reply to the above[ Go to top ]

    It had to do with the libraries (.jar files) packaged in my .ear file.
  4. ClassLoading[ Go to top ]

    I found the following links that were useful to me.

    http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

    http://www.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases

    I hope that you find it helpful.