0 Replies Latest reply on Dec 16, 2004 12:51 PM by yang guo

    Need help on Setting MySql as Default DS

    yang guo Newbie

      Hi all,

      I am using JBoss 3.0.x, Database: mySql, application development using JBuilder X

      I have followed the instruction to set mysql as default DS by modifying the file mysql-service.xml.

      and have changed the following xml code

      <attribute name="JndiName">MySqlDS</attribute>
      
       <attribute name="ManagedConnectionFactoryProperties">
       <properties>
       <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/testing</config-property>
       <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
       <!--set these only if you want only default logins, not through JAAS -->
       <config-property name="UserName" type="java.lang.String"></config-property>
       <config-property name="Password" type="java.lang.String"></config-property>
       </properties>
      
       </attribute>
      

      to
      <attribute name="JndiName">DefaultDS</attribute>
      
       <attribute name="ManagedConnectionFactoryProperties">
       <properties>
       <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/testing</config-property>
       <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
       <!--set these only if you want only default logins, not through JAAS -->
       <config-property name="UserName" type="java.lang.String"></config-property>
       <config-property name="Password" type="java.lang.String"></config-property>
       </properties>
      
       </attribute>
      


      (I have also modified the standardjaws.xml and standardjbosscmp-jboss.xml files)

      However, when I restart the Jboss server, i get the following exception

      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: DataSource; - nested throwable: (javax.naming.NameNotFoundException:

      So everytime when i restart jboss server, I have to redeploy my j2ee application into Jboss server using Jbuilder X.

      Is it normal or did I misconfigure anything ?

      your reply is greatly appreaciate