participate


Java Technology & XML - Xml Exception with JDK1.5
<<   Back to Forum  |   Give us Feedback Topics: « Previous | Next »
This topic has 19 replies on 2 pages.    1 | 2 | Next »
Archana678
Posts:137
Registered: 7/31/03
Xml Exception with JDK1.5   
Jul 28, 2004 9:16 AM

 
I wrote some code using java 1.4.2 on a linux machine and it works fine .

Now I am using the same code using JDK 1.5 on a slorais machine.And it is raising following exception

javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found


Does any one have any idea?
 
dvohra09
Posts:3,589
Registered: 4/4/01
Re: Xml Exception with JDK1.5   
Jul 28, 2004 9:20 AM (reply 1 of 19)  (In reply to original post )

 
Set the TransformerFactory system property.
System.setProperty(javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl);
 
dvohra09
Posts:3,589
Registered: 4/4/01
Re: Xml Exception with JDK1.5   
Jul 28, 2004 9:21 AM (reply 2 of 19)  (In reply to original post )

 
System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl");

 
christoph76
Posts:1
Registered: 3/25/01
Re: Xml Exception with JDK1.5   
Oct 18, 2004 11:34 AM (reply 3 of 19)  (In reply to #2 )

 
with JDK 5.0 final you have to set the property as follows:

System.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");

The class is located in the rt.jar file. The package name of the class was changed (according to this source: http://java.sun.com/webservices/whatsnew.html)

Why is this property not set automatically with JDK 5.0? Could anybody confirm this, please?
 
eTouchard
Posts:1
Registered: 8/25/04
Re: Xml Exception with JDK1.5   
Nov 9, 2004 5:47 AM (reply 4 of 19)  (In reply to #3 )

 
Hi

I've got the same problem with jdk 1.5 and tomcat 5.0 and I've found the problem

in tomcat java is called with the following argument:
-Djava.endorsed.dirs="X:\my_app\Portal\tomcat\common\endorsed"

In this directory you find two jar files: xercesImpl.jar and xml-apis.jar needed by tomcat and that must be loaded before all xmsl stuff present in the jdk (1.4 naming problem). And in the file xml-apis.jar the TransformerFactoryImpl is set to "org.apache.xalan.processor.TransformerFactoryImpl".

The solution: remove the file xml-apis.jar from the directory.

For other application, just check this file or dom3-xml-apis.jar in your class path
 
bvbhavsar
Posts:11
Registered: 11/13/00
Re: Xml Exception with JDK1.5   
May 30, 2006 11:47 PM (reply 5 of 19)  (In reply to #4 )

 
I was getting the same exception/error when I tried to run my web application in Tomcat 5.0.x with JDK 1.5.

JDK 1.5 doesn't have xalan libraries and hence it throws this exception.

Copy the xalan.jar and serializer.jar, xercesImpl.jar, xml-apis.jar (this are needed as there are dependencies from xalan.jar) into the tomcat_home/common/endorsed folder.

If some of the jars are already present, there is no need to overwrite the files.

You can get the required files from the following website:
http://xml.apache.org/xalan-j/
 
carcio
Posts:1
Registered: 10/4/06
Re: Xml Exception with JDK1.5   
Oct 4, 2006 3:48 AM (reply 6 of 19)  (In reply to #3 )

 
Hi christoph76,
Thanks, your solution worked fine for me:
System.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
Ciao Carcio

Message was edited by:
carcio
 
andre_v_r
Posts:1
Registered: 3/19/07
Re: Xml Exception with JDK1.5   
Mar 19, 2007 1:19 AM (reply 7 of 19)  (In reply to #5 )

 
Hi bvbhavsar
your solution worked for me - thanks so much
 
chli
Posts:17
Registered: 4/25/06
Re: Xml Exception with JDK1.5   
Apr 3, 2007 6:38 AM (reply 8 of 19)  (In reply to #3 )

 
christoph76's solutions works for me under JDK5.0 and tomcat5.0.

Thanks.
 
Viandor
Posts:1
Registered: 4/23/07
Re: Xml Exception with JDK1.5   
Apr 23, 2007 7:08 AM (reply 9 of 19)  (In reply to #8 )

 
This problem occurs with tomcat 5.0.28, but not with tomcat 5.5.23.
 
georgezb
Posts:1
Registered: 5/6/07
Re: Xml Exception with JDK1.5   
May 6, 2007 11:48 AM (reply 10 of 19)  (In reply to #9 )

 
This Exception occur with JDK1.5.0_11 and tomcat 5.5.23 in mine,
I do not find the xalan.jar in comcat path :common\endorsed also.

thanks
 
duncanjw
Posts:1
Registered: 6/2/07
Re: Xml Exception with JDK1.5   
Jun 2, 2007 10:25 AM (reply 11 of 19)  (In reply to #5 )

 
Hi bvbhavsar

Thanks for posting this. Worked a treat.
 
sunandcar
Posts:1
Registered: 6/29/07
Re: Xml Exception with JDK1.5   
Jun 29, 2007 7:52 AM (reply 12 of 19)  (In reply to #11 )

 
By removing xml-apis.jar file from the following directory, helped resolve the issue.

CATALINA_HOME\common\endorsed


Any better solution for this problem?
 
hastingr
Posts:1
Registered: 4/21/06
Re: Xml Exception with JDK1.5   
Sep 11, 2007 6:29 AM (reply 13 of 19)  (In reply to original post )

 
Is there a properties file where this can be set? For example, jaxp.properties?
 
Sunstorm
Posts:7
Registered: 10/18/06
Re: Xml Exception with JDK1.5   
Oct 11, 2007 9:12 AM (reply 14 of 19)  (In reply to #5 )

 
Such a small change fixes lot many things, Thanks alot again!!
I had to download xalan-j_2_7_0-bin-2jars though I already downloaded xalan-j_2_7_0-bin, because it contained serializer.jar file which was also to be copied to CATALINA_HOME\common\endorsed .

Then I execute the index.html that came along with Struts2 blank.war on the server and voila ! I had Struts 2 configured and working in Eclipse 3.2.1 with Apache Tomcat 5.5.

Thanks again !
 
This topic has 19 replies on 2 pages.    1 | 2 | Next »
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 58
  • Guests : 111

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums