[JBoss-dev] Unable able to find the jndi: no valid JNDI binding

newbie-gero dudgeon82 at yahoo.com.sg
Mon Feb 16 09:52:31 EST 2009


Greetings,

currently i doing my school project using the jboss-4.0.3SP1, spring and
hibernate. My codes are just to save a new user into a database. However
when i run my codes in jboss, it hit this error:

org.jboss.deployment.DeploymentException: Error during deploy; - nested
throwable: (javax.naming.NamingException: resource-ref: java:graffitiDB has
no valid JNDI binding. Check the jboss-web/resource-ref.)

This is what i set up in the mssql-ds.xml:
<datasources>
  <local-tx-datasource>
    <jndi-name>graffitiDB</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/graffiti</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>data</user-name>
    <password>base</password>
   <metadata>
         <type-mapping>mySQL</type-mapping>
    </metadata>

  </local-tx-datasource>

</datasources>

Inside the web.xml, this is what i put for the <resource-ref>

<resource-ref>
		<res-ref-name>jdbc/graffitiDB</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
		<res-sharing-scope>Shareable</res-sharing-scope>
	</resource-ref>

My codes can be download from here: 
http://www.nabble.com/file/p22038655/source.zip source.zip 

Thanks for the help in advance :)
-- 
View this message in context: http://www.nabble.com/Unable-able-to-find-the-jndi%3A-no-valid-JNDI-binding-tp22038655p22038655.html
Sent from the JBoss - Dev mailing list archive at Nabble.com.




More information about the jboss-development mailing list