XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 25 Feb 2007 06:21 PM
Originally Posted: 25 Feb 2007 06:16 PM
I get this error when I deploy the execute XQuery from Java.
"java.io.IOException: X12 resources not reachable. Check classpath for X12.jar {close}"

This happens with the Saxon-B processor or the DataDirect processor.

I am converting an X12 835 doument to XML.

I am using NetBeans IDE 5.5 and the Tomcat server.

I am deploying the Stylus studio genertated adapter in Java Web Services created by NetBeans IDE 5.5.

If I use the java file in a java app and run it NetBeans IDE 5.5 I have no issue.

I have X12.jar in the classpath. I have checked every possible classpath with no results.

Attached source files.


UnknownEDI835XMLConverter.java
Java created by Stylus Studio

UnknownX12to835XML.xquery
XQuery file generated by Stylus Studio

Unknown83519460.era
Example X12 input file

Unknown83519460.xml
Example XML output when done from SS

UnknownJavaWebService835.java
Web services java source

Postnext
Ivan PedruzziSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Ivan Pedruzzi
Date: 25 Feb 2007 07:54 PM

Hi Glenn,

What you are experiencing could be caused by security restriction.
Try to add the following section to the <tomcat>conf\catalina.policy

adjust file:${catalina.home}/webapps/XMLConverters/ to your servlet path

grant codeBase "file:${catalina.home}/webapps/XMLConverters/-"{
permission java.security.AllPermission;
};

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 25 Feb 2007 09:50 PM
Ivan,

I tried adding this to the file but no change. This is where all the jar files are. I also restarted the server. Let me know.

grant codeBase "file:${catalina.home}/webapps/EDIX12ConversionConsole/build/web/WEB-INF/lib/-"{
permission java.security.AllPermission;
};

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 26 Feb 2007 12:25 AM
Ivan,

I tried adding this to the file but no change. This is where all the jar files are. I also restarted the server. Let me know.

grant codeBase "file:${catalina.home}/webapps/EDIX12ConversionConsole/build/web/WEB-INF/lib/-"{
permission java.security.AllPermission;
};

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 25 Feb 2007 08:47 PM
Thanks Ivan,

I will do that. I have found the file and will add

grant codeBase "file:${catalina.home}/webapps/XMLConverters/-"{
permission java.security.AllPermission;
};

What do you mean by "adjust file:${catalina.home}/webapps/XMLConverters/ to your servlet path"

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 25 Feb 2007 08:52 PM
Originally Posted: 25 Feb 2007 08:49 PM
Thanks Ivan,

I will do that. I have found the file and will add

grant codeBase "file:${catalina.home}/webapps/XMLConverters/-"{
permission java.security.AllPermission;
};

What do you mean by "adjust file:${catalina.home}/webapps/XMLConverters/ to your servlet path"

My path is:
C:\CacheSys\Devuser\java\WEBSERVICES\EDIX12ConversionConsole\build\web\WEB-INF\lib

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 25 Feb 2007 09:02 PM
My context path is /EDIX12ConversionConsole
I don't see the relationship to XMLConverters. Unless you man the location I put X12.jar in?

EDIX12ConversionConsole\build\web\WEB-INF\lib

Postnext
Ivan PedruzziSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Ivan Pedruzzi
Date: 25 Feb 2007 09:46 PM

Assuming your Tomcat Web application is in
C:\CacheSys\Devuser\java\WEBSERVICES\EDIX12ConversionConsole\build\web

and assuming that you have copied all XML Converters jar files under the sub folder WEB-INF/lib

Use the following

grant codeBase "file: C:/CacheSys/Devuser/java/WEBSERVICES/EDIX12ConversionConsole/build/web/WEB-INF/lib/-"{
permission java.security.AllPermission;
};


Ivan

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 26 Feb 2007 12:49 AM
Ivan,

I did that but no change.

<!-- Checking the Stylus Studio license. -->
Exception caught java.io.IOException: {close}
Exception caught java.io.IOException: X12 resources not reachable. Check classpath for X12.jar {close}

Here is the modified policy file.


Unknowncatalina.policy
Tomcat security policy file

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 25 Feb 2007 09:40 PM
Maybe this is right.

grant codeBase "file:${catalina.home}/webapps/EDIX12ConversionConsole/build/web/WEB-INF/lib/-"{
permission java.security.AllPermission;
};

Postnext
Ivan PedruzziSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Ivan Pedruzzi
Date: 26 Feb 2007 06:05 AM

In which directory tomcat is installed in your system?

Could you please zip the tomcat log files directory (<tomcat>\logs) and send it to stylus-field-report@progress.com?

Ivan Pedruzzi
Stylus Studio Team

Postnext
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 26 Feb 2007 05:37 PM
Originally Posted: 26 Feb 2007 03:53 PM
I am in the process of trying to do that. It does not look like the logging is turned on as the one file called dummy in there is empty. I have been researching how to turn on the logging.

I am looking at this page right now. Any suggestions will be appreciated.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

Posttop
Glenn BrandSubject: X12 resources not reachable (Tomcat web deploymnet)
Author: Glenn Brand
Date: 26 Feb 2007 07:21 PM
Originally Posted: 26 Feb 2007 07:16 PM
OK I managed to get a log file. I am uploading in this forum and I will send it to e-mail as well. The log file generated in the logs directory does not seem to capture too much so I grabbed the log out of the Netbeans IDE debugger.
Meantime I am including the policy file.

Glenn


Documentcatalina(1).policy
Catalina policy

Documentcatalina.2007-02-26.log
Catalina log

Documentmanager.2007-02-26.log
Manager log

UnknownTomcat.2007-02-26.zip
Log File Tomcat 5.5.17

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.