quality@glassfish.java.net

Re: JDBC resource resolution problem?

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Thu, 23 Apr 2009 10:30:31 +0200

Kedar,


Thanks for the reply. I tried deploying the war on V2 and there I do not get the
NamingException for the datasource after I modifed my persistence.xml so it
looks for jdbc/astro again. I get loads of other errors since I am trying JEE6
and not JEE5 however :-)

I have attached the V3 domain.xml to this mail.


Thanks, Wouter

On Wed, Apr 22, 2009 at 11:41:36AM -0700, Kedar Mhaswade wrote:
> Wouter,
>
> Can you attach the domain.xml? And no, I don't think renaming is necessary.
>
> (BTW, did you try this on V2 as well)?
>
> Thanks,
> Kedar
> Wouter van Reeven wrote:
> >Hmm, when I rename the JDBC resource to astro (i.e. without the jdbc part)
> >it
> >also fails, even though it shows up in the list-jdbc-resources command
> >
> >$ ./bin/asadmin list-jdbc-resources
> >astro
> >jdbc/__TimerPool
> >jdbc/__default
> >
> >Any clues? Thanks!
> >
> >
> >Wouter
> >
> >On Wed, Apr 22, 2009 at 08:03:28PM +0200, To quality wrote:
> >>Hi all,
> >>
> >>
> >>Today I started testing the JPA 2.0 / EJB 3.1 support of GFv3 b45. I
> >>created a
> >>connection pool that pings ok and then created a JDBC resource called
> >>
> >>jdbc/astro
> >>
> >>which shows up with the list-jdbc-resources command:
> >>
> >>$ ./bin/asadmin list-jdbc-resources
> >>jdbc/__TimerPool
> >>jdbc/astro
> >>jdbc/__default
> >>
> >>However, when I deploy an application with this persistence.xml
> >>
> >><?xml version="1.0" encoding="UTF-8"?>
> >><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="ObservationPlannerAndLoggerPU"
> >> transaction-type="JTA">
> >> <jta-data-source>jdbc/astro</jta-data-source>
> >> <properties>
> >> <property name="eclipselink.logging.level" value="FINE" />
> >> </properties>
> >> </persistence-unit>
> >></persistence>
> >>
> >>When I deploy the application with this persistence.xml, I get this
> >>exception:
> >>
> >>[#|2009-04-22T19:58:31.604+0200|SEVERE|glassfish|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=15;_ThreadName=Thread-1;|Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
> >>java.lang.RuntimeException: javax.naming.NamingException: Lookup failed
> >>for 'jdbc/astro' in SerialContext [Root exception is
> >>javax.naming.NameNotFoundException: astro not found]
> >> at
> >> org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:109)
> >>
> >>Any idea if this is a problem with my persistence.xml or with GFv3 b45?
> >>
> >>
> >>Thanks, Wouter
> >>
> >>--
> >>There are 10 kinds of people in the world. Those that understand
> >>the binary system and those that don't.
> >>[Unknown Source]
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
> >>For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>

-- 
King Arthur: [after Arthur's cut off both of the Black Knight's arms] Look, you
stupid Bastard. You've got no arms left.
Black Knight: Yes I have.
King Arthur: *Look*!
Black Knight: It's just a flesh wound.
[Monty Python and the Holy Grail]