Jboss and mysql

I

Iede Snoek

Hello out there.

Maybe this has been asked before but I have a problem with configuring
mysql and jboss. I configure a mysql-ds.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/UserDatabaseMySQL</jndi-name>
<connection-url>jdbc:mysql://grappa.fredhopper.com:3306/bizmanuser</connection-url>
<driver-class>com.jdbc.mysql.Driver</driver-class>
<user-name>bizuser</user-name>
<password>bizz11</password>
</local-tx-datasource>

</datasources>

When I try to make a connection using JNDI it seems that JBoss keeps
thinking it i s a Postgres database it is connecting to (there is
another datasource, for a postgres connection). How can I solve this?
If you need more info, or better yet, if you have an answer, I would
be very grateful.

Thx in advance,

Iede
 
S

Sudsy

Iede Snoek wrote:
When I try to make a connection using JNDI it seems that JBoss keeps
thinking it i s a Postgres database it is connecting to (there is
another datasource, for a postgres connection). How can I solve this?
If you need more info, or better yet, if you have an answer, I would
be very grateful.

Sounds like you're missing the datasource-mapping element in the
META-INF/jbosscmp-jdbc.xml file. I had similar difficulties when
trying to use Oracle but the solution was easier to implement by
using Eclipse along with JBoss-IDE and Xdoclets.
 
B

Bryce

Hello out there.

Maybe this has been asked before but I have a problem with configuring
mysql and jboss. I configure a mysql-ds.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/UserDatabaseMySQL</jndi-name>
<connection-url>jdbc:mysql://grappa.fredhopper.com:3306/bizmanuser</connection-url>
<driver-class>com.jdbc.mysql.Driver</driver-class>
<user-name>bizuser</user-name>
<password>bizz11</password>
</local-tx-datasource>

</datasources>

That looks ok. What does your application's deployment descriptors
look like? And what are you doing when you get that error message? And
could you please post the entire error message.
 
R

robintan

If the JNDI name is "jdbc/UserDatabaseMySQL", then ur datasource needs to look
for "jdbc:/jdbc/UserDatabaseMySQL".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top