0 Replies Latest reply: Oct 12, 2007 6:19 AM by Jitendra Chopra RSS

    MySql datasource configuration issue:Urgent

    Jitendra Chopra Newbie

      Hi All,

      I am trying to create MySql1.5 datasource.

      I have done following steps

      1) Mysql-ds.xml


      <local-tx-datasource>

      <jndi-name>MysqlDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/test</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>root</user-name>
      password
      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>0</idle-timeout-minutes>
      <track-statements/>
      <!-- Use the security domain defined in conf/login-config.xml -->
      <security-domain>MySqlDbRealm</security-domain>
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      <type-mapping>mySQL</type-mapping>

      jboss.jca:service=LocalTxCM,name=MysqlDS
      </local-tx-datasource>





      2) Login.xml
      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal"></module-option>
      <module-option name = "userName">root</module-option>
      <module-option name = "password">password</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MysqlDS</module-option>
      </login-module>

      </application-policy>

      3): standradjbosscmp-jdbc.xml

      java:/MysqlDS

      4):standardjaws.xml

      java:/MysqlDS
      <type-mapping>mysql</type-mapping>

      5) : jboss-cmp-jdbc.xml



      java:/MysqlDS

      <datasource-mapping>mySQL</datasource-mapping>



      <create-table>true</create-table>

      <remove-table>false</remove-table>

      <pk-constraint>true</pk-constraint>

      <preferred-relation-mapping>

      foreign-key

      </preferred-relation-mapping>




      I am getting following error while deploying




      15:35:00,502 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=customerJndi,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MysqlDS; - nested thr
      owable: (javax.naming.NameNotFoundException: MysqlDS not bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.init(JDBCEntityBridge.java:139)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:42
      0)



      Please suggest for me if you any idea.

      It is very urgent.

      Thanks in advace.