1 Reply Latest reply on Oct 27, 2009 12:35 PM by neillott

    Ears sharing jars

      Hi,

      I have one jboss instance running jboss 5.1 with webservices Version: jbossws-native-3.2.0.GA.

      In this instance I deploy 6 ears all of which have an interface that specifies something like this

      @WebService
      @SOAPBinding (
      style = SOAPBinding.Style.DOCUMENT,
      use = SOAPBinding.Use.LITERAL,
      parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
      )
      public interface OnDemand
      {
      public void method1();
      ...
      }

      I then implement this interface.

      When I deploy the ear, the ear contains the following:

      [neil@flicker main ondemand]$ jar -tvf generated/server/ear/ondemand-5.2.3.ear
      0 Tue Oct 27 10:15:40 MDT 2009 META-INF/
      256 Tue Oct 27 10:15:38 MDT 2009 META-INF/MANIFEST.MF
      0 Tue Oct 27 10:15:40 MDT 2009 lib/
      358273 Tue Oct 27 10:15:40 MDT 2009 lib/antlr-2.7.2.jar
      73425 Tue Oct 27 10:15:38 MDT 2009 lib/avalon-framework-4.1.5.jar
      321201 Tue Oct 27 10:15:40 MDT 2009 lib/backport-util-concurrent-60-3.1.jar
      595558 Tue Oct 27 10:15:38 MDT 2009 lib/catalogsif-5.2.3.jar
      121757 Tue Oct 27 10:15:40 MDT 2009 lib/commons-dbcp-1.2.2.jar
      96067 Tue Oct 27 10:15:38 MDT 2009 lib/commons-pool-1.5.1.jar
      727837 Tue Oct 27 10:15:40 MDT 2009 lib/coreif-5.2.3.jar
      632663 Tue Oct 27 10:15:38 MDT 2009 lib/dbif-5.2.3.jar
      1059115 Tue Oct 27 10:15:40 MDT 2009 lib/isa-1.4.4.jar
      88778 Tue Oct 27 10:15:40 MDT 2009 lib/isautilsif-5.2.3.jar
      5750674 Tue Oct 27 10:15:38 MDT 2009 lib/jacorb-2.3.2.jar
      802216 Tue Oct 27 10:15:38 MDT 2009 lib/jakarta-poi-2.5.1.jar
      89967 Tue Oct 27 10:15:38 MDT 2009 lib/jboss-jaxb-api-5.1.0.GA.jar
      50570 Tue Oct 27 10:15:40 MDT 2009 lib/jbossws-jaxws-5.1.0.GA.jar
      534827 Tue Oct 27 10:15:40 MDT 2009 lib/joda-time-1.6.jar
      391834 Tue Oct 27 10:15:40 MDT 2009 lib/log4j-1.2.15.jar
      86165 Tue Oct 27 10:15:40 MDT 2009 lib/logkit-1.2.jar
      123874 Tue Oct 27 10:15:40 MDT 2009 lib/menumanagerif-5.2.3.jar
      451525 Tue Oct 27 10:15:40 MDT 2009 lib/ondemandif-5.2.3.jar
      1556269 Tue Oct 27 10:15:40 MDT 2009 lib/oracle-driver-10.2.0.4.jar
      23445 Tue Oct 27 10:15:38 MDT 2009 lib/slf4j-1.5.8.jar
      9679 Tue Oct 27 10:15:40 MDT 2009 lib/slf4j-log4j12-1.5.8.jar
      8047 Tue Oct 27 10:15:38 MDT 2009 lib/ws-coreif-5.2.3.jar
      26180 Tue Oct 27 10:15:40 MDT 2009 lib/wsif-5.2.3.jar
      9336 Tue Oct 27 10:15:38 MDT 2009 ondemand-ejb-5.2.3.jar

      When I deploy only this ear for example, JBoss immediately figures out that I have a webservice and does everything right. I'm able to access my webservice with no problem.

      If I deploy multiple ears and say they share a jar like this:

      451525 Tue Oct 27 10:15:40 MDT 2009 lib/ondemandif-5.2.3.jar

      But then let's say one ear has

      451525 Tue Oct 27 10:15:40 MDT 2009 lib/ondemandif-5.2.3.jar

      And the other ear has

      451525 Tue Oct 27 10:15:40 MDT 2009 lib/ondemandif-5.2.4.jar

      Whichever ear gets deployed and used first will have its classes loaded from its ondemandif jar.

      So I tried adding a jboss-app.xml to my META-INF directory in my ear that looks like this:

      <jboss-app>
      <loader-repository>
      com.mystrotv:loader=ondemandif-5.2.3.jar
      <loader-repository-config>java2ParentDelegaton=false</loader-repository-config>
      </loader-repository>
      </jboss-app>


      But then I get this error and my webservice won't load

      DEPLOYMENTS IN ERROR:
      Deployment "vfszip:/usr/local/mystro/jboss/server/mas-ws/deploy/ondemand-5.2.3.ear/" is in error due to the following reason(s): java.lang.RuntimeException: Bean Class com.twc.atgw.server.ws.ondemand.OnDemandImpl has no local, webservice, or remote interfaces defined and does not implement at least one business interface: OnDemandImpl

      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
      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)

      However, my webservice loads fine if I don't include this xml file. My intention was to isolate the jars inside the ear so they are not shared across the webservice container. My understanding was that this would accomplish that:

      <loader-repository-config>java2ParentDelegaton=false</loader-repository-config>

      Do I need to somehow specify my webservice annotated class in the jboss-app.xml as well? Anyone has any hints that might help?

      Thanks,

      Neil






        • 1. Re: Ears sharing jars

          I also tried:


          <!-- A flag indicating if ear deployments should have their own scoped
          class loader to isolate their classes from other deployments.
          -->
          true


          And I get the same error.

          Thanks,

          Neil