Provider org.apache.xalan.processor.TransformerFactoryImpl not found

Hi guys,

I am using DWR on my J2EE project. It works fine in my machine but my clients report that there is a problem (exception). Below is the stacktrace. After google them, I found that DWR requires xalan.jar. Will adding the xalan.jar to the classpath solve this problem? I can't really test it as it works fine in my machine.

Is there any other cause for this error?

----- Root Cause -----
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
      at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
      at uk.ltd.getahead.dwr.convert.DOMConverter.<init>(DOMConverter.java:157)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at java.lang.Class.newInstance0(Class.java:350)
      at java.lang.Class.newInstance(Class.java:303)
      at uk.ltd.getahead.dwr.impl.DefaultConverterManager.addConverterType(DefaultConverterManager.java:54)
      at uk.ltd.getahead.dwr.impl.DefaultConfiguration.loadConverter(DefaultConfiguration.java:165)
      at uk.ltd.getahead.dwr.impl.DefaultConfiguration.loadInits(DefaultConfiguration.java:119)
      at uk.ltd.getahead.dwr.impl.DefaultConfiguration.addConfig(DefaultConfiguration.java:86)
      at uk.ltd.getahead.dwr.impl.DefaultConfiguration.addConfig(DefaultConfiguration.java:66)
      at uk.ltd.getahead.dwr.AbstractDWRServlet.init(AbstractDWRServlet.java:110)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
      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)


Thanks
David
LVL 16
suprapto45Asked:
Who is Participating?
 
Mayank SAssociate Director - Product EngineeringCommented:
If you can open the JAR file and check that it contains the TransformerFactoryImpl class at a relative location of org/apache/xalan/processor, it should work, unless something else is wrong.
0
 
suprapto45Author Commented:
Yep, it is in xalan.jar. So it should work, shouldn't it?

David
0
 
Mayank SAssociate Director - Product EngineeringCommented:
I would hope so, unless, like I said - something else is wrong (like maybe it needs some other classes too, etc)
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
suprapto45Author Commented:
That's cool.

Well, the client will only test it by tommorow so please be patient :)

David
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Sure, no problem ;-)

>> It works fine in my machine

Just check your class-path and see what JARs you have there (also in your JRE) - the difference will tell you the ones which can be needed. You should typically do a test deployment on a system having exactly the same configuration as the target machine too (which the client will have).
0
 
sudhakar_koundinyaCommented:
I don't know  JSP engine at your client's place. But If they are using Tomcat, I suggest you to ask them to put these files under <tomcat>/common/endorsed folder

xml-apis.jar or xmlParserAPIs.jar
xalan.jar

And I think this is same for other JSP engines also (With some different directory structure).

Regards
Sudhakar Chavali
0
 
sudhakar_koundinyaCommented:
0
 
suprapto45Author Commented:
;).

Thanks mayankeagle and sudhakar_koundinya

David
0
 
Mayank SAssociate Director - Product EngineeringCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.