[jboss-user] [Beginners Corner] - Re: Could not find datasource: jdbc/jndi-name

jaikiran do-not-reply at jboss.com
Sun Dec 23 10:42:47 EST 2007


I see that you have specified < use-java-context> as false in your datasource xml file and you also have specified the < jndi-name> value as "jndi-name".  So your datasource is now available in the global JNDI namespace with the jndiname "jndi-name". So the persistence.xml should contain:

<jta-data-source>jndi-name</jta-data-source>

Your stacktrace also points out to one other exception:

anonymous wrote : javax.naming.NoInitialContextException: Need to specify class name in environment or system property
  | , or as an applet parameter, or in an application resource file:  java.naming.factory.initial

You will have to place a jndi.properties file in the client's (TestClient.java) classpath to get rid of this exception. For more details, have a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=Getquotjavax.naming.NoInitialContextExceptionquot

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

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



More information about the jboss-user mailing list