users@glassfish.java.net

Re: V2 -> AS 8.2: jdbc resource NameNotFoundException

From: <glassfish_at_javadesktop.org>
Date: Mon, 17 Mar 2008 11:48:34 PST

I fixed the problem by doing the following:

1. changing my web.xml from:
[i]...
    <resource-ref>
        <res-ref-name>jdbc/oracle</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
...[/i]
to:
[i]...

    <resource-ref>
        <res-ref-name>java:comp/env/jdbc/oracle</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
...[/i]

2. Changing jndi.name property in my app from java:comp/env/jdbc/oracle to jdbc/oracle.


I don't know why these names worked in Sun Application Server 9.1 but needed to be swapped in 8.2. For some reason the opposite names worked.

-Matt
[Message sent by forum member 'phife757' (phife757)]

http://forums.java.net/jive/thread.jspa?messageID=264457