[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-dev] Bug# 270863: jaxp.properties settings for running SE JPA tests fail on SUN JDK when configured for server testing
|
Hi,
Recently over the past couple weeks I have noticed that I am getting
JAXP transformer exceptions when attempting to use a SUN JDK either the
SUN one or the one bundled with WebLogic, I discussed this with our
SDO/XML group and targeted the jaxp property.
This happens on a new machine running XP and SUN 1.6.0_xx, I have
been using the IBM J9 JVM as my JAVA_HOME with no problems for the past
2 months but would like to use the SUN JDK again.
My question is - has anyone else had issues with a
javax.xml.transform.TransformerFactoryConfigurationError on the provider
org.apache.xalan.processor.TransformerFactoryImpl, if they are also
running server tests on the side?
I raised the following to track this issue
JPA Test build.xml: jaxp.properties for SE testing should not be
overwritten by server version
http://bugs.eclipse.org/270863
2 Issues:
------------
This turns out to be a conflict with configuring the tests to run on
a specific application server and running in SE mode - the script may
need to be partitioned into Server/SE sections.
A secondary issue of SVN rev 3681 is that any settings in
jaxp.properties is overwritten by the eclipselink.jpa.test/build.xml script
>Temporary fix:
-----------------
The temp fix is to comment out the
javax.xml.transform.TransformerFactory property in jre/lib/jaxp.properties.
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
However, I noticed that this file was being rewritten by the build
since the following change on 16 March 2009 - there is no bug # attached
to the diff in fisheye - so I don't know all the reasons why we need to
rewrite this file, but from the comments in build.xml it looks like the
change is for WebLogic and WebSphere. But WebSphere runs fine using the
jaxp processor [com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl].
See:
http://fisheye2.atlassian.com/browse/eclipselink/trunk/jpa/eclipselink.jpa.test/build.xml?r=3681#l815
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=3681
<target name="generate-report">
<!-- WebLogic and WebSphere servers require specific
jaxp.properties for generating report -->
--> <delete file="${env.JAVA_HOME}/jre/lib/jaxp.properties"
failonerror="false"/>
--> <copy todir="${env.JAVA_HOME}/jre/lib"
file="${eclipselink.jpa.test}/resource/${server.name}/jaxp.properties"
failonerror="false"/>
<junitreport todir="${eclipselink.jpa.test}/${report.dir}">
>Full fix:
----------
It seems that the variable ${server.name} that is set in your
test.properties is being used to target the appropriate jaxp.properties
to copy from resource to jre/lib.
In my case it is set to the following (which is why i can only run
tests in WebSphere since I started defining this variable)
server.name=websphere
I don't think that generating test reports for non-server testing
should be affected by this server flag - the script needs to be modified
into server/non-server mode here.
>Working
@rem
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
>Failing
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
C:\view_w34r1a>ant test-jpa
Buildfile: build.xml
[echo] trunk.build.location = 'C:\view_w34r1a'
[echo] env.CLASSPATH = '${env.CLASSPATH}'
[echo] java.class.path =
'c:\opt\ant171\lib\ant-launcher.jar;C:\opt\ant171\lib\ant-antlr.jar;C:\opt\ant171\lib\ant-apache-bcel.jar
;C:\opt\ant171\lib\ant-apache-bsf.jar;C:\opt\ant171\lib\ant-apache-log4j.jar;C:\opt\ant171\lib\ant-apache-oro.jar;C:\opt\ant171\lib\ant-apac
he-regexp.jar;C:\opt\ant171\lib\ant-apache-resolver.jar;C:\opt\ant171\lib\ant-commons-logging.jar;C:\opt\ant171\lib\ant-commons-net.jar;C:\o
pt\ant171\lib\ant-jai.jar;C:\opt\ant171\lib\ant-javamail.jar;C:\opt\ant171\lib\ant-jdepend.jar;C:\opt\ant171\lib\ant-jmf.jar;C:\opt\ant171\l
ib\ant-jsch.jar;C:\opt\ant171\lib\ant-junit.jar;C:\opt\ant171\lib\ant-launcher.jar;C:\opt\ant171\lib\ant-netrexx.jar;C:\opt\ant171\lib\ant-n
odeps.jar;C:\opt\ant171\lib\ant-starteam.jar;C:\opt\ant171\lib\ant-stylebook.jar;C:\opt\ant171\lib\ant-swing.jar;C:\opt\ant171\lib\ant-testu
til.jar;C:\opt\ant171\lib\ant-trax.jar;C:\opt\ant171\lib\ant-weblogic.jar;C:\opt\ant171\lib\ant.jar;C:\opt\ant171\lib\junit-4.1.jar;C:\opt\a
nt171\lib\junit-4.2.jar;C:\opt\ant171\lib\junit-4.3.1.jar;C:\opt\ant171\lib\junit-ext-param.jar;C:\opt\ant171\lib\junit.jar;C:\opt\ant171\li
b\junit4-ext-param.jar;C:\opt\ant171\lib\junit4-ext-pb4.jar;C:\opt\ant171\lib\xercesImpl.jar;C:\opt\ant171\lib\xml-apis.jar;c:\jdk1.6.0\lib\
tools.jar'
[echo] user.home = 'C:\Documents and Settings\mfobrien'
[echo] Loading user properties from: 'C:\Documents and
Settings\mfobrien/build.properties'
[echo] oracle.extensions.depend.dir = 'extension.oracle.lib.external'
[echo] extensions.depend.dir =
'C:\view_w34r1a/../extension.lib.external'
[echo] junit.lib = 'extension.oracle.lib.external/junit.jar'
[echo] Loading default properties from:
'C:\view_w34r1a/build.properties'
[echo] java.version='1.6.0_07'
[echo] jdbc.driver.jar='${jdbc.driver.jar}'
test-jpa:
clean-test:
[delete] Deleting directory
C:\view_w34r1a\jpa\eclipselink.jpa.test\reports
[delete] Deleting directory C:\view_w34r1a\jpa\eclipselink.jpa.test\run
[mkdir] Created dir: C:\view_w34r1a\jpa\eclipselink.jpa.test\reports
[mkdir] Created dir: C:\view_w34r1a\jpa\eclipselink.jpa.test\run
run-test:
[echo] Running test on jdbc:oracle:thin:@10.156.52.98:1521:orcl
Warning: Reference run.classpath has not been set at runtime, but was
found during
build file parsing, attempting to resolve. Future versions of Ant may
support
referencing ids defined in non-executed targets.
Warning: Reference compile.path has not been set at runtime, but was
found during
build file parsing, attempting to resolve. Future versions of Ant may
support
referencing ids defined in non-executed targets.
[junit] [EL Warning]: ServerSession(21868771)--Ignoring default
serialization on element [private org.eclipse.persistence.testing.models
.jpa.fieldaccess.advanced.Employee$Gender
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Employee.gender]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Employee]
since a @Convert is specified.
[junit] [EL Warning]: ServerSession(21868771)--Ignoring default
serialization on element [private java.lang.String
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.gender]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer]
since a @Convert is specified.
[junit] [EL Warning]: ServerSession(21868771)--Optimistic locking
metadata is already defined on the descriptor for the entity [class or
g.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer].
Ignoring version specification on element [private int
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.version].
[junit] [EL Warning]: ServerSession(21868771)--Ignoring default
serialization on element [private java.util.Map
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.creditCards]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer]
since a @Convert is specified.
[junit] [EL Warning]: ServerSession(21868771)--Ignoring default
serialization on element [private java.util.Map
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.creditCards]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer]
since a @Convert is specified.
[junit] [EL Warning]: 2009-04-01
14:06:56.437--ServerSession(24257622)--Ignoring default serialization on
element [private org.eclipse.p
ersistence.testing.models.jpa.fieldaccess.advanced.Employee$Gender
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Employee.
gender] within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Employee]
since a @Convert is specified.
[junit] [EL Warning]: 2009-04-01
14:06:56.437--ServerSession(24257622)--Ignoring default serialization on
element [private java.lang.Str
ing
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.gender]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer]
since a @Convert is specified.
[junit] [EL Warning]: 2009-04-01
14:06:56.437--ServerSession(24257622)--Optimistic locking metadata is
already defined on the descriptor
for the entity [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer].
Ignoring version specification on element [private int
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.version].
[junit] [EL Warning]: 2009-04-01
14:06:56.437--ServerSession(24257622)--Ignoring default serialization on
element [private java.util.Map
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.creditCards]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer]
since a @Convert is specified.
[junit] [EL Warning]: 2009-04-01
14:06:56.437--ServerSession(24257622)--Ignoring default serialization on
element [private java.util.Map
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer.creditCards]
within entity class [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Buyer]
since a @Convert is specified.
[junit] java.lang.reflect.InvocationTargetException
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
[junit] at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
[junit] Caused by: java.lang.reflect.InvocationTargetException
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at
org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
[junit] at
org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
[junit] ... 6 more
[junit] Caused by:
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
[junit] at
javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)
[junit] at
org.eclipse.persistence.platform.xml.jaxp.JAXPTransformer.<init>(JAXPTransformer.java:51)
[junit] at
org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform.newXMLTransformer(JAXPPlatform.java:135)
[junit] at
org.eclipse.persistence.oxm.XMLMarshaller.initialize(XMLMarshaller.java:104)
[junit] at
org.eclipse.persistence.oxm.XMLMarshaller.<init>(XMLMarshaller.java:99)
[junit] at
org.eclipse.persistence.oxm.XMLContext.createMarshaller(XMLContext.java:297)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter.write(XMLEntityMappingsWriter.java:53)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter.write(XMLEntityMappingsWriter.java:41)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.reloadXMLEntityMappingsObject(XMLEntityMappings.java:671)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.reloadMappedSuperclass(XMLEntityMappings.java:653)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.ORMetadata.reloadMappedSuperclass(ORMetadata.java:365)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.addPotentialMappedSuperclass(EntityAccessor.java:183)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.discoverMappedSuperclassesAndInheritanceParents(EntityAccessor.java:273)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.preProcess(EntityAccessor.java:549)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage1(MetadataProject.java:959)
[junit] at
org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
[junit] at
org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:297)
[junit] at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:834)
[junit] at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:110)
[junit] at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:159)
[junit] at
org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:144)
[junit] FATAL ERROR in native method: processing of -javaagent failed
[junit] at
org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:145)
[junit] ... 12 more
[junit] Exception in thread "main"
[junit] Running
org.eclipse.persistence.testing.tests.jpa.FullRegressionTestSuite
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test
org.eclipse.persistence.testing.tests.jpa.FullRegressionTestSuite FAILED
(crashed)
generate-report:
--> [delete] Deleting: c:\jdk1.6.0\jre\lib\jaxp.properties
--> [copy] Copying 1 file to c:\jdk1.6.0\jre\lib
[junitreport] Processing
C:\view_w34r1a\jpa\eclipselink.jpa.test\reports\TESTS-TestSuites.xml to
C:\view_w34r1a\jpa\eclipselink.jpa.test\reports\junit-noframes.html
[junitreport] Loading stylesheet
jar:file:/C:/opt/ant171/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-noframes.xsl
BUILD FAILED
C:\view_w34r1a\build.xml:583: The following error occurred while
executing this line:
C:\view_w34r1a\jpa\eclipselink.jpa.test\build.xml:513: The following
error occurred while executing this line:
C:\view_w34r1a\jpa\eclipselink.jpa.test\build.xml:818:
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
Total time: 9 seconds
C:\view_w34r1a>
thank you
/michael