correction to prior message - my very simple test app does not work
"without" xerces.
On 3/23/2009 10:25 AM, Paul Copeland wrote:
Hi Rick -
Thanks. As I mentioned the openjpa example hellojpa also works for me
WITHOUT the xerces jar. But my very simple test app does not work
with xerces. However, I found out that if I add these two properties
to my runtime ant task then I do NOT need the xerces jar.
<sysproperty key="javax.xml.parsers.SAXParserFactory"
value="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
<sysproperty key="javax.xml.parsers.DocumentBuilderFactory"
value="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
There is some classloader subtlety that I don't fully understand here.
- Paul
On 3/23/2009 8:17 AM, Rick Curtis wrote:
Paul -
I quickly looked through the javadoc for the
http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()
SAXParserFactory and I'm thinking that your problem is something
specific
to your environment.? I was able to run the examples on my box without
adding xercesImpl.jar to my classpath. With my JSE1.6 install,
SAXParserFactoryImpl is found in the [java_home]\lib\rt.jar.
-Rick
Paul Copeland wrote:
More info on this. I upgraded to Java SE 1.6.0_12 and I still need
the same jars (including xerces).
Using OpenJPA 1.2 -
1) Only two jars are needed to compile my (very simple) test
application -
- openjpa-1.2.0.jar
- geronimo-jta_1.1_spec-1.1.jar
2) At runtime (standalone, not in a container) I also need these jars
(plus JDBC driver of course) -
- serp-1.13.1.jar
- geronimo-jta_1.1_spec-1.1.jar
- commons-collections-3.2.jar
- commons-lang-2.1.jar
- xercesImpl.jar
3) When I build and run the apache-openjpa-1.2.0/examples/hellojpa
(Derby example) I do NOT need xerces.
....