You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Phillip Rhodes <sp...@rhoderunner.com> on 2007/04/27 16:39:07 UTC

RE: Another TCK build issue... (JDK vs XSLT?)

I saw this on the dev list and ran into the same issue and wanted to post the fix here so that it could be done in the jackrabbit maven build files.


Junit tests with jackrabbit fail with a Provider org.apache.xalan.processor.TransformerFactoryImpl not found error

This only happens when
a) repo does not exist.  Same test works if repo exists on filesystem
b) invoked via junit/maven.  junit via eclipse works fine


Add the following to you maven pom file:

		<dependency>
			<groupId>xalan</groupId>
			<artifactId>xalan</artifactId>
			<version>2.7.0</version>
			<scope>test</scope>
		</dependency>

Re: Another TCK build issue... (JDK vs XSLT?)

Posted by Julian Reschke <ju...@gmx.de>.
Phillip Rhodes wrote:
> This definitely worked for me when I got that exact same error.
> Did you revert back any other changes you have made to maven or your jdk?  A lot of the "fixes" out there for this error required thoses changes and did not work.  
> 
> I got this error (that you have now with a ClassCastException) when I put some jars into the jre/lib/endorsed directory.  You should double check and revert anything you may have done previously to fix this.
> 
> Phillip

For the record: when I was replying, I apparently had the dependency in 
the wrong place. After moving it, I got something else, in this case an 
IncompatibleClassChangeError.

Hours later, I finally had the idea to purge my local maven repository, 
and -- finally -- everything is fine (yes, even without the dependency).

Best regards, Julian

Re: Another TCK build issue... (JDK vs XSLT?)

Posted by Phillip Rhodes <sp...@rhoderunner.com>.
This definitely worked for me when I got that exact same error.
Did you revert back any other changes you have made to maven or your jdk?  A lot of the "fixes" out there for this error required thoses changes and did not work.  

I got this error (that you have now with a ClassCastException) when I put some jars into the jre/lib/endorsed directory.  You should double check and revert anything you may have done previously to fix this.

Phillip

----- Original Message -----
From: "Julian Reschke" <ju...@gmx.de>
To: users@jackrabbit.apache.org
Sent: Saturday, April 28, 2007 6:49:29 AM (GMT-0500) America/New_York
Subject: Re: Another TCK build issue... (JDK vs XSLT?)

Phillip Rhodes wrote:
> I saw this on the dev list and ran into the same issue and wanted to post the fix here so that it could be done in the jackrabbit maven build files.
> 
> 
> Junit tests with jackrabbit fail with a Provider org.apache.xalan.processor.TransformerFactoryImpl not found error
> 
> This only happens when
> a) repo does not exist.  Same test works if repo exists on filesystem
> b) invoked via junit/maven.  junit via eclipse works fine
> 
> 
> Add the following to you maven pom file:
> 
> 		<dependency>
> 			<groupId>xalan</groupId>
> 			<artifactId>xalan</artifactId>
> 			<version>2.7.0</version>
> 			<scope>test</scope>
> 		</dependency>
> 

That doesn't seem to help, I'm still getting...:

java.lang.ClassCastException
         at javax.xml.transform.TransformerFactory.newInstance(Unknown 
Source)
         at 
org.apache.jackrabbit.core.SessionImpl.exportSystemView(SessionImpl.j
ava:1199)
         at 
org.apache.jackrabbit.test.api.ExportSysViewTest.doTestWithStream(Exp
ortSysViewTest.java:137)
         at 
org.apache.jackrabbit.test.api.ExportSysViewTest.testExportSysView_st
ream_session_skipBinary_recurse(ExportSysViewTest.java:96)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at junit.framework.TestCase.runTest(TestCase.java:154)

So why do we have a Xalan dependency anyway? Can't we rely on whatever 
the JDK has?

Best regards, Julian




Re: Another TCK build issue... (JDK vs XSLT?)

Posted by Julian Reschke <ju...@gmx.de>.
Phillip Rhodes wrote:
> I saw this on the dev list and ran into the same issue and wanted to post the fix here so that it could be done in the jackrabbit maven build files.
> 
> 
> Junit tests with jackrabbit fail with a Provider org.apache.xalan.processor.TransformerFactoryImpl not found error
> 
> This only happens when
> a) repo does not exist.  Same test works if repo exists on filesystem
> b) invoked via junit/maven.  junit via eclipse works fine
> 
> 
> Add the following to you maven pom file:
> 
> 		<dependency>
> 			<groupId>xalan</groupId>
> 			<artifactId>xalan</artifactId>
> 			<version>2.7.0</version>
> 			<scope>test</scope>
> 		</dependency>
> 

That doesn't seem to help, I'm still getting...:

java.lang.ClassCastException
         at javax.xml.transform.TransformerFactory.newInstance(Unknown 
Source)
         at 
org.apache.jackrabbit.core.SessionImpl.exportSystemView(SessionImpl.j
ava:1199)
         at 
org.apache.jackrabbit.test.api.ExportSysViewTest.doTestWithStream(Exp
ortSysViewTest.java:137)
         at 
org.apache.jackrabbit.test.api.ExportSysViewTest.testExportSysView_st
ream_session_skipBinary_recurse(ExportSysViewTest.java:96)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at junit.framework.TestCase.runTest(TestCase.java:154)

So why do we have a Xalan dependency anyway? Can't we rely on whatever 
the JDK has?

Best regards, Julian