-
1. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
icordoba Oct 25, 2010 6:08 AM (in response to icordoba)Update:
I've tried addmin a MANIFEST.MF both to the war root and also packing the war in an ear and addming the manifest to the ear. It won't find the classes:
Class-Path: /home/glassfish/glassfishv3/glassfish/modules/gf-client.jarClass-Path: /home/glassfish/glassfishv3/glassfish/modules/gf-client.jar
I get:java.lang.IllegalStateException: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory] -
2. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
jaikiran Oct 25, 2010 6:38 AM (in response to icordoba)You'll have to include gf-client.jar and all the other jars referred in its META-INF/MANIFEST.MF file, into the .war/WEB-INF/lib of your application.
-
3. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
icordoba Oct 25, 2010 6:40 AM (in response to jaikiran)Thanks for your reply. I wanted to avoid it as it really is a big bunch of jars.
Do yo know why using Class-Path in /META-INF/MANIFEST.MF in the war file referencing gf-client.jar is not working? Every doc I read states it is the standard way to reference external jars in a WAR file.
-
4. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
jaikiran Oct 25, 2010 6:57 AM (in response to icordoba)The ClassPath entries in the MANIFEST.MF are always relative to the location of the jar containing that MANIFEST.MF. So if you are using that in the .war file, then it's going to be relative to the location of the war, which means you'll have to copy over those jars from the GlassFish installation.
-
5. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
icordoba Oct 25, 2010 7:44 AM (in response to jaikiran)Thanks again,
when you say "relative" you also mean that no .jar file outside that war can be referenced, even with an absolute path? Considering it, adding
Class-Path: /home/glassfish/glassfishv3/glassfish/modules/gf-client.jar
to the manifest, as that jar is refernced with an absolute ("/...") path, shouldn't it be located?
If anyway, no external jars in a war file can be referenced... do you know if this behaviour changes unzipping the war and deploying it as a dirctory in jboss deply dir?
Thanks,
Ignacio
-
6. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
jaikiran Oct 25, 2010 8:04 AM (in response to icordoba)Ignacio de Cordoba wrote:
Thanks again,
when you say "relative" you also mean that no .jar file outside that war can be referenced, even with an absolute path? Considering it, adding
Class-Path: /home/glassfish/glassfishv3/glassfish/modules/gf-client.jar
This has the entire details http://download.oracle.com/javase/tutorial/deployment/jar/downman.html
Ignacio de Cordoba wrote:
If anyway, no external jars in a war file can be referenced... do you know if this behaviour changes unzipping the war and deploying it as a dirctory in jboss deply dir?
No, the behaviour is the same for both zipped and exploded deployments.
-
7. Re: Extend jboss deployed war classpath to do a Glassfish EJB lookup
icordoba Oct 28, 2010 3:59 AM (in response to jaikiran)Hello again,
I've read http://download.oracle.com/javase/tutorial/deployment/jar/downman.html and it talks about referencing jars "on the local network". According to that, using a root path ("/home/glassfish/...") should work and, at least for me, it does not.
Thanks,
Ignacio