• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Servlet XML Output Problem

I am working on a class that will allow me to write XML documents to standard text output. I have a class with a method PostDoc() that performs the following...

try {
 TransformerFactory tFactory = TransformerFactory.newInstance();
 Transformer t = tFactory.newTransformer();
 t.transform(new DOMSource(document),new StreamResult(new File(strFileName)));
   } catch(Exception e) {...}

When I run this from a test command line application the classes perform properly but when I try and load this via a servlet on Tomcat I get the error
 "java.lang.SecurityException: sealing violation"

I am at a loss. Is this a java problem or a tomcat configuration problem? Any idea on how I correct the problem?

TIA
John
0
jkb2
Asked:
jkb2
1 Solution
 
jasonbromeCommented:
Tomcat contains a portion of the classes found in  Xalan.jar.  

To resolve this issue, all you need to do is ensure that the JAXP jars (xalan.jar, jaxp.jar and crimson.jar) are defined first, before the Tomcat jars, in the classpath.
0
 
jkb2Author Commented:
Beautiful. I was beating my head against the wall on this one. Thanks
0
 
lwinkenbCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept comment by jasonbrome as answer.
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
lwinkenb
EE Cleanup Volunteer
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now