File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Jboss & mysql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Jboss & mysql" Watch "Jboss & mysql" New topic

Jboss & mysql

D. Clarke

Joined: May 09, 2006
Posts: 25
I have a EAR file with EJB and two struts applications. I am using Tomcat 4.0.2, mySQL locally, JDK1.5, and the JDBC driver "com.mysql.jdbc.Driver". I am able to connect to mysql via Eclipse using

But in my mysql-ds.xml file I have this:

<pass word>none</pass word> <-- formatted to show in this post

But when I try to access the site I get this:

Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Cannot connect to MySQL server on Is there a MySQL server running on the machine/port you are trying to connect to? (java.lang.NumberFormatException))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(

Does anyone know what might prevent JBOss 4.0.2 from connecting to the db?
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Tomcat or JBoss, your topic mentions when and your post mentions another.

[OCA 8 Book] [Blog]
D. Clarke

Joined: May 09, 2006
Posts: 25
Sorry, I meant I am using JBoss4.0.2 and the Tomcat 5.5 bundled within. I am developing on OS X 10.4.8 and will deploy to Ubuntu with similarly configured applications.
D. Clarke

Joined: May 09, 2006
Posts: 25
I got it, and just in case anyone else see's this - by changing the URL to use "localhost" rather than "" seems to work.
I agree. Here's the link:
subject: Jboss & mysql
It's not a secret anymore!