You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Balint Fulop <fu...@hotmail.com> on 2003/01/29 20:36:59 UTC

Xalan servlet samples on Tomcat

Hello!

Please could anyone point why my setup is malfunctioning? Description as 
follows.
Thanks everyone in advance.


Problem:
I am trying to run the servlet samples that came with Xalan, but none of 
them has given any positive result so far.


The setup:

WinXP Pro, Java SDK 1.3 from IBM, Tomcat 4.1.18 (the full version), and 
Xalan-J 2.4.1
I have enabled the Invoker Servlet, and Root Context on Tomcat, turned on 
Servlet Reloading, and set the Java_Home path, the casspaths for the .jar 
files that came with Xalan, and the servlet.jar file that came with Tomcat 
(and the current dir (.) and my development dir as well.)
I have succesfully tested the setup with a few simple servlets, including 
ones that use packages and utilities.


The webapp:

I have created a directory called testapp1, which includes all the dirs, 
that the Root has, plus a classes and lib directory in Web-inf.
I have placed the .jar files that came with Xalan in the lib dir within 
testapp1/WEB-INF, compiled the sample java files, and put them in the 
classes dir. The xml, and xsl sample files went into the testapp1 root dir.


The errors:

I am getting all kinds of error messages. The SimpleXSLTServlet gives an 
FileNotFoundException: trax.xml error, even though I have changed, and 
recomplid, and updated the java code, and class and it does not even has the 
term 'trax.xml' in it !!
For the UseStylesheetParamServlet sample I am getting: 
java.lang.VerifyError: Class 
org/apache/xerces/impl/XMLNSDocumentScannerImpl$NSContentDispatcher is 
subclass of final class 
org/apache/xerces/impl/XMLDocumentScannerImpl$ContentDispatcher
etc. etc.


I have went through the maillist archives, goolge, ask.com, but I could not 
resolve the errors. I have practically zero knowledge of Java, I just want 
to use the Xalan samples to do simple transforms, and queries for my friends 
weblog. The samples would more that adequate for the job.


Thanks for the help and your time,


Balint

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


Re: Xalan servlet samples on Tomcat

Posted by Christophe Galerne <ch...@earthlink.net>.
Balint Fulop wrote:

> I am getting all kinds of error messages. The SimpleXSLTServlet gives an 
> FileNotFoundException: trax.xml error, even though I have changed, and 
> recomplid, and updated the java code, and class and it does not even has 
> the term 'trax.xml' in it !!

The most likely problem is that you are picking up the servlet.SimpleXSLTServlet 
  that is in xalanservlet.jar.
Remove xalanservlet.jar and xalansamples.jar from testapp1/WEB-INF/lib.
You could also change the package name with your own. ex
fulop.testapp1.servlet.

HTH,
Christophe


RE: Xalan servlet samples on Tomcat

Posted by Gary L Peskin <ga...@firstech.com>.
If you have changed SimpleXSLTServlet to not look for trax.xml and it's
still looking for trax.xml, you are executing a different version of
SimpleXSLTServlet.  Your UseStylesheetParamServlet also indicates a
CLASSPATH problem and it seems that you are mixing components from different
versions of Xerces.

This is really a Tomcat question since you haven't even invoked XalanJ yet.

What jar files are in testapp1/WEB-INF/lib?

Also, please insert the line

  (new EnvironmentCheck()).checkEnvironment(yourPrintWriter);

into your servlet after creating a PrintWriter.  This will help us see what
your environment looks like.

HTH,
Gary

> -----Original Message-----
> From: Balint Fulop [mailto:fuli42@hotmail.com] 
> Sent: Wednesday, January 29, 2003 11:37 AM
> To: xalan-j-users@xml.apache.org
> Subject: Xalan servlet samples on Tomcat
> 
> 
> Hello!
> 
> Please could anyone point why my setup is malfunctioning? 
> Description as 
> follows.
> Thanks everyone in advance.
> 
> 
> Problem:
> I am trying to run the servlet samples that came with Xalan, 
> but none of 
> them has given any positive result so far.
> 
> 
> The setup:
> 
> WinXP Pro, Java SDK 1.3 from IBM, Tomcat 4.1.18 (the full 
> version), and 
> Xalan-J 2.4.1
> I have enabled the Invoker Servlet, and Root Context on 
> Tomcat, turned on 
> Servlet Reloading, and set the Java_Home path, the casspaths 
> for the .jar 
> files that came with Xalan, and the servlet.jar file that 
> came with Tomcat 
> (and the current dir (.) and my development dir as well.)
> I have succesfully tested the setup with a few simple 
> servlets, including 
> ones that use packages and utilities.
> 
> 
> The webapp:
> 
> I have created a directory called testapp1, which includes 
> all the dirs, 
> that the Root has, plus a classes and lib directory in 
> Web-inf. I have placed the .jar files that came with Xalan in 
> the lib dir within 
> testapp1/WEB-INF, compiled the sample java files, and put them in the 
> classes dir. The xml, and xsl sample files went into the 
> testapp1 root dir.
> 
> 
> The errors:
> 
> I am getting all kinds of error messages. The 
> SimpleXSLTServlet gives an 
> FileNotFoundException: trax.xml error, even though I have 
> changed, and 
> recomplid, and updated the java code, and class and it does 
> not even has the 
> term 'trax.xml' in it !!
> For the UseStylesheetParamServlet sample I am getting: 
> java.lang.VerifyError: Class 
> org/apache/xerces/impl/XMLNSDocumentScannerImpl$NSContentDispa
> tcher is 
> subclass of final class 
> org/apache/xerces/impl/XMLDocumentScannerImpl$ContentDispatcher
> etc. etc.
> 
> 
> I have went through the maillist archives, goolge, ask.com, 
> but I could not 
> resolve the errors. I have practically zero knowledge of 
> Java, I just want 
> to use the Xalan samples to do simple transforms, and queries 
> for my friends 
> weblog. The samples would more that adequate for the job.
> 
> 
> Thanks for the help and your time,
> 
> 
> Balint
> 
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
> http://join.msn.com/?page=features/virus
>