maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS ...@batmat.net>
Subject Re: Swing - EJB Client
Date Thu, 02 Jul 2009 13:13:33 GMT
Hi Rafael,

When you say it works fine with ant. I guess you mean the sources? Is
already maven packaging all your source into jar? If so, maybe there'd be
something to look after in the packaging phase?

My 2 cents.

2009/7/1 Rafael Felix <felix@serhmatica.com.br>

> I'm migrating an Ant Swing application to Maven.
> This application make an lookup in a EJB Container (Glassfish), but I've an
> strange exception when trying to use the InitialContext.
>
> Code snipet:
> 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");
>           props.setProperty("org.omg.CORBA.ORBInitialHost",
> "192.168.254.10");
>           props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
>       try {
>           InitialContext ctx = new InitialContext(props);
>       } catch (NamingException ex) {
>           ex.printStackTrace();
>       }
>
> Error stacktrace:
> Exception in thread "main" java.lang.ClassFormatError: Absent Code
> attribute in method that is not native or abstract in class file
> javax/security/jacc/PolicyContextException
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>       at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>       at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>       at com.sun.enterprise.security.SSLUtils.<clinit>(SSLUtils.java:102)
>       at
> com.sun.enterprise.iiop.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:182)
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>       at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>       at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>       at java.lang.Class.newInstance0(Class.java:355)
>       at java.lang.Class.newInstance(Class.java:308)
>       at
> com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:696)
>       at
> com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:58)
>       at
> com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:81)
>       at
> com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:81)
>       at
> com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:481)
>       at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:587)
>       at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:701)
>       at org.omg.CORBA.ORB.init(ORB.java:337)
>       at com.sun.enterprise.util.ORBManager.initORB(ORBManager.java:546)
>       at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:278)
>       at
> com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:178)
>       at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
>       at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
>       at javax.naming.InitialContext.init(InitialContext.java:223)
>       at javax.naming.InitialContext.<init>(InitialContext.java:197)
>
> I've added in client some glassfish libraries:
> *appserv-admin
> * appserv-deployment-client
> * appserv-ext
> *appserv-rt
>
> This code works correctly in the Ant application.
> (The EJB has recently migrated from the ant to maven too, this works well)
>
> --
> Serhmatica
> visite: www.serhmatica.com.br
> Esta mensagem foi verificada pelo sistema de antivĂ­rus e
> acredita-se estar livre de perigo.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message