You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ravi Tharakan <ra...@gmail.com> on 2006/07/19 15:53:36 UTC
TransformerFactoryConfigurationError
Hi. I'm having some trouble deploying a webapp I have installed on my local
hard drive to my Tomcat server. When I try to use some of the features on my
app, I get the following errors:
javax.servlet.ServletException: Servlet execution threw an exception
*root cause*
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
uk.ac.ebi.pride.web.controller.search.ServeExperimentAction.initTransformer(ServeExperimentAction.java:485)
uk.ac.ebi.pride.web.controller.search.ServeExperimentAction.execute(ServeExperimentAction.java:380)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
The log readout is
2006-07-18 15:49:40 StandardWrapperValve[action]: Servlet.service() for
servlet action threw exception
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
at
uk.ac.ebi.pride.web.controller.search.ServeExperimentAction.initTransformer(
ServeExperimentAction.java:485)
at uk.ac.ebi.pride.web.controller.search.ServeExperimentAction.execute(
ServeExperimentAction.java:380)
at org.apache.struts.action.RequestProcessor.processActionPerform(
RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(
RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java
:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(
StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(
StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java
:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
Does anyone know what this means?
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
Never mind. It turned out to be that for some reason, Tomcat is distributed
without some of the xalan jars. I had to download the xalan.jar and
serializer.jar, xercesImpl.jar, xml-apis.jar files from the xalan website
and copy them into the tomcat_home/common/endorsed folder. So I guess it was
just a problem with tomcat.
On 7/19/06, Christopher Schultz < chris@christopherschultz.net> wrote:
>
> Ravi,
>
> > So... how do I get it to run with a servlet?
>
> You would have to create a new class that extends HttpServlet, implement
> the "doGet" and/or "doPost" methods and then put your code into there.
>
> It might be easier to just stick a JSP file into your webapp's deploy
> directory and try to hit that, directly.
>
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
Sorry, really don't understand. I would just create a text file, rename it
to .jsp, put it in the webapp directory and try to open the page?
On 7/19/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Ravi,
>
> > So... how do I get it to run with a servlet?
>
> You would have to create a new class that extends HttpServlet, implement
> the "doGet" and/or "doPost" methods and then put your code into there.
>
> It might be easier to just stick a JSP file into your webapp's deploy
> directory and try to hit that, directly.
>
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ravi,
> So... how do I get it to run with a servlet?
You would have to create a new class that extends HttpServlet, implement
the "doGet" and/or "doPost" methods and then put your code into there.
It might be easier to just stick a JSP file into your webapp's deploy
directory and try to hit that, directly.
-chris
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
So... how do I get it to run with a servlet?
On 7/19/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Ravi,
>
> > Sorry, this is going over my head. Is there a way to look at the system
> > properties without having to write a JSP?
>
> There is:
>
> public class Env
> {
> public static void main(String[] args)
> {
> System.getProperties().list(System.out);
> }
> }
>
> Unfortunately, you can't run this from within Tomcat without something
> like a JSP or servlet (or even a ConcetxtListener) to get it going.
>
> I'm operating under the assumption that there is some other component
> that is (possibly incorrectly) setting this default -- that it may not
> show itself if you run this short program from the command line.
>
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ravi,
> Sorry, this is going over my head. Is there a way to look at the system
> properties without having to write a JSP?
There is:
public class Env
{
public static void main(String[] args)
{
System.getProperties().list(System.out);
}
}
Unfortunately, you can't run this from within Tomcat without something
like a JSP or servlet (or even a ConcetxtListener) to get it going.
I'm operating under the assumption that there is some other component
that is (possibly incorrectly) setting this default -- that it may not
show itself if you run this short program from the command line.
-chris
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
Sorry, this is going over my head. Is there a way to look at the system
properties without having to write a JSP?
On 7/19/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Ravi,
>
> > The TransformerFactoryImpl.class is there, but it's path is
> > com/sun/org/apache/xalan/internal/xsltc/trax/
> >
> > Do you think this is the problem?
>
> Probably.
>
> There's a system property that dictates which implementations are chosen
> for SAX and DOM parsers, as well as XSLT processors. It's odd that it's
> being set to something that is invalid.
>
> I don't remember what those system properties are, but you can get the
> current list at any time by doing this:
>
> System.getProperties().list(System.out);
>
> This will dump the current system properties to standard output. If you
> put this into a JSP and hit it with a web browser, it will dump the
> system properties, and you can check them out.
>
> Then, you can see which one is pointing to the wrong XSLT processor and
> possibly correct it. (Just start Java with
> -
> Dthat.system.property=com.sun.org.apache.xalan.internal.trax.TransformerFactoryImpl
> ,
> or whatever seems most appropriate given the current value of that
> system property).
>
> If you can't find a system property with that (incorrect) class being
> mentioned, then it's probably some kind (unfortunately) incorrect
> default value. In that case, you'll have to start looking around on the
> web for sites that describe how to set the default.
>
> Good luck,
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ravi,
> The TransformerFactoryImpl.class is there, but it's path is
> com/sun/org/apache/xalan/internal/xsltc/trax/
>
> Do you think this is the problem?
Probably.
There's a system property that dictates which implementations are chosen
for SAX and DOM parsers, as well as XSLT processors. It's odd that it's
being set to something that is invalid.
I don't remember what those system properties are, but you can get the
current list at any time by doing this:
System.getProperties().list(System.out);
This will dump the current system properties to standard output. If you
put this into a JSP and hit it with a web browser, it will dump the
system properties, and you can check them out.
Then, you can see which one is pointing to the wrong XSLT processor and
possibly correct it. (Just start Java with
-Dthat.system.property=com.sun.org.apache.xalan.internal.trax.TransformerFactoryImpl,
or whatever seems most appropriate given the current value of that
system property).
If you can't find a system property with that (incorrect) class being
mentioned, then it's probably some kind (unfortunately) incorrect
default value. In that case, you'll have to start looking around on the
web for sites that describe how to set the default.
Good luck,
-chris
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
The TransformerFactoryImpl.class is there, but it's path is
com/sun/org/apache/xalan/internal/xsltc/trax/
Do you think this is the problem?
On 7/19/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Ravi,
>
> > I don't really know enough about the command line to know what you mean
> by
> > that command, but when I tried copying and pasting it told me '$' not
> > recognized.
>
> Oh, sorry about that. The "$" is a UNIX thing. Your use of Winzip is
> just as good.
>
> > However, I did open up the rt.jar in winzip and I did see some files
> called
> > XSLT, etc. Is that what you mean?
>
> Perhaps. You're looking for the file
> "org/apache/xalan/processor/TransformerFactoryImpl.class" inside that
> JAR file. If it's not in there, check any other files in that same
> directory (or also the "ext" directory within JAVA_HOME/jre/lib) to see
> if they have that file.
>
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ravi,
> I don't really know enough about the command line to know what you mean by
> that command, but when I tried copying and pasting it told me '$' not
> recognized.
Oh, sorry about that. The "$" is a UNIX thing. Your use of Winzip is
just as good.
> However, I did open up the rt.jar in winzip and I did see some files called
> XSLT, etc. Is that what you mean?
Perhaps. You're looking for the file
"org/apache/xalan/processor/TransformerFactoryImpl.class" inside that
JAR file. If it's not in there, check any other files in that same
directory (or also the "ext" directory within JAVA_HOME/jre/lib) to see
if they have that file.
-chris
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
I don't really know enough about the command line to know what you mean by
that command, but when I tried copying and pasting it told me '$' not
recognized.
However, I did open up the rt.jar in winzip and I did see some files called
XSLT, etc. Is that what you mean?
On 7/19/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Ravi,
>
> > Hm. I did a full computer search for that file and I don't seem to have
> it.
> > Is there a place I can download it?
>
> It might not be called "xalan.jar". It might have a version number
> embedded in it or something like that. Try running this command (or
> something similar if you're on win32):
>
> $ unzip $JAVA_HOME/jre/lib/rt.jar | grep TransformerFactoryImpl
>
> ...and see if you get anything like that. If you /do/, then something is
> very wrong, and I won't be much help. All I could suggest is that you
> reinstall the JDK. :(
>
> If it isn't there, it might be worth finding out why Java is trying to
> use that particular implementation of an XSLT processor. Perhaps some
> other software you are using is configuring JAXP (that's the stuff in
> javax.xml.*) to use Xalan, but not providing the library.
>
> If that's the case, you can get Xalan from http://xalan.apache.org/.
> Download it and install the JAR file in your webapp's WEB-INF/lib
> directory.
>
> Good luck,
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ravi,
> Hm. I did a full computer search for that file and I don't seem to have it.
> Is there a place I can download it?
It might not be called "xalan.jar". It might have a version number
embedded in it or something like that. Try running this command (or
something similar if you're on win32):
$ unzip $JAVA_HOME/jre/lib/rt.jar | grep TransformerFactoryImpl
...and see if you get anything like that. If you /do/, then something is
very wrong, and I won't be much help. All I could suggest is that you
reinstall the JDK. :(
If it isn't there, it might be worth finding out why Java is trying to
use that particular implementation of an XSLT processor. Perhaps some
other software you are using is configuring JAXP (that's the stuff in
javax.xml.*) to use Xalan, but not providing the library.
If that's the case, you can get Xalan from http://xalan.apache.org/.
Download it and install the JAR file in your webapp's WEB-INF/lib directory.
Good luck,
-chris
Re: TransformerFactoryConfigurationError
Posted by Ravi Tharakan <ra...@gmail.com>.
Hm. I did a full computer search for that file and I don't seem to have it.
Is there a place I can download it?
On 7/19/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Ravi,
>
> > Hi. I'm having some trouble deploying a webapp I have installed on my
> local
> > hard drive to my Tomcat server. When I try to use some of the features
> > on my
> > app, I get the following errors:
> >
> > javax.xml.transform.TransformerFactoryConfigurationError: Provider
> > org.apache.xalan.processor.TransformerFactoryImpl not found
>
> Looks like you are missing Xalan, which is odd, since JAXP is supposed
> to give you a previously-configured XSLT engine -- which usually gets
> configured by the XSLT engine itself.
>
> Make sure that you have xalan.jar in one of these places:
>
> * WEB-INF/lib in your webapp
> * TOMCAT_HOME/common/lib
> * JAVA_HOME/jre/lib/ext
>
> I'm running Java 1.4.2_10, and my JAVA_HOME/jre/lib/rt.jar /itself/
> contains the Xalan XSLT processor. I dunno about JDK 1.5, but for
> 1.4.2_10, it's packaged with the JDK.
>
> <shrug>
>
> -chris
>
>
>
>
>
Re: TransformerFactoryConfigurationError
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ravi,
> Hi. I'm having some trouble deploying a webapp I have installed on my local
> hard drive to my Tomcat server. When I try to use some of the features
> on my
> app, I get the following errors:
>
> javax.xml.transform.TransformerFactoryConfigurationError: Provider
> org.apache.xalan.processor.TransformerFactoryImpl not found
Looks like you are missing Xalan, which is odd, since JAXP is supposed
to give you a previously-configured XSLT engine -- which usually gets
configured by the XSLT engine itself.
Make sure that you have xalan.jar in one of these places:
* WEB-INF/lib in your webapp
* TOMCAT_HOME/common/lib
* JAVA_HOME/jre/lib/ext
I'm running Java 1.4.2_10, and my JAVA_HOME/jre/lib/rt.jar /itself/
contains the Xalan XSLT processor. I dunno about JDK 1.5, but for
1.4.2_10, it's packaged with the JDK.
<shrug>
-chris