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

Reply via email to