This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Could not get a good connection to the database" when trying to access remote server

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a junit (does a simple insert) that runs against a local database and it's is done with no errors.

ibatis code on sqlMapConfig.xml



Now, I changed the location of the database and it on a remote site. So the new code is:



* I also changed the my.cnf of mysql on the remote site from:



the unit test is not working and throwing the exception below.

* from a firewall perspective, all ports are open on the server



and for the notorious message:



any idea?

[ UD:: added linebreaks to preserve layout ]
[ September 28, 2008: Message edited by: Ulf Dittmer ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the machine where you are running the junit test what does



return?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm ... 55.555.55.55 sounds like an impossible IP address. I'm surprised anything useful can be done with it.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The IP 55.555.55.55 is dummy. It's just for the example (don't want the bed guys to attack the server based on this info ;-) ).

as per your question Jaikiran, with telnet I'm able to access the server.


ALSO... I just wrote a simple code in Java using simple JDBC connection, and I managed to *access* the database.



Since this works -- something is wrong with iBatis.
My conf looks like this:



as a reminder, when I do this:

the code runs perfectly.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic