Wrong path to access JAR files in EAR from WAR modules with getResourceAsStream
-------------------------------------------------------------------------------
Key: GERONIMO-4250
URL: https://issues.apache.org/jira/browse/GERONIMO-4250
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Affects Versions: 2.1.2
Environment: Geronimo 2.1.2 on Windows XP
Reporter: Frank Meilinger
Hi,
I've tryed to build an EAR with the default lib/ bundle directory without using
the manifest 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 the lib/ prefix should not be specified.
See discussion:
http://www.nabble.com/EAR-bundle-dir-classpath-issue-tt18982334s134.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.