Hi David, My first impression was the wording on the webpage was clear that JNDI was optional. However the exception I got led me to believe it was looking up the datasource name in JNDI.
Thanks JFR djencks wrote: > > > On Aug 25, 2008, at 7:34 PM, devdev wrote: > >> >> Hi David, >> >> On this page >> http://cwiki.apache.org/GMOxDOC21/datasource-connectionfactory-mdb-and-jpa.html >> it seems the <jta-data-source>SampleTxDatasource</jta-data-source> is >> referring to a JNDI entry. However in the connector file >> <name>SampleTxDatasource</name> is not a JNDI entry. How do we map >> the >> connector reource adapter to a JNDI. I checked the connector XM >> schema and >> dont see anuthing close. > > I added a sentence to try to clarify that jpa setup in geronimo does > not use jndi in any way. The jta-data-source element must match > exactly a connection factory name in a connector plan. This has > nothing to do with any use of the connection factory in any resource- > ref or @Resource injection. > > Can you think of wording that would make this clearer? > > thanks > david jencks > >> >> >> Thanks >> JFR >> >> Caused by: <openjpa-1.0.2-r420667:627158 nonfatal general error> >> org.apache.openjpa.persistence.PersistenceException: There was an >> error >> duing JNDI lookup of the name "mysql.DataSource". >> at >> org >> .apache >> .openjpa >> .kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java: >> 207) >> at >> org >> .apache >> .openjpa >> .kernel >> .DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142) >> at >> org >> .apache >> .openjpa >> .persistence >> .EntityManagerFactoryImpl >> .createEntityManager(EntityManagerFactoryImpl.java:192) >> at >> org >> .apache >> .openjpa >> .persistence >> .EntityManagerFactoryImpl >> .createEntityManager(EntityManagerFactoryImpl.java:145) >> at >> org >> .apache >> .openjpa >> .persistence >> .EntityManagerFactoryImpl >> .createEntityManager(EntityManagerFactoryImpl.java:56) >> >> >> >> djencks wrote: >>> >>> >>> On Aug 18, 2008, at 4:16 PM, ericp56 wrote: >>> >>>> >>>> I must be missing something easy. >>> >>> I don't see the connection between jndi + jpa and the error you >>> show.... >>> If you haven't already I'd look at >>> http://cwiki.apache.org/GMOxDOC21/datasource-connectionfactory-mdb-and-jpa.html >>> to check if the persistence.xml is configured correctly. >>> >>> hope this helps >>> david jencks >>> >>>> >>>> >>>> I have a JNDI data source configured in Geronimo. >>>> >>>> I am using JPA in my application. >>>> >>>> Here's my persistence.xml : >>>> >>>> <persistence version="1.0" >>>> xmlns="http://java.sun.com/xml/ns/persistence >>>> " >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence >>>> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> >>>> <persistence-unit name="ctimssql" transaction-type="JTA"> >>>> <jta-data-source>jdbc/CTIMSSQL2</jta-data-source> >>>> <class>com.twcable.ivr.resources.CustomerCallHistory</class> >>>> </persistence-unit> >>>> </persistence> >>>> >>>> I cranked up logging to ALL, and this is all I see: >>>> 19:13:24,914 INFO [Transaction] TX Required: Started transaction >>>> [EMAIL PROTECTED] >>>> 19:13:24,914 INFO [Transaction] TX Required: Committing transaction >>>> [EMAIL PROTECTED] >>>> 19:13:24,914 ERROR [Axis2WebServiceContainer] Exception occurred >>>> while >>>> trying to invoke service method doService() >>>> org.apache.axis2.AxisFault: An error was detected during JAXWS >>>> processing >>>> at >>>> org >>>> .apache >>>> .geronimo.axis2.ejb.EJBInterceptor.intercept(EJBInterceptor.java:88) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> etc. >>>> >>>> Any suggestions? >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/JPA-and-JNDI-tp19041772s134p19041772.html >>>> Sent from the Apache Geronimo - Users mailing list archive at >>>> Nabble.com. >>>> >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/JPA-and-JNDI-tp19041772s134p19154925.html >> Sent from the Apache Geronimo - Users mailing list archive at >> Nabble.com. >> > > > -- View this message in context: http://www.nabble.com/JPA-and-JNDI-tp19041772s134p19166443.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
