Datasource conection problem

i have create a web application with sun java studio creator 2 and i have deploy it successfuly in Sun Java Aplication Server 8.1

At my application i make a database conection and i call this java:comp/env/jdbc/test

i have made with admin tool of SJAS a connection pool

and jdbc resource jdbc/test

if i run my application i get an error like this

Message ID:

Could not find datasource

Complete Message

java:comp/env/jdbc/test

javax.naming.NameNotFoundException: No object bound to name java:comp/env/jdbc/test

what i supose to do to see my webapp the datasource ?

thanks in advance

[657 byte] By [Maravelias] at [2007-11-26 7:41:36]
# 1

You have to look at your deployment descriptor files, i.e web.xml and sun-web.xml. You should have something like:

<resource-ref>

<res-ref-name>jdbc/test</res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>

<res-sharing-scope>Shareable</res-sharing-scope>

</resource-ref>

<resource-ref>

<res-ref-name>jdbc/test</res-ref-name>

<jndi-name>jdbc/test</jndi-name>

<default-resource-principal>

<name>user_name</name>

<password>user_password</password>

</default-resource-principal>

</resource-ref>

For a concrete example on how jdbc application descriptors should look like see: <appserver_root/samples/jdbc/apps/simple>.

Sultal at 2007-7-6 19:48:41 > top of Java-index,Application & Integration Servers,Application Servers...