?
Solved

Servlet XML Output Problem

Posted on 2001-08-06
4
Medium Priority
?
264 Views
Last Modified: 2013-11-24
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
Comment
Question by:jkb2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Accepted Solution

by:
jasonbrome earned 400 total points
ID: 6357538
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
 
LVL 1

Author Comment

by:jkb2
ID: 6359348
Beautiful. I was beating my head against the wall on this one. Thanks
0
 
LVL 5

Expert Comment

by:lwinkenb
ID: 8937307
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question