XSLT TransformerConfiguration Error!! Tomcat

Hi,

I am calling the following

String dlReturnResult = new String();

StringWriter dstringWriter = new StringWriter();

PrintWriter dprintWriter = new PrintWriter(dstringWriter);

try {

TransformerFactory dltFactory = TransformerFactory.newInstance();

System.out.println("Reached Check Point 1");

Transformer dltransform = dltFactory.newTransformer(new StreamSource(dlStyleSheet));

System.out.println("Reached Check Point 2");

dltransform.transform(new StreamSource(dlRecord), new StreamResult(dstringWriter));

System.out.println("Reached Check Point 3");

dlReturnResult = dstringWriter.toString();

}catch(Exception exc){System.out.println("Exception Caught::"+exc);}

When I call the method using tomcat3.2.2 I get an exception which looks like

Reached Check Point 1

Exception Caught::javax.xml.transform.TransformerConfigurationException: javax.x

ml.transform.TransformerConfigurationException: javax.xml.transform.TransformerE

xception: org.xml.sax.SAXException: Namespace not supported by SAXParser

The very same code runs perfectly well without using tomcat!

Is there something that I am missing. Why would tomcat scream SAXParser when I am not using it here! Do I have to include any jar files in tomcats directory?

Any pointers would be very helpful

Thanks

Prashanth

[1444 byte] By [varaprashanth] at [2007-9-26 5:37:35]
# 1
Have you checked this already ? http://forums.java.sun.com/thread.jsp?forum=34&thread=164204
lk555 at 2007-7-1 13:49:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Thanks. That was exactly what the problem was. The lib folder in Tomcat contained jaxp.jar and parser.jar because of which it threw out a run-time error!

I am however facing another problem now.

I have a set of files in a package being called by tomcat when a servlet is accessed. It so happens that I can compile and run this perfectly well on one machine, but get a run-time error when I compile and run the files on another machine. The run time error I get is

Internal Servlet Error:

java.lang.IllegalAccessError: try to access method dlnetSearchInfc.DisplayResults.DLSearchANDXMLDisplay.dlGetInfo(Ljava/io/PrintWriter;Ljava/util/ArrayList;)V from class dlnetSearchInfc.dlnetSearch

at dlnetSearchInfc.dlnetSearch.searchButtonClicked(dlnetSearch.java:41)

at dlnetSearchInfc.Search.doGet(Search.java:78)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

at org.apache.tomcat.core.Handler.service(Handler.java:287)

at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)

at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)

at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

at java.lang.Thread.run(Thread.java:484)

It does not really make sense. I get no problems on one machine and I get this on another. I checked the classpath and bothe of them are identical. Any pointers on where I should be looking at to fix such a problem?

Thanks

Prashanth

varaprashanth at 2007-7-1 13:49:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...