users@glassfish.java.net

Re: persistence.xml file

From: Joerg Gippert <jgippert_at_online.de>
Date: Wed, 7 May 2008 15:55:52 +0200

Hello,

it looks like the datasource "wineappDS" cannot be found. Are you sure, this
is the same name that is stored under the Glassfish JDBC settings? Go to the
Glassfish admin page and check under Resources->JDBC->JDBC Resources if the
same name appears under the JNDI Name column. E.g if it says there
jdbc/sample it shold say <jta-data-source>jdbc/sample</jta-data-source> in
your persistence.xml file. I also noticed, that you have a ":" after jdbc in
your datasource's JNDI name. Is that correct?

Hope, that help.

Regards,
Joerg


----- Original Message -----
From: <glassfish_at_javadesktop.org>
To: <users_at_glassfish.dev.java.net>
Sent: Wednesday, May 07, 2008 3:52 PM
Subject: Re: persistence.xml file


> Hello,
>
> I do have the same problem but i used the Oracle backend
>
> My persistence.xml file as follow:
>
> <?xml version="1.0" encoding="windows-1252" ?>
> <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"
> xmlns="http://java.sun.com/xml/ns/persistence"
> version="1.0">
> <persistence-unit name="Chapter03-Unit">
>
> <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
> <jta-data-source>jdbc:/wineappDS</jta-data-source>
> <class>com.apress.ejb3.ch03.Address</class>
> <class>com.apress.ejb3.ch03.Customer</class>
> <class>com.apress.ejb3.ch03.CustomerOrder</class>
> </persistence-unit>
> </persistence>
>
>
> But when I deploy it will display the following error at server log:
>
> [#|2008-04-30T21:25:33.812+0800|WARNING|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=10;_ThreadName=main;_RequestID=4aa27c16-fd44-4505-a611-80321b149252;|javax.naming.NameNotFoundException:
> wineappDS not found
> java.lang.RuntimeException: javax.naming.NameNotFoundException: wineappDS
> not found
>
>
> Thanks and regards,
> Jeff
> [Message sent by forum member 'ncjt98' (ncjt98)]
>
> http://forums.java.net/jive/thread.jspa?messageID=273135
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>