Jane T's picture

I am having an issue getting the appliance to run my application which is developed in a tool call adelia.

 

I can install the War file just fine and it will start up.  However when I try to run it I

get org.xml.sax.SAXException: Internal Error: File /javax/servlet/resources/web-app_2_3.dtd not found
 

I tried using the solution at http://wiki.metawerx.net/wiki/Org.xml.sax.SAXException, but this just moved the error down to another section of code, giving me

java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.jasper.compiler)
	java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
	java.security.AccessController.checkPermission(AccessController.java:546)

My problem is I don't really know too much about what I am looking at, as the tool I use generates the jsp and a backend system to match our existing solutions which run on a iSeries server.  I was hoping to use the applience as a simple way to host the jsp routines.

It's been suggested (via google) it would be a good idea to upgrade to .27 of Tomcat,  but I am unsure of where all the files should be put on the appliance. The folder structure in the distribution does not look quite the same as that on the appliance.

Thanks in advance.

Forum: 
Kai Niklas's picture

have you tried setting the persmissions in the java runtime?

you can do that in the policy file "java.home\lib\security\java.policy" (java.home is the installation path of the java runtime). or maybe you must change it in the server.policy file.

add this:

permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
Jane T's picture

Sorry any idea where that folder is on the appliance?

I found that

Using CATALINA_BASE:   /var/lib/tomcat5.5
Using CATALINA_HOME:   /usr/share/tomcat5.5
Using CATALINA_TMPDIR: /var/lib/tomcat5.5/temp
Using JRE_HOME:       /usr/lib/jvm/java-6-sun

 

So I went to /usr/lib/jvm/java-6-sun-1.6.0.16/lib via a link for jave-6-sun,  but there is no security folder in there.

Jane

Kai Niklas's picture

I don't have this appliance installed, so this is just a guess:

may be there is a policy file located in /etc/tomcatx.x/policy.d/ (x.x standing for the tomcat version installed)

 and add the two lines I mentioned above.

Jane T's picture

Thanks I found a file called 04webapps.policy and added the two lines you suggested and the error has changed I now get

 

org.xml.sax.SAXException: Internal Error: File /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd not found

Which is similar to the original error.    Sorry to be a pest,  but any idea on this one?

 

Thanks

Jane

Kai Niklas's picture

it seems your appliance has no connection to the internet, so alll the dtd files must be stored locally and referenced there (easiest way is to put them into the WEB-Inf Folder of your application - if existing - and pointing towards this)

Jane T's picture

It does have a connection,  I can ping google.com from SSH so I don't think that's the full cause, could it be another permissions issue perhaps?

Jane

Kai Niklas's picture

maybe somewhere in your application code you have a xml with a DOCTYPE Definition like:

<!DOCTYPE taglib web-jsptaglibrary_1_1.dtd>

or similar. Either try to delete (and see what happens, or put the web-jsptaglibrary_1_1.dtd to a file and reference it (in this case you put it to c:\mydtd:

<!DOCTYPE taglib  SYSTEM "file://C:/mydtd/web-jsptaglibrary_1_1.dtd">

Add new comment