Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Jeremy Bauer
Are you running a packaged service within the Axis2 app (an .aar archive) or is your service deployed as part of a separate web application? I was able to get an OpenJPA-based Axis2 service to work deployed within a standalone web application. I used Tomcat 5.5, Axis 2-1.4.1 and OpenJPA 1.2.0. I

RE: at org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManagerImpl.java:718)

2008-11-03 Thread Michael Vorburger
Hello again Pinaki et al, >> is there any interest from commiters if I can provide a test case >> which demonstrates and reproduces this? > Yes. Please post a reproducer test case. We ran into this again recently, and after some debugging and reducing a more complex model to a simple version tha

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Jeremy Bauer
I found this: http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Java/Apache_Tomcat/Q_23207819.html which indicated that you need to create a resource link between the data source you defined in the service.xml and resource ref in the web.xml, by defining this in the conte

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Sandhya Kishore
Hi Usually this exception "javax.naming.NameNotFoundException: Name java:comp is not bound in this Context" occurs in Tomcat when you have the same jar files in WEB-INF/lib and Tomcat's Common/lib folder.  This is the problem I faced long back when I was using tomcat and got resolved as so

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Håkon Sagehaug
Hi when I try to do this programmatically like this Context initCtx = null; Context envCtx; DataSource ds = null; try { initCtx = new InitialContext(); // envCtx = (Context) initCtx.lookup("java:/comp/env"); ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Jeremy Bauer
You may also need to define a resource reference in your web.xml. This link contains a good example on how to configure and use a data source: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html. The configuration part is what is important for OpenJPA, since it just looks

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Håkon Sagehaug
Hi I added resource configuration to the web.xml of axis2, and tried also to make a web.xml for the web service but neither of this worked. Any onther tips, it world be realy nice to get this to work for me cheers, Håkon 2008/11/3 Jeremy Bauer <[EMAIL PROTECTED]> > You may also need to define a

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Håkon Sagehaug
hi Some more information Since the ws is running inside axis2 i used this context tag configuration in server.xml 2008/11/3 Håkon Sagehaug <[EMAIL PROTECTED]> > Hi > > Yes I've tried this, but still gets the same message, any other hints ?? > > I use openjpa 1.2.0 , tomcat 5.5.26 and ax

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Håkon Sagehaug
Hi Yes I've tried this, but still gets the same message, any other hints ?? I use openjpa 1.2.0 , tomcat 5.5.26 and axis2 1.3 if this is of use cheers, Håkon 2008/11/3 Michael Dick <[EMAIL PROTECTED]> > Have you tried > java:comp/env/jdbc/workflowdb instead of > the property for openjpa.Connec

Re: Using datasource from tomcat with openjpa

2008-11-03 Thread Michael Dick
Have you tried java:comp/env/jdbc/workflowdb instead of the property for openjpa.ConnectionFactoryName? -mike On Mon, Nov 3, 2008 at 8:22 AM, Håkon Sagehaug <[EMAIL PROTECTED]>wrote: > Hi all, > > I've got a axis2 web service that is deployed in tomcat and talk to a > database using openjpa. Thi

Using datasource from tomcat with openjpa

2008-11-03 Thread Håkon Sagehaug
Hi all, I've got a axis2 web service that is deployed in tomcat and talk to a database using openjpa. This works fine when I just use the persistent xml to configure my db connection, but now I want to use tomcat to configure the datasource. Here is my set-up persistent.xml org.apache.openjpa