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

2003-08-14 Thread Harmsen, Jan

Remy Maucherat wrote:

 I did examine the Eclipse code, and it is invalid (you must 
 not attempt 
 to access other CL controlled resources based on another URL 
 which was 
 returned by the CL).

Hi Remy,

What you say sounds reasonable to me as a user of the eclipse
code, looks like the developers of eclipse emf did not think
of the problems such an access method can cause. Unfortunately
EMF is a base for other APIs like XSD ...

 However, I did add a workaround in the CL which makes your test case 
 work, but which has a performance penalty on first access to a JAR. I 
 think avoiding resource leak is more important.
 

Thanks a lot !! I agree.

Best regards,

Jan


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

2003-08-05 Thread Harmsen, Jan

Remy Maucherat wrote:
 Any update on this ? This is obviously a big problem if the issue is 
 valid, so I'd really appreciate your help.
 

Hi Remy,

I set up a test case and it looks like it's a Tomcat-5 problem.
The webapp works on Tomcat-4.1, on Tomcat-5.0 the resources within
xsd.resources.jar cannot be reached.


tested environment: Win2k Prof, SuSE Linux 8.2

Log Win2k:

05.08.2003 18:10:32 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /xsd-testcase from URL
file://C:/Programs/eclipse/workspace/xsdTestCase/build
Wrapped exception
java.io.FileNotFoundException:
C:\ApacheGroup\jakarta-tomcat-5.0.5\work\Catalina\localhost
\xsd-testcase\loader\org\eclipse\xsd\cache\www.w3.org\2001\MagicXMLSchema.xs
d (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(Unknown Source)
#


Log SuSE Linux 8.2

Aug 5, 2003 5:52:47 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /xsdtestcase
from URL file:/home/jan/eclipse/XSDTestcase/build
Wrapped exception
java.io.FileNotFoundException:
/opt/jakarta-tomcat-5.0/work/Catalina/localhost
/xsdtestcase/loader/org/eclipse/xsd/cache/www.w3.org/2001/MagicXMLSchema.xsd
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(FileInputStream.java:103)


The webapp is here:
http://tamino.demozone.softwareag.com/xsdTestCaseWebApp.zip

The JavaDoc for the relevant classes is here:

Eclipse EMF:
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E/emf-home/docs/j
avadoc/index.html
Eclipse XSD:
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd-home/docs/javado
c/index.html

This is how the URI to the xsd resource in xsd.resources.jar is created
(from XSDSchemaImpl.java):

  String baseURL = XSDPlugin.INSTANCE.getBaseURL().toString();
 
getGlobalResourceSet().getLoadOptions().put(XSD_MAGIC_XML_SCHEMA,
XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
  Resource magicSchemaForSchema2001Resource = 
getGlobalResourceSet().getResource
  (URI.createURI(baseURL +
cache/www.w3.org/2001/MagicXMLSchema.xsd), true);


Best regards,

Jan


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

2003-08-04 Thread Harmsen, Jan
Hi Remy,

sorry for not sending you a test case, there were some high priority
tasks coming in which had to be served first. As it looks now I will
be able to set up a test case within the next 2 days.

Best regards,

Jan

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: Saturday, August 02, 2003 7:47 PM
 To: Tomcat Developers List
 Subject: Re: tomcat-5.0.5 cannot access jar resources in 
 WEB-INF/lib but
 o nly unzipped in WEB-INF/classes
 
 
 Harmsen, Jan wrote:
 Please provide a test case along with infomation on your 
 environment.
  
  okay, tomorrow I'll provide a test case + description,
 
 Any update on this ? This is obviously a big problem if the issue is 
 valid, so I'd really appreciate your help.
 
 Thanks,
 Remy
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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 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 o nly unzipped in WEB-INF/classes

2003-07-31 Thread Harmsen, Jan
Hi,

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

okay, tomorrow I'll provide a test case + description,

Thanks,

Jan