persistence@glassfish.java.net

Re: Exception while preparing the app : Invalid resource : jdbc

From: Ludovic Champenois <ludovic.champenois_at_oracle.com>
Date: Tue, 22 Mar 2011 21:38:13 -0700

On 3/22/11 7:19 PM, Eve Pokua wrote:
> Hello,
>
> After deploying using DB MS sql server 2000,
>
> I got deployment issues so after reading some other post, I thought
> it had something to do with my driver JTDS 1.2.5, I switched to using
> the Javadb DB below are my resources and per unit--
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish
> Application Server 3.1 Resource Definitions//EN"
> "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
> <resources>
> <jdbc-connection-pool allow-non-component-callers="false"
> associate-with-thread="false" connection-creation-retry-attempts="0"
> connection-creation-retry-interval-in-seconds="10"
> connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
> connection-validation-method="auto-commit"
> datasource-classname="org.apache.derby.jdbc.ClientDataSource"
> fail-all-connections="false" idle-timeout-in-seconds="300"
> is-connection-validation-required="false"
> is-isolation-level-guaranteed="true"
> lazy-connection-association="false" lazy-connection-enlistment="false"
> match-connections="false" max-connection-usage-count="0"
> max-pool-size="32" max-wait-time-in-millis="60000"
> name="derby_net_hairworldDB_appPool"
> non-transactional-connections="false" pool-resize-quantity="2"
> res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1"
> steady-pool-size="8" validate-atmost-once-period-in-seconds="0"
> wrap-jdbc-objects="false">
> <property name="serverName" value="localhost"/>
> <property name="portNumber" value="1527"/>
> <property name="databaseName" value="test"/>
> <property name="User" value="app"/>
> <property name="Password" value="app"/>
> <property name="URL" value="jdbc:derby://localhost:1527/test"/>
> <property name="driverClass" value="org.apache.derby.jdbc.ClientDriver"/>
> </jdbc-connection-pool>
> <jdbc-resource enabled="true" jndi-name="jdbc_/test"
> object-type="user" pool-name="derby_net_test_appPool"/>
> </resources>
>
>
> persistence unit --
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="2.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_2_0.xsd">
> <persistence-unit name="test1" transaction-type="JTA">
> <jta-data-source>jdbc/_test</jta-data-source>
> <properties>
> <property name="eclipselink.ddl-generation"
> value="drop-and-create-tables"/>
> </properties>
> </persistence-unit>
> </persistence>
>
>
> I still get the error -
I see 2 different names there:
jdbc/_test
and
jdbc_/test

Typo error?

Ludo