B4J Question [Solved] Pool Connection Exception

udg

Expert
Licensed User
Longtime User
Hi all,

I copied a working project from Linux to Windows 2012 Server and I am getting the following error:
"java.sql.SQLException: An attempt by a client to checkout a Connection has timed out."

I searched the Forum and it seems to be related to network problems. Can you advice on what to investigate in detail?

Firewall port is ok, jServer works regularly when accessing an handler not involving MySQL, connector is "mysql-connector-java-5.1.40-bin.jar".

Someone else installed MySQL on W2012 so I don't know if they set any parameter that could cause the problem; eventually let me know what to check.

A final consideration: this is a copy&paste project, I have no time to substitute all the DB stuff with jRDC2 (yes, on next project I'll learn and use it, promise).

Any help welcome. TIA
 

udg

Expert
Licensed User
Longtime User
Yes Erel, MySQL DBMS and my B4J jServer-based program are on the same W2012 server.
B4X:
pool.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/EGG?characterEncoding=utf8",user,password)
I check pool.isInitialized and it shows True.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
You won't believe this, on that server there were two active copies of MySQL, both set on port 3306!
Changed the one I intended to use to port 13306 and everything now works as expected.

udg
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
You won't believe this, on that server there were two active copies of MySQL, both set on port 3306!
Changed the one I intended to use to port 13306 and everything now works as expected.

udg

Ha, ha.. I did the EXACT same thing initially (2 active copies of MySQL)! It took me many days to figure this out. There is nothing preventing you from shooting yourself in the foot! - Or anyone else from determining how you are missing a toe (or 2).

Your experiences are a duplicate of what I went thru in my learning curve. I often post my own solution as a tut or snippet so I can REMEMBER what the heck I did when..

However, we get smarter everyday. Hopefully, you can retain your new found knowlege to remind ME - when I (often) forget.
Erel's mind is amazing. Often he simply replies to - points to, repeated questions asked and answered (often years ago).

Keep up the good work and keep us informed with your discoveries.
 
  • Like
Reactions: udg
Upvote 0
Top