4 Replies Latest reply on Jun 19, 2004 6:58 PM by bodaro

    How to run an application client deployed inside EAR file?

    egoldfarb Newbie

      I am having a hard time figuring out how to run an application client jar included inside of EAR file. The getting started documentation only shows how to package the app, and to run it they execute an ant target which in fact doesn't run the application from the EAR but instead directly runs the JAR from the build directory.

      Does JBOSS in fact have a helper class which extracts the client JAR from the EAR and runs it, or do we have to deploy client JARs separately from the EAR?

      On JONAS, for example, there is a helper jar, so running the application looks like this:
      java -jar $JONAS_ROOT/lib/client.jar $JONAS_ROOT/apps/autoload/application.ear -jarClient appclient.jar


        • 1. Re: How to run an application client deployed inside EAR fil
          Scott Stark Master

          There is no helper application. You simply run the client with the client jar in its classpath.

          • 2. Re: How to run an application client deployed inside EAR fil
            egoldfarb Newbie

            But I cannot specify JAR file which is inside the EAR file. I have to uncompress or I have to deploy a separate client jar file.

            Why is there the J2EE standard specifying packaging client JARS inside EAR file if you cannot run it?

            • 3. Re: How to run an application client deployed inside EAR fil
              Scott Stark Master

              So that you can deploy the application to a j2ee server. The spec explicitly states how one runs a j2ee application client is undefined. I'd be happy to entertain a submission that allows the application hosted jar to be used in conjuncation with a jboss specific class to launch the application. Frankly I find it more intuitive to run the j2ee client app the same as I would any other java app.

              • 4. [JBoss-user] [Installation & Configuration] Running JBoss wi
                bodaro Newbie

                I have an application that intiially separated Jboss 3.0.6 and Tomcat 4.1.24 into separate JVMs. To gain efficieny we wish to run both in the same JVM and avoid the cost of marshalling/unmarshalling and remote invocations.

                I took our Jboss 3.0.6 server and embedded the tomcat 4.1.18 server that came with the Jboss 3.0.6-Tomcat 4.1.18 distribution. I am able to successfully start the application and it unpacks my WAR and EAR files without errors.

                On the first request that uses EJB calls I see this error:

                15:37:07,648 ERROR [LogInterceptor] EJBException:
                javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract com.yaga.contentmanager.ContentManager com.yaga.contentmanager.ContentManagerHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException
                at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:597)

                I have done no configuration changes from t he original tomcat webapp - so I assume its still communicating on port 1099 with JBoss. But why shouldnt it work in this new configuration? Presumably Jboss is still listening on port 1099 and my client side bean calls have not changed.

                Any ideas?

                I wish to remove the overhead of marshalling. I was told that there is a switch in Jboss that will recognize that the EJB calls are in-process and avoid themarshalling and avoid using TCP over port 1099. Can you tell me how to enable this?

                Any help is appreicated, including pointers to documentation.