geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: EAR bundle dir classpath issue
Date Thu, 14 Aug 2008 16:46:20 GMT
I think you've identified two bugs.  Could you please open jira issues  
for them?
https://issues.apache.org/jira/browse/GERONIMO

I don't immediately see a workaround other than defining the "lib"  
directory to be / and putting all the lib jars in the root of the ear.

thanks
david jencks

On Aug 14, 2008, at 7:13 AM, 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-tp18982334s134p18982334.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message