• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Cannot conect to mySql DB after changing DB from HSQL to mySql in JBOSS 5

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am trying to run the EJB in Action Chapter 2 application.

I want to use mySql database instead of the default hsqldb. I have changed the JBOSS 5 configuration to use mySql. I have not succeed in getting the ear file deployed. I can't connect to the database.
The first error I see in the server log is :

12:40:59,456 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Access is denied)


Although there are many other eros in the log, since this is the first error in the log, I am assuming that subsequent error messages releated to this first error.

The database is : localDB, the userid id : SA the password is : password
I have reviewed the login and password I submit and it looks fine. I have tweaked the files I thought I needed to changed but I can't progress.
I build the ear file with apache ant.

Any advice would be welcome as I've spent about 9 hours trying tp get this to work.

I have pasted at the bottom of this post the server log. I have pasted immediatedly below this sentence the files :
msSQL-ds.xml
login_config.xml
Messaging-jboss-beans.xml
mysql-persistence-service.xml (I created and use this file instead of hsqldb-persistence-service.xml)
persistence.xml




persistence.xml





msSQL-ds.xml




login_config.xml


mysql-persistence-service.xml (replaced hsql-persistence-service.xml


messaging-jboss-beans.xml



THE JBOSS LOG (part of log not posted)


 
Marshal
Posts: 28294
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But that message doesn't come from MySQL. It comes from HSQL, as you can tell by the next line in the log:

Caused by: java.sql.SQLException: Access is denied
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

 
Ranch Hand
Posts: 56
Netbeans IDE Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there are two possiblities,

1.You must have forgot to remove the hsql instance from your code, its running somewhere.
2.Check your user name ans password, or try it with a new user name and password.
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic