| Author |
Could not load com.mysql.jdbc.SQLError
|
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Hi All,
I am developing Jsf 1.2 application using mysql database, deployed using jboss 4 Application Server , the application works fine without any bugs but I have found the following error in jboss logs
BTW , the same error is displayed so many times in jboss logs (note that this error does not effect the working of the application)
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Apparently you are wrong about the "without any bugs" part.
I can't really tell what is wrong, except that it almost certainly has nothing to do with JSF. The two most likely causes I can think of are these:
1. You are using JDBC connection objects but not properly releasing them in one or more webapps.
2. You are spawning threads that use JDBC in a way that violates the JEE restrictions on threading.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks for your reply ,
here is some of my code for dealing with database
|
 |
James Boswell
Ranch Hand
Joined: Nov 09, 2011
Posts: 657
|
|
Rather than
Try:
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks James Boswell for your reply ,
1. session.endTransaction();
No such method , the nearest method to your suggested method is
I have replaced
with
but it is the same error as well as new error
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
|
Any suggestions
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
|
Any suggestions
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
|
What directory is your MySQL driver jar in?
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks Tim Holloway
What directory is your MySQL driver jar in?
I am using maven , mysql jar locates in the directory
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
|
That didn't help. Maven won't be available when you run the app in production, nor will your IDE. I need to know where the driver jar was installed in your web application server.
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks Tim Holloway for your reply ,
I need to know where the driver jar was installed in your web application server
I have local jboss application server 4.2 , mysql 5 , so everything (jboss application server , mysql database server , ....etc) is running locally in the same machine
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Suresh Khant wrote:Thanks Tim Holloway for your reply ,
I need to know where the driver jar was installed in your web application server
I have local jboss application server 4.2 , mysql 5 , so everything (jboss application server , mysql database server , ....etc) is running locally in the same machine
It doesn't matter what machines are being used. What matters is that JBoss does not come with database drivers. You have to manually install whatever database drivers you'll be using. If you install them in the wrong place, it can cause problems. I have a strong suspicion that that is what is wrong here.
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks Tim Holloway for your reply ,
You have to manually install whatever database drivers you'll be using. If you install them in the wrong place
How to install database drivers ? do you mean adding the mysql jar file to the build path ? what is the right place for installation it ?
Your help, support and reply is really appreciated
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
The build path does not exist when a production server runs. It only exists when the application is being built.
You have some basic things to learn about JBoss and how it interacts with databases. They have nothing to do with JSF, so I'm going to move this thread over to the JBoss forum.
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8147
|
|
Tim is right - there's a difference between build time environment of an application and the runtime environment of an application. As for the question about where to place the JDBC driver jar(s), it should go in JBOSS_HOME/server/<servername>/lib folder.
|
[My Blog] [JavaRanch Journal]
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks Jaikiran Pai for your reply,
I have copied mysql jar file into JBOSS_HOME/server/messaging/lib but am still getting the same error
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
|
All the suggestions are appreciated
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8147
|
|
Suresh Khant wrote:
I have copied mysql jar file into JBOSS_HOME/server/messaging/lib but am still getting the same error
What command do you use to start the server and please post the entire exception stacktrace that you see after copying that driver jar to that location.
|
 |
Suresh Khant
Ranch Hand
Joined: Feb 27, 2010
Posts: 115
|
|
Thanks Jaikiran Pai for you reply,
What command do you use to start the server and please post the entire exception stacktrace that you see after copying that driver jar to that location.
I am starting jboss server from eclipse ,
Everything goes correctly after copying that driver jar to that location.(no error)
the error will be generated after long time of deploying (sometimes after one hour of deployment)
I have already post the stacktrace in my first post
Thaking you in advance
|
 |
 |
|
|
subject: Could not load com.mysql.jdbc.SQLError
|
|
|