[jboss-user] [JNDI/Naming/Network] - Cannot connect to the JNDI: No valid JNDI mapping

chongming do-not-reply at jboss.com
Mon Feb 16 21:18:32 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.)

I tried to find the jboss-web folder but i cant find. Am i on the roght track? This is what i have set up in my application:

This is what i set up in the mssql-ds.xml: 
 
  <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> 
    base 
    
         <type-mapping>mySQL</type-mapping> 
     

  </local-tx-datasource> 


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

Thanks for the help in advance :)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210556#4210556

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210556



More information about the jboss-user mailing list