Solved

Servlet XML Output Problem

Posted on 2001-08-06
4
247 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
4 Comments
 

Accepted Solution

by:
jasonbrome earned 100 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now