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