users@glassfish.java.net

Remote Client

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 Mar 2008 05:40:02 PST

I have project which is a web application that uses EJB 3 as a backend. I am trying to solve a round trip problem. When doing changes to jsp or struts2 actions the round trip of building the whole application and deploying it to glassfish is too long.

To solve the round trip issue I am deploying the EJB3 parts to glassfish as normal, but I am trying to run the deploy the web layer to Jetty (using the maven jetty plugin), as it has hot deployment while I am editing files in my IDE.

The problem I have is that I am not able to create an InitialContext when running in Jetty. I get the following error:
java.lang.VerifyError: (class: com/sun/corba/ee/impl/orb/ORBImpl, method: create_context_list signature: ()Lorg/omg/CORBA/ContextList;) Incompatible argument to function

As https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html states I have included appserv-rt.jar and javaee.jar in the classpath, pom.xml:
....
<dependency>
      <groupId>glassfish</groupId>
      <artifactId>appserv-rt.jar</artifactId>
      <version>LATEST</version>
      <scope>system</scope>
      <systemPath>C:/Glassfish/lib/appserv-rt.jar</systemPath>
    </dependency>
    <dependency>
      <groupId>glassfish</groupId>
      <artifactId>javaee.jar</artifactId>
      <version>LATEST</version>
      <scope>system</scope>
      <systemPath>C:/Glassfish/lib/javaee.jar</systemPath>
    </dependency>
....

The InitialContext is created in the following manner:
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");

// optional. Defaults to localhost. Only needed if web server is running
// on a different host than the appserver
props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");

// optional. Defaults to 3700. Only needed if target orb port is not 3700.
 props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

ic = new InitialContext(props);


Any ideas on how to fix this issue would be much appreiciated.
[Message sent by forum member 'tyken' (tyken)]

http://forums.java.net/jive/thread.jspa?messageID=264577