[jboss-user] [JNDI/Naming/Network] - The JNDI problem when deploying the JPetStore with jboss-4.0

jzhuqlfeixia do-not-reply at jboss.com
Mon Oct 30 22:38:59 EST 2006


Hi,bodies:)
I'm study the J2EE recently.  I choosed the JPetStore-5.0, and I want to deploy it with the JBoss. But I got this error:

--- MBeans waiting for other MBeans ---

ObjectName: jboss.web.deployment:war=jpetstore.war,id=255707780
  State: FAILED
  Reason: org.jboss.deployment.DeploymentException: Error during deploy; - neste
d throwable: (javax.naming.NamingException: resource-ref: jdbc/jpetstore1 has no
 valid JNDI binding. Check the jboss-web/resource-ref.)

But I have already done some config follow the guide in some articles: 
Beacuse I use the MySql,so I modified the file "JPetStore-5.0\src\properties\database.properties" as follow :
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/jpetstore
username=root
password=password

Then I rebuilded the JPetStore with ant, and then copied the new "jpetstore.war" to %JBOSS_HOME%\server\default\deploy.

Then I copied the mysql-connector-java-3.1.12-bin.jar to the ?JBOSS_HOME?\server\default\lib.
I also copied a "mssql-ds.xml" to %JBOSS_HOME%\server\default\deploy and modified it as follow:

  <local-tx-datasource>
    <jndi-name>jpetstore1</jndi-name>      //(or JDBC:jpetstore1)
    <connection-url>jdbc:mysql://127.0.0.1:3306/jpetstore</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    password
...
  </local-tx-datasource>



I config the JNDI name time and time again, but it always gets error.
Could some one tell me what should I do? 
Thanks!

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

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



More information about the jboss-user mailing list