Paul-
<br>If you still are unable to figure out what's going on, feel free to zip up 
your simple test app and I'll take a look at it.
<br><br>-Rick
<br><blockquote class="quote light-black dark-border-color"><div class="quote 
light-border-color">
<div class="quote-author" style="font-weight: bold;">Paul Copeland wrote:</div>
<div class="quote-message shrinkable-quote">Hi Rick -
<br><br>Thanks. As I mentioned the openjpa example hellojpa also works for me 
<br>WITHOUT the xerces jar. &nbsp;But my very simple test app does not work 
with 
<br>xerces. &nbsp;However, I found out that if I add these two properties to my 
<br>runtime ant task then I do NOT need the xerces jar.
<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;sysproperty 
key=&quot;javax.xml.parsers.SAXParserFactory&quot; 
<br>value=&quot;com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl&quot;/&gt;
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;sysproperty 
key=&quot;javax.xml.parsers.DocumentBuilderFactory&quot; 
<br>value=&quot;com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl&quot;/&gt;
<br><br>There is some classloader subtlety that I don't fully understand here.
<br><br>- Paul
<br><br>On 3/23/2009 8:17 AM, Rick Curtis wrote:
<br>&gt; Paul -
<br>&gt; I quickly looked through the javadoc for the 
<br>&gt; <a 
href="http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance("
 target="_top" 
rel="nofollow">http://java.sun.com/javase/6/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance(</a>)
<br>&gt; SAXParserFactory &nbsp;and I'm thinking that your problem is something 
specific
<br>&gt; to your environment.? I was able to run the examples on my box without
<br>&gt; adding xercesImpl.jar to my classpath. With my JSE1.6 install,
<br>&gt; SAXParserFactoryImpl is found in the [java_home]\lib\rt.jar.
<br>&gt;
<br>&gt; -Rick
<br>&gt;
<br>&gt; Paul Copeland wrote:
<br>&gt; &nbsp; 
<br>&gt;&gt; More info on this. &nbsp;I upgraded to Java SE 1.6.0_12 and I 
still need the 
<br>&gt;&gt; same jars (including xerces).
<br>&gt;&gt;
<br>&gt;&gt; Using OpenJPA 1.2 -
<br>&gt;&gt;
<br>&gt;&gt; 1) Only two jars are needed to compile my (very simple) test 
application -
<br>&gt;&gt;
<br>&gt;&gt; - openjpa-1.2.0.jar
<br>&gt;&gt; - geronimo-jta_1.1_spec-1.1.jar
<br>&gt;&gt;
<br>&gt;&gt; 2) At runtime (standalone, not in a container) I also need these 
jars
<br>&gt;&gt; (plus JDBC driver of course) -
<br>&gt;&gt;
<br>&gt;&gt; - serp-1.13.1.jar
<br>&gt;&gt; - geronimo-jta_1.1_spec-1.1.jar
<br>&gt;&gt; - commons-collections-3.2.jar
<br>&gt;&gt; - commons-lang-2.1.jar
<br>&gt;&gt; - xercesImpl.jar
<br>&gt;&gt;
<br>&gt;&gt; 3) When I build and run the apache-openjpa-1.2.0/examples/hellojpa 
<br>&gt;&gt; (Derby example) I do NOT need xerces.
<br>&gt;&gt; ....
<br>&gt;&gt;
<br>&gt;&gt; &nbsp; &nbsp; 
<br>&gt;
<br>&gt; &nbsp; 
<br></div>
</div></blockquote>

-- 
View this message in context: 
http://n2.nabble.com/Questions-about--classpath-for-OpenJPA-tp2504942p2522760.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to