Hello,
I have OpenJPA working on Tomcat 6 using
Persistence.createEntityManagerFactory, which is unmanaged.
Now I'd like to use the managed environment, but I am having a problem with
the JNDI resource.
I am not deploying a WAR, but individual files, so I can't use
META-INF/context.xml (I'm led to believe).
I have placed the resource in CATALINA's context.xml:
<Resource name="bean/OpenJPAEMF" auth="Container"
type="org.apache.openjpa.persistence.OpenJPAEntityManagerFactory"
factory="org.apache.naming.factory.BeanFactory"/>
In my code, I have:
Context initCtx = new InitialContext();
emf = (OpenJPAEntityManagerFactory)
initCtx.lookup("java:comp/env/bean/OpenJPAEMF");
which raises:
java.lang.InstantiationException:
org.apache.openjpa.persistence.OpenJPAEntityManagerFactory
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.naming.factory.BeanFactory.getObjectInstance(BeanFactory.java:143)
I am relatively "green" at this. Can someone point me in the right
direction?
If that direction is through a 300 page manual, can you provide an example
instead?:blush:
Thanks,
Eric
--
View this message in context:
http://www.nabble.com/Configuring-OpenJPA%2C-need-help-tp18341039p18341039.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]