EJB programming & troubleshooting: Problem in Configuring MySql

  1. Problem in Configuring MySql (2 messages)

    Dear Friends i am using Mysql version 3.23.46-nt on Windows 2000, i made a database name as "prac" user raheel and password abcd12,

    i have copy the mysql-ds.xml from C:\jboss-3.2.1\docs\examples\jca to C:\jboss-3.2.1\server\default\deploy

    and change the default setting with my own setting of DB i-e

    <?xml version="1.0" encoding="UTF-8"?>

    <!-- ===================================================================== -->
    <!-- -->
    <!-- JBoss Server Configuration -->
    <!-- -->
    <!-- ===================================================================== -->

    <!-- $Id: mysql-ds.xml,v 1.1 2002/07/22 22:57:24 d_jencks Exp $ -->
    <!-- ==================================================================== -->
    <!-- Datasource config for MySQL using 2.0.11 driver -->
    <!-- ==================================================================== -->


    Now when i start the Jboss server it throws a long exception and what happen in my database prac the table jms_transactions is created but with only one field TXID
    i dont' no what i am doing wrong, i am new to JBoss and EJB's and any help will be very use full for me and all i can do pray for you..........

    with best regards...

    Threaded Messages (2)

  2. Problem in Configuring MySql[ Go to top ]

    This looks okay to me, but if you can send the exception list that would be great.
  3. suggestion[ Go to top ]

    my suggestion is to leave the hsql db be the DefaultDS, and then you can just reference the MySQLDS as a different name, unless you NEED to have mysql as default. you can still use mysql for all your needs and let hsql alone.

    put something like this into your login config if you want to use Mysql for container based auth (assuming you have Users & UserRoles tables)

       <application-policy name = "prac">
         <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
           <module-option name = "dsJndiName">java:/MySQLDS</module-option>
           <module-option name = "principalsQuery">select password from users where Username=?</module-option>
           <module-option name = "rolesQuery">select Role, 'Role' form userroles where Username=?</module-option>
           <module-option name = "debug">true</module-option>