tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only unzipped in WEB-INF/classes

2003-07-31 Thread Harmsen, Jan
Hi,

tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only  unzipped
in WEB-INF/classes:

The eclipse XSD API xsd.jar (http://www.eclipse.org/xsd/) provides
a set of XML schemata + dtds in an additional jar file xsd.resources.jar.

Both jar files (xsd.jar + xsd.resources.jar) are located in WEB-INF/lib

While Tomcat 4.1.24 can access the resources in xsd.resources.jar
Tomcat 5.0.5 throws an exception:

###
Wrapped exception
java.io.FileNotFoundException:
C:\ApacheGroup\jakarta-tomcat-5.0.5\work\Catalina\localhost\xapp_simple\load
er\org\eclipse\xsd\cache\www.w3.org\2001\MagicXMLSchema.xsd (The system
cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(Unknown Source)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createFileInputStream(U
RIConverterImpl.java:416)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URICo
nverterImpl.java:382)
###


If xsd.resources.jar is unzipped in WEB-INF/classes Tomcat 5.0.5 can access
the resources.

Is this a bug of Tomcat 5.0.5 or is it a problem of the emf eclipse package
?


Thanks + best regards,

Jan Harmsen

Software AG
The XML company


Re: tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only unzipped in WEB-INF/classes

2003-07-31 Thread Remy Maucherat
Harmsen, Jan wrote:
Hi,

tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only  unzipped
in WEB-INF/classes:
The eclipse XSD API xsd.jar (http://www.eclipse.org/xsd/) provides
a set of XML schemata + dtds in an additional jar file xsd.resources.jar.
Both jar files (xsd.jar + xsd.resources.jar) are located in WEB-INF/lib

While Tomcat 4.1.24 can access the resources in xsd.resources.jar
Tomcat 5.0.5 throws an exception:
###
Wrapped exception
java.io.FileNotFoundException:
C:\ApacheGroup\jakarta-tomcat-5.0.5\work\Catalina\localhost\xapp_simple\load
er\org\eclipse\xsd\cache\www.w3.org\2001\MagicXMLSchema.xsd (The system
cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(Unknown Source)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createFileInputStream(U
RIConverterImpl.java:416)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URICo
nverterImpl.java:382)
###
If xsd.resources.jar is unzipped in WEB-INF/classes Tomcat 5.0.5 can access
the resources.
Is this a bug of Tomcat 5.0.5 or is it a problem of the emf eclipse package
?
Features were added to avoid JAR locking and file descriptors leak. This 
works fine for all resources loaded by the classloader that I could find 
(ex: Struts).
The first thing to check is if the specified file exists, and if it 
still fails, provide a test case.

Remy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only unzipped in WEB-INF/classes

2003-07-31 Thread Harmsen, Jan
Hi Remy,

 The first thing to check is if the specified file exists, and if it 
 still fails, provide a test case.
 

loading seems to work only partially:

the structure of the jar file is

org/eclipse/xsd/plugin.properties
org/eclipse/xsd/cache/www.w3.org/2001/MagicXMLSchema.xsd
... plus many more dtds + XML schemata

while tomcat-5.0.5 loads plugin.properties to
loader/org/eclipse/xsd/plugin.properties
it does not load MagicXMLSchema.xsd. The only file that
exists in Tomcats loader directory is plugin.properties.


Best regards,

Jan


 


Re: tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only unzipped in WEB-INF/classes

2003-07-31 Thread Remy Maucherat
Harmsen, Jan wrote:

Hi Remy,


The first thing to check is if the specified file exists, and if it 
still fails, provide a test case.



loading seems to work only partially:

the structure of the jar file is

org/eclipse/xsd/plugin.properties
org/eclipse/xsd/cache/www.w3.org/2001/MagicXMLSchema.xsd
... plus many more dtds + XML schemata
while tomcat-5.0.5 loads plugin.properties to
loader/org/eclipse/xsd/plugin.properties
it does not load MagicXMLSchema.xsd. The only file that
exists in Tomcats loader directory is plugin.properties.
I'll assume the problem could be caused by the '.', which may not be the 
case. I recommend sending a test case.

Remy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat-5.0.5 cannot access jar resources in WEB-INF/lib but only unzipped in WEB-INF/classes

2003-07-31 Thread Remy Maucherat
Harmsen, Jan wrote:
Hi Remy,

The first thing to check is if the specified file exists, and if it 
still fails, provide a test case.
loading seems to work only partially:

the structure of the jar file is

org/eclipse/xsd/plugin.properties
org/eclipse/xsd/cache/www.w3.org/2001/MagicXMLSchema.xsd
... plus many more dtds + XML schemata
while tomcat-5.0.5 loads plugin.properties to
loader/org/eclipse/xsd/plugin.properties
it does not load MagicXMLSchema.xsd. The only file that
exists in Tomcats loader directory is plugin.properties.
I tested it:
java.net.URL url = 
MyServlet.class.getResource(org/eclipse/xsd/cache/www.w3.org/2001/MagicXMLSchema.xsd);
url.openStream();

The property file (which is present only in a JAR in /WEB-INF/lib) is 
correctly read and extracted to the work directory.

Please provide a test case along with infomation on your environment.

Remy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]