users@glassfish.java.net

Re: Migrating standalone client from GFv2 to GFv3 (or the classpath hell)

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Thu, 30 Sep 2010 18:13:09 +0200

Are you talking about
http://download.java.net/maven/glassfish/org/glassfish/extras/glassfish-uber?
There is only a 3.1-SNAPSHOT, can't find anything in 3.0.1.

With glassfish-uber I get a : java.lang.ClassFormatError:
javax/ejb/EJBException

That's because I'm not using the right implementation class. BTW, this is a
Java EE 5 project (I don't want to do any Java EE 6), so one of my
dependencies is javaee.javaee-api-5.

Hum, which dependencies to use ? Any idea ?

Thanks,
Antonio

2010/9/30 Alexis Moussine-Pouchkine <alexis.moussine-pouchkine_at_oracle.com>

> gf-client.jar uses relative references to all the JARs it needs (see
> MANIFEST.MF) so that's not going to work for Maven (it should with ant).
> Have you tried using the uber all-in-one JAR as a mvn dependency instead?
> -Alexis
>
> On 30 sept. 2010, at 14:31, Antonio Goncalves wrote:
>
> > Hi,
> >
> > I have an application that uses a Swing client with JNDI lookups to
> access remote stateless EJBs. Everything works fine. I'm trying now to go
> from an Ant build (with explicit classpath setting) that runs on GlassFish
> 2.1 to a Maven build with the latest GlassFish v3.0.1
> >
> > With Ant on GlassFish v2.1 this is what I explicitely declare in my
> classpath :
> > appserv-deployment-client.jar
> > appserv-rt.jar
> > webservices-rt.jar
> > appserv-admin.jar
> > javaee.jar
> >
> > I know things have changed in GFv3 so I'm now using the
> org.glassfish.appclient.gf-client-3.0.1-b20 (instead of the appserv-rt.jar).
> When I run my Swing app with the gf-client I have the following exception :
> >
> > java.lang.NoClassDefFoundError: com/sun/corba/ee/spi/osgi/ORBFactory
> >
> > Indeed. This class is in com.sun.corba.glassfish-corba-orb-3.1.0-b006 but
> not in the 3.0.0-b001 that gf-client depends on. So I've added the
> com.sun.corba.glassfish-corba-orb-3.1.0-b006 to my dependencies and now have
> the following exception :
> >
> > java.lang.NoClassDefFoundError:
> org/glassfish/enterprise/iiop/impl/CSIv2SSLTaggedComponentHandlerImpl
> >
> > It looks like I could spend the day looking for NoClassDefFoundError, so
> I might be doing something wrong. I gave a try and used a 3.0 version
> (org.glassfish.appclient.gf-client-3.0-b74b) but I still have
> java.lang.NoClassDefFoundError: com/sun/corba/ee/spi/osgi/ORBFactory.
> >
> > There must be an easier way, any idea ?
> > Thanks,
> > Antonio
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


-- 
--
Antonio Goncalves (antonio.goncalves_at_gmail.com)
Software architect
Web site : www.antoniogoncalves.org
Blog: agoncal.wordpress.com
Feed: feeds2.feedburner.com/AntonioGoncalves
Paris JUG leader : www.parisjug.org
LinkedIn: www.linkedin.com/in/agoncal,