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 -->
<!-- ==================================================================== -->
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/prac</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>raheel</user-name>
<password>abcd12</password>
</local-tx-datasource>
</datasources>
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...
Raheel
-
Problem in Configuring MySql (2 messages)
- Posted by: Raheel haider
- Posted on: August 11 2003 12:58 EDT
Threaded Messages (2)
- Problem in Configuring MySql by Tim Allen MO on August 11 2003 13:35 EDT
- suggestion by jason poley on August 11 2003 19:23 EDT
-
Problem in Configuring MySql[ Go to top ]
- Posted by: Tim Allen MO
- Posted on: August 11 2003 13:35 EDT
- in response to Raheel haider
This looks okay to me, but if you can send the exception list that would be great. -
suggestion[ Go to top ]
- Posted by: jason poley
- Posted on: August 11 2003 19:23 EDT
- in response to Raheel haider
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">
<authentication>
<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>
</login-module>
</authentication>
</application-policy>