You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by devdev <qu...@yahoo.com> on 2008/09/02 21:50:51 UTC

Re: EAR bundle dir classpath issue


What is the workaround?  Where should we put the lib for the time being?

THanks
JFR


fmeili wrote:
> 
> Hi,
> 
> I've try to build an EAR with the default lib/ bundle directory without
> using the manifes Class-Path entry in all WAR's which references the jar
> files in the lib/ directory. This EAR should be standard JEE5 compliant
> and should be deployable without any change in Geronimo 2.1.2 and
> GlassFish (latest Version).
> 
> Now I found a difference in how to access the jar files located in the
> EARs lib/ directory from within an WAR module.
> 
> In Geronimo I have to use:
> getClass().getClassLoader().getResourceAsStream("lib/sample.jar")
> to get the jar file content.
> 
> In GlassFish I have to use:
> getClass().getClassLoader().getResourceAsStream("sample.jar")
> notice - without the lib/ prefix.
> 
> As far as I understand the JEE5 specification (section 8.2.1 Bundled
> Libraries), all JAR-Files in the EARs lib/ directory should be available
> in all (also WAR) Modules classloaders. So I think the lib/ prefix should
> not be specified.
> 
> I've tried to workaround this problem by specifying the lib directory in
> the WAR manifest entry with the following entry:
> ClassPath: lib/
> 
> But this results in an deployment error in Geronimo with the following
> message:
> 
> 15:20:13,170 ERROR [DirectoryHotDeployer] Unable to deploy: Manifest class
> path
> entries must end with the .jar extension (J2EE 1.4 Section 8.2):
> module=../
> org.apache.geronimo.common.DeploymentException: Manifest class path
> entries must
>  end with the .jar extension (J2EE 1.4 Section 8.2): module=../
>         at
> org.apache.geronimo.deployment.DeploymentContext.addManifestClassPath
> (DeploymentContext.java:419)
> ...
> 
> I think this is definitely an error because the JEE5 specification section
> 8.2.1 explicitely allows directories in manifest Class-Path entries.
> 
> So it seems the workaround didn't work, too.
> 
> Do I make something wrong?
> 
> If not, do I have a chance to generate an generic EAR file (with the same
> source code) with bundled lib/ directory usage from WAR modules, which is
> deployable under Geronimo and GlassFish?
> 
> Thanks,
>  Frank
> 
> 

-- 
View this message in context: http://www.nabble.com/EAR-bundle-dir-classpath-issue-tp18982334s134p19276997.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.