6 Replies Latest reply on Sep 9, 2009 3:56 PM by lvonk2000

    NameAlreadyBoundException classpathentries in JBoss 5.1.0 JD

    lvonk2000

      Hi,

      We are migrating from 4.2.3 to 5.1.0 and are deploying the first two ejb jars. When deploying the second jar we get the following exception:

      10:56:19,320 ERROR [Ejb3ClientDeployer] Could not deploy vfszip:/opt/jboss-5.1.0.GA/server/trp/deploy/internet-resources-services-impl-1.0-SNAPSHOT-ejb-deployment.jar/jibx-extras-1.2.1.jar/
      javax.naming.NameAlreadyBoundException: classPathEntries

      jboss.xml of app 1:

      <?xml version="1.0"?>
      <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss_5_1.xsd"
      version="3.0">
      <loader-repository>
      net.ripe:loader=internet-resources-services-impl.jar
      </loader-repository>



      jboss xml of app 2:

      <?xml version="1.0" encoding="UTF-8" ?>
      <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss_5_1.xsd"
      version="3.0">
      <loader-repository>
      net.ripe:loader=customer-services-impl.jar
      </loader-repository>



      Any thoughts how to solve this?

        • 1. Re: NameAlreadyBoundException classpathentries in JBoss 5.1.
          lvonk2000

          Some extra information: Bith applications have a dependency on jibx. After deploying the first application I see this in the log file:

          11:06:36,669 INFO [ClientENCInjectionContainer] STARTED CLIENT ENC CONTAINER: jibx-extras-1.2.1
          11:06:36,673 INFO [ClientENCInjectionContainer] STARTED CLIENT ENC CONTAINER: jibx-run-1.2.1

          What does this mean?

          • 2. Re: NameAlreadyBoundException classpathentries in JBoss 5.1.
            jaikiran

            Please post the entire exception stacktrace.

            While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

            • 3. Re: NameAlreadyBoundException classpathentries in JBoss 5.1.
              peterj

              Also, post the configuration files that contain the text "classPathEntries".

              • 4. Re: NameAlreadyBoundException classpathentries in JBoss 5.1.
                lvonk2000

                Here is the complete stacktrace.

                2009-09-02 09:31:49,378 ERROR [org.jboss.ejb3.deployers.Ejb3ClientDeployer] (HDScanner) Could not deploy vfszip:/opt/jboss-5.1.0.GA/server/trp/deploy/internet-resources-services-impl-1.0-SNAPSHOT-ejb-deployment.jar/jibx-extras-1.2.1.jar/
                javax.naming.NameAlreadyBoundException: classPathEntries
                 at org.jnp.server.NamingServer.bind(NamingServer.java:209)
                 at org.jnp.server.NamingServer.bind(NamingServer.java:167)
                 at org.jnp.interfaces.NamingContext.bind(NamingContext.java:650)
                 at org.jnp.interfaces.NamingContext.bind(NamingContext.java:611)
                 at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:150)
                 at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:61)
                 at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
                 at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                 at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                 at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                 at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
                 at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                 at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
                 at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
                 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                 at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
                 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                 at java.lang.Thread.run(Thread.java:619)
                



                I could not find anyconfiguration files containing the text "classPathEntries".

                The manifest.mf from jibx-run-1.2.1.jar
                Manifest-Version: 1.0
                Ant-Version: Apache Ant 1.6.5
                Created-By: 11.0-b15 (Sun Microsystems Inc.)
                Main-Class: org.jibx.runtime.PrintInfo
                Implementation-Version: 1.2.1
                Class-Path: xpp3.jar stax-api.jar wstx-asl.jar
                


                The manifest.mf from jibx-extras-1.2.1.jar

                Manifest-Version: 1.0
                Ant-Version: Apache Ant 1.6.5
                Created-By: 11.0-b15 (Sun Microsystems Inc.)
                Main-Class: org.jibx.extras.TestRoundtrip
                Implementation-Version: 1.2.1
                Class-Path: jibx-run.jar xpp3.jar stax-api.jar wstx-asl.jar
                


                Hopes this helps

                • 5. Re: NameAlreadyBoundException classpathentries in JBoss 5.1.
                  jaikiran

                  Your jibx-run-1.2.1.jar and jibx-extras-1.2.1.jar are being considered as application client deployments. Your jibx-extras-1.2.1.jar consists this classpath entry:

                  Class-Path: jibx-run.jar xpp3.jar stax-api.jar wstx-asl.jar


                  Notice, the jibx-run.jar (which i assume is what you meant by jibx-run.jar-1.2.1.jar). So the jibx-run.jar is picked up again through the ClassPath entry. There are some known issues with processing ClassPath entries in MANIFEST.MF of jars, in AS-5. Try removing the jibx-run.jar entry from the Classpath attribute of jibx-extras-1.2.1.jar:

                  Class-Path: xpp3.jar stax-api.jar wstx-asl.jar


                  • 6. Re: NameAlreadyBoundException classpathentries in JBoss 5.1.
                    lvonk2000

                    My apologies for replying so late, we solved the issue by placing the jibx classes in the lib directory. Thanks for your suggestions