users@glassfish.java.net

Re: Junit test case works only in jdbc/__default datasource

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Tue, 22 Nov 2011 15:27:25 -0800

Did you register jdbc/mydb with GlassFish? Which GlassFish version are
you using?

forums_at_java.net wrote:
> I wrote a testcase with embedded GlassFish for testing an EJB.
>
> When I tried to test it using jdbc/mydb as datasource (in
> persistence.xml) I
> got the following error
>
> Exception while preparing the app : Invalid resource : jdbc/mydb__pm
> com.sun.appserv.connectors.internal.api.ConnectorRuntimeException:
> Invalid
> resource : jdbc/mydb__pm
> When I changed the datasource to jdbc/__default with the same
> connection pool
> as of jdbc/mydb it worked perfect.
>
> Why is it so? What is the difference between these two datasources?
>
>
> --
>
> [Message sent by forum member 'abinmd']
>
> View Post: http://forums.java.net/node/866706
>
>