Hi Marcel,
Your are right. It shall be a 5 minutes task. I download the new version of Jboss 3.2.2.4 and exception went away.
 
What a waste of time. Thanks.
Pifen Ellwood
----- Original Message -----
Sent: Wednesday, September 12, 2001 10:50 AM
Subject: AW: [JBoss-user] Mysql problem

 

Try to write simple JDBC Client in order to find out if a login is really possible. Its Five minutes of work and otherwise You never know.

 

Hi,

I've searched all the post mail and do everything I can to make mysql work with jboss but failed.

If anyone got Mysql to work with Jboss, please let me know which version of Mysql, mysql jdbc driver that you're using and send me a sample of the jboss.jcml that works.

 

Thanks

 

Here is my system setup:

 

Mysql version: mysql-3.23.41-win.zip

JDBC driver:   mm.mysql-2.0.4-bin.jar (stored in JBOSS_HOME\lib\ext)

Jboss with tomcat: JBoss-3.2.2_Tomcate-3.2.2.zip

OS: Windows2000 Professional

 

I list only mysql jdbc driver in the jboss.jcml

I have create a user name and password in the MySQL server, and I've verified with the MySql admin tool that the user name and password does exist and with proper previleges. The exceptions that I got are very different depends on how I name the datasource which I can't understand what's going on.

 

Exerpt from my jboss.jcml:

<!-- JDBC -->

<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">

<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>

</mbean>

<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQL">

<attribute name="PoolName">mySQL</attribute>

<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>

<attribute name="URL">jdbc:mysql://192.168.1.152/test</attribute>

<attribute name="JDBCUser">myname</attribute>

<attribute name="Password">mypassword</attribute>

</mbean>

The exception I got:

 

 

[mySQL] Starting
[mySQL] XA Connection pool mySQL bound to java:/mySQL
[mySQL] java.sql.SQLException: Invalid authorization specification: Access denied for user: 'pifen@figgm' (Using password: YES)
[mySQL] Pool mySQL factory org.opentools.minerva.jdbc.xa.XAConnectionFactory@7b56b1 unable to create new object!
[mySQL] Pool mySQL [0/0/10] waiting for a free object

 

If I change the name to "MySQL"

<!-- JDBC -->

<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">

<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>

</mbean>

<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=MySQL">

<attribute name="PoolName">MySQL</attribute>

<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>

<attribute name="URL">jdbc:mysql://192.168.1.152/test</attribute>

<attribute name="JDBCUser">pifen</attribute>

<attribute name="Password">pifen</attribute>

</mbean>

 

The exception I got:

[MySQL] Starting
[MySQL] XA Connection pool MySQL bound to java:/MySQL
[MySQL] Stopped
[MySQL] java.lang.NullPointerException
[MySQL]  at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:165)
[MySQL]  at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:330)
[MySQL]  at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:93)
[MySQL]  at java.lang.reflect.Method.invoke(Native Method)
[MySQL]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[MySQL]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[MySQL]  at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
[MySQL]  at java.lang.reflect.Method.invoke(Native Method)
[MySQL]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[MySQL]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[MySQL]  at org.jboss.Main.<init>(Main.java:217)
[MySQL]  at org.jboss.Main$1.run(Main.java:121)
[MySQL]  at java.security.AccessController.doPrivileged(Native Method)
[MySQL]  at org.jboss.Main.main(Main.java:117)
[Service Control] Could not start DefaultDomain:service=XADataSource,name=MySQL
[Service Control] java.lang.NullPointerException
[Service Control]  at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:165)
[Service Control]  at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:330)
[Service Control]  at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:93)
[Service Control]  at java.lang.reflect.Method.invoke(Native Method)
[Service Control]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Service Control]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Service Control]  at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
[Service Control]  at java.lang.reflect.Method.invoke(Native Method)
[Service Control]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Service Control]  at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Service Control]  at org.jboss.Main.<init>(Main.java:217)
[Service Control]  at org.jboss.Main$1.run(Main.java:121)
[Service Control]  at java.security.AccessController.doPrivileged(Native Method)
[Service Control]  at org.jboss.Main.main(Main.java:117)

 

 

 

 

 

 

 

 

The strange thing is that if I change the datasource name to name=MYSQL, Jboss just hang

 

excerp from my jboss.jcml

<!-- JDBC -->

<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">

<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>

</mbean>

<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=MYSQL">

<attribute name="PoolName">MYSQL</attribute>

<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>

<attribute name="URL">jdbc:mysql://192.168.1.152/test</attribute>

<attribute name="JDBCUser">myname</attribute>

<attribute name="Password">mypassword</attribute>

</mbean

 

 

Pifen Ellwood

Reply via email to