MySQLNonTransientConnectionException
Could someone read this and maybe suggest some different approaches to resolving this??
ERROR MSG:
•Connection verification failed for data source: mysqldbv2
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
I've entered the following lines in CF11 administrator:
CF Datasource name: mysqldbv2
JDBC url: jdbc:mysql://localhost:3306/mysqldbv2
Driver class: com.mysql.jdbc.Driver
Driver Name: mysql 5.0
User name: root
Password: 123 (this is development computer offline)
I'm using MySQL Workbench 6.1
Windows 7 machine.
Using CF11.
I've tried everything I can think of. Firewall is off. Log files in CF admin offer no help. Same with MySQL.
Brainlessly doubleposted in the Java Programming forum without notification: [http://forums.sun.com/thread.jspa?messageID=10398556#10398556].
Similar Messages
-
MySQLNonTransientConnectionException and Reached maximum capacity of pool
Hi. I'm using jedeveloper 11g and weblogic 10.3x and I'm quite new at this. I have an application with basic CRUD functions deployed in my weblogic server with a MySQL database as its data source. It was running well until we encountered an SQL exception error. Here's the log of the error:
BEA-001112 - Test "SELECT 1" set up for pool "EvCoreMySqlDS" failed with exception: "com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.".
After some time, we tried accessing the page again. This time, it was now running perfectly well again. Then sometimes it throws this error with a blank page.
BEA-000627 - Reached maximum capacity of pool "EvCoreMySqlDS", making "0" new resource instances instead of "1".
Can anyone help me regarding these two errors? Are these two errors related? Could you please enlighten me how did these occur? And most importantly, how can I fix this? Thanks.
Edited by: rageDev on Sep 2, 2010 11:44 PMHi Kal,
we already enabled Inactive connection timeout is 900 still its throughing the info.
Thanks,
Edited by: 834617 on Nov 28, 2012 10:39 AM -
Too many connections - even after closing ResultSets and PreparedStatements
I'm getting a "Too many connections" error with MySQL when I run my Java program.
2007-08-06 15:07:26,650 main/CLIRuntime [FATAL]: Too many connections
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Too many connections
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:921)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:812)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3269)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1182)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)I researched on this and found out that I wasn't closing the ResultSet and the PreparedStatement.
The JDBC connection is closed by a central program that handles connections (custom connection pooling).
I added the code to close all ResultSets and PreparedStatements, and re-started MySQL as per the instructions here
but still get "Too many connections" error.
A few other things come to mind, as to what I may be doing wrong, so I have a few questions:
1) A few PreparedStatements are created in one method, and they are used in a 2nd method and closed in the 2nd method
does this cause "Too many connections" error?
2) I have 2 different ResultSets, in nested while loops where the outer loop iterates over the first ResultSet and
the inner loop iterates over the second ResultSet.
I have a try-finally block that wraps the inner while loop, and I'm closing the second ResultSet and PreparedStement
in the inner while loop.
I also have a try-finally block that wraps the outer while loop, and I'm closing the first ResulSet and PreparedStatement
in the outer while loop as soon as the inner while loop completes.
So, in the above case the outer while loop's ResultSet and PreparedStatements remain open until the inner while loop completes.
Does the above cause "Too many connections" error?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following is relevant sections of my code ( it is partially pseudo-code ) that shows the above 2 cases:
init( Connection jdbcConnection ){
String firstSQLStatement = "....";
PreparedStatement ps1 = jdbcConnection.prepareStatement( firstSQLStatement );
String secondSQLStatement = "....";
PreparedStatement ps2 = jdbcConnection.prepareStatement( secondSQLStatement );
String thirdSQLStatement = "....";
PreparedStatement ps3 = null;
ResultSet rsA = null;
try{
ps3 = jdbcConnection.prepareStatement( thirdSQLStatement );
rsA = ps3.executeQuery();
if( rsA.next() ){
rsA.getString( 1 );
}finally{
if( rsA != null )
rsA.close();
if( ps3 != null )
ps3.close();
//Notice, how ps1 and ps2 are created here but not used immediately, but only ps3 is
//used immediately.
//ps1 and ps2 are used in another method.
run( Connection jdbcConnection ){
ResultSet rs1 = ps1.executeQuery();
try{
while(rs1.next()){
String s = rs1.getString();
ps2.setString(1, s);
ResultSet rs2 = ps2.executeQuery();
try{
while(rs2.next()){
String s2 = rs2.getString();
}finally{
if( rs2 != null )
rs2.close();
if( ps2 != null )
ps2.close();
}catch( Exception e ){
e.printStackTrace();
}finally{
if( rs1 != null )
rs1.close();
if( ps1 != null )
ps1.close();
//Notice in the above case rs1 and ps1 are closed only after the inner
//while loop completes.
}I appreciate any help.Thanks for your reply.
I will look at the central connection pooling mechanism ( which was written by someone else) , but that is being used by many other Java programs others have written.
They are not getting this error.
An addendum to my previous note, I followed the instructions here.
http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html
There's probably something else in my code that is not closing the connection.
But I just wanted to rule out the fact that opening a PreparedStatement in one method and closing it in another is not a problem.
Or, if nested ResultSet loops don't cause the problem.
I've read in a few threads taht "Too many connections" can occur for unclosed RS and PS , and not just JDBC connections. -
Hi Experts,
I have an issue with my XI JDBC adapter. Once a job gets sent through XI (from nonSAP to XI to SAP), the JDBC adapter is required to write a confirmation in the database that the job was processed in SAP.
When I go into my Adapter Monitor (http://system:num/AdapterFramework/) I see a red dot beside JDBC and the following error:
Error: Transform error in xml processor class, rollback:
ERROR:Processing request: Error when executing statement for table/stored proc. 'stfx.job_copy': com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after statement closed.
Any ideas??Hi Bhavesh,
I update with the XML coming out of XI. All I need to update is the status. This XML currently does come out of XI and would be sent back to my database, except for the fact that the JDBC adapter goes down, and I get the originally mentioned error. The XML looks like:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_UPDATE_STATUS xmlns:ns0="http://tssi.ycdsb.ca">
- <STATEMENTNAME>
- <dbTableName action="UPDATE">
<TABLE>sfx.job_copy</TABLE>
- <access>
<status1>DONE</status1>
<status2>DONE</status2>
</access>
- <key>
<jobId>00595593</jobId>
<status1>NEW</status1>
<messagenm>d3e98e294bfcd2d5d3e98e29</messagenm>
</key>
</dbTableName>
</STATEMENTNAME>
</ns0:MT_UPDATE_STATUS>
Any ideas? -
I get this error everytime I try an make a DSN
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving upHave you tried connecting to the server by other methods, perhaps the MySQL commandline client from the CF box?
Does the database run on the same server or a different server?
If different - firewall? Does MySQL allow remote connections? -
Communication packets error with MySQL
Hi,
I'm having a problem with executing a query on MySQL. It seems that I'm getting the communication packets error once in a while and I'm not sure whether the query is bad or the settings on the database server is bad. Could anyone give me an insight where to look after?
Thank you,
852825
MySQL: 5.1.41-3ubuntu12.7
JDBC: 5.1.12
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Got an error writing communication packets
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2264)I've tried the community but no response so far. Any tips on where to look?
-
Set autocommit= off in JDBC driver
Hi,
i'm running jdev v. 11.1.2.4 and deploying a simple ADF application on glassfish against a mySQL database v 5.1.....
when i commit my changes to the database i receive an exception:
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
a|#]
it's pretty obvious what is causing it but how do i set autocommit off in JDev?
I've looked into bc4j.cfg but don't see any indications here. is it related to the JDBC pool on glassfish? and as such not a JDev/ADF problem?
KimI found out.
please look here
oracle.jbo.DMLException: JBO-26065: Error during commit
Kim -
Hi,All
Need Help regarding the exception.
As i tried so many way to solve this problem but cound'nt find out the solution.!!! If i restart the server then this error is resolved but for the some time.,after 4-5 hour again i need to restart the server.
so please help me out from this problem!!!!!!
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: #{cityf.OrderToConsumerCity}: javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: could not execute query
javax.faces.webapp.FacesServlet.service(FacesServlet.java:225)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
root cause
javax.faces.FacesException: #{cityf.OrderToConsumerCity}: javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: could not execute query
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
javax.faces.component.UICommand.broadcast(UICommand.java:332)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
root cause
javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: could not execute query
com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
javax.faces.component.UICommand.broadcast(UICommand.java:332)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
root cause
org.hibernate.exception.JDBCConnectionException: could not execute query
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.loader.Loader.doList(Loader.java:2223)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
org.hibernate.loader.Loader.list(Loader.java:2099)
org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
com.etelic.dao.ConsumerDAOHibernate.getCityList(ConsumerDAOHibernate.java:153)
com.etelic.controller.City.OrderToConsumerCity(City.java:286)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
javax.faces.component.UICommand.broadcast(UICommand.java:332)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
root cause
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:
** BEGIN NESTED EXCEPTION **
com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1956)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.etelic.dao.ConsumerDAOHibernate.getDelhiLocalityListByPincode(ConsumerDAOHibernate.java:116)
at com.etelic.bo.ConsumerBO.getDelhiLocalityListByPincode(ConsumerBO.java:44)
at com.etelic.manager.ConsumerManager.getDelhiLocalityList(ConsumerManager.java:38)
at com.etelic.controller.ConsumerSearchParametersInput.search(ConsumerSearchParametersInput.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
at javax.faces.component.UICommand.broadcast(UICommand.java:332)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
** END NESTED EXCEPTION **
Last packet sent to the server was 15 ms ago.
STACKTRACE:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
*java.io.EOFException*
* at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1956)* at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.etelic.dao.ConsumerDAOHibernate.getDelhiLocalityListByPincode(ConsumerDAOHibernate.java:116)
at com.etelic.bo.ConsumerBO.getDelhiLocalityListByPincode(ConsumerBO.java:44)
at com.etelic.manager.ConsumerManager.getDelhiLocalityList(ConsumerManager.java:38)
at com.etelic.controller.ConsumerSearchParametersInput.search(ConsumerSearchParametersInput.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
at javax.faces.component.UICommand.broadcast(UICommand.java:332)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
** END NESTED EXCEPTION **
Last packet sent to the server was 15 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2579)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.etelic.dao.ConsumerDAOHibernate.getDelhiLocalityListByPincode(ConsumerDAOHibernate.java:116)
at com.etelic.bo.ConsumerBO.getDelhiLocalityListByPincode(ConsumerBO.java:44)
at com.etelic.manager.ConsumerManager.getDelhiLocalityList(ConsumerManager.java:38)
at com.etelic.controller.ConsumerSearchParametersInput.search(ConsumerSearchParametersInput.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
at javax.faces.component.UICommand.broadcast(UICommand.java:332)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
** END NESTED EXCEPTION **
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
com.mysql.jdbc.Connection.checkClosed(Connection.java:1931)
com.mysql.jdbc.Connection.prepareStatement(Connection.java:4720)
com.mysql.jdbc.Connection.prepareStatement(Connection.java:4686)
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
org.hibernate.loader.Loader.doQuery(Loader.java:673)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
org.hibernate.loader.Loader.doList(Loader.java:2220)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
org.hibernate.loader.Loader.list(Loader.java:2099)
org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
com.etelic.dao.ConsumerDAOHibernate.getCityList(ConsumerDAOHibernate.java:153)
com.etelic.controller.City.OrderToConsumerCity(City.java:286)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
javax.faces.component.UICommand.broadcast(UICommand.java:332)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
Apache Tomcat/6.0.14-Thanks and regards
Praveen SoniHey BalusC
As i already obtain a new session object from sessionfactory,for one or more transactions at once(!),
For reference see below code:
package com.dao>hibenateUtil;
import java.util.*;
import com.ConsumerRecord;
public class ConsumerDAOHibernate implements IConsumerDAO {
public Long getNumberMatchingQuery(ConsumerRecord upr){
String query = new String();
String queryStart = "select count(*) FROM person in CLASS com.ConsumerRecord";
query += queryStart;
org.hibernate.Query q = HibernateUtil.getSession().createQuery(query);
return (Long)q.uniqueResult();
public Long getNumberMatchingCity(ConsumerRecord upr){
String query = new String();
String queryStart = "select count(*) FROM city in CLASS com.ConsumerRecord";
query += queryStart;
org.hibernate.Query q = HibernateUtil.getSession().createQuery(query);
return (Long)q.uniqueResult();
Hibernate Util:-package com.dao;
import java.sql.Connection;
import java.sql.DriverManager;
import org.apache.log4j.Logger;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
public class HibernateUtil {
private static final SessionFactory sessionFactory;
private static Session session = null;
private static Logger logger = Logger.getLogger(HibernateUtil.class.getName());
static {
try {
/** TODO: change to IOC w/ datasource */
Configuration conf = new Configuration();
sessionFactory = conf.configure().buildSessionFactory();
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
public static Session getSession() {
if(session == null){
try {
session = sessionFactory.openSession();
logger.debug("****************************new session being created**************************************");
//sessionFactory.
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
return session;
} -
What's wrong with this MySQL connection? "Could not create connection to database server"
I'm able to connect to other MySQL databases but this one particular remote MySQL connection isn't working and I cannot figure it out. It probably has something to do with the remote server, not CF, but I thought I'd post it here if anyone had an idea. The MySQL account has full priviledges.
Here is the message when I try to validate the data source:
Connection verification failed for data source: test
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.This happened on two servers. One one, the cause was that skip-networking was turned on. In the other situation, it appears that the database name was case sensitive, so TEST was not the same as test. Even though I edited the data source in the CF administrator, it still didn't work (very misleading). When a coworker entered a new data source with the same information (uppercase database name this time from the start), it worked.
Has anyone else seen this problem with the case sensitive database names? And with the data source in CF not updating the case correctly? Seems like a bug in CF. -
Hi
Is anyone out there able to do a quick test of MySQL DSNs?
I am running CF10 beta on Win Vista Home Premium 64-bit, and trying to create DSNs to a "MySQL 5.5.2-m2-community" DB, also installed locally. When I do so, I get this:
Connection verification failed for data source: dsntest
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
The root cause was that: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Connecting to the same DB with the same credentials on CF8 and CF9 (and Railo, OpenBD and BD.NET) works fine.
I have ruled out firewall issues.
I'm less interested in people offering advice as to what might be the cause (Adobe are on the case, and they'll be best placed to advise there), but just interested if someone who has a comparable environment could try to set up a MySQL DSN and see if it works.
If someone can get a DSN to work on Win Vista Home Premium 64-bit, and MySQL 5.5.2-m2-community (or similar, if not exactly the same point release), then I'd be pretty happy to just put it down to a vagary of my PC, and advise Adobe to stop looking at it.
On the other hand if someone else has the same problem, it would be handy to know.
Cheers.
AdamGeoff
You may need to use MySQL Administrator to add a host from which root
can connect, if you want to be able to log in as root from workstations.
By default I believe root can only connect from localhost, ie the
server itself, and this is a security feature.
However, you can add additional hosts, including %.yourinternaldomain,
and re-assign the privileges you want root to have. I find it a bit
confusing, but root@localhost and root@somewhere_else seem to behave as
different users.
I personally leave root for just localhost access and use another user
for workstation access - a bit safer and if I stuff up the other user if
worst comes to worst I can fix it from a command line on the server.
Hope this helps
Rob
Geoff Roberts wrote:
>>>> On 6/08/2007 at 8:53 am, in message <[email protected]>,
> Christopher Premo<[email protected]> wrote:
>> I've just loaded it as well. I am running the Free NSure Audit (version
>> 2.0.2) on my File servers. Currently, I'm just tracking Netware and
>> eDirectory Logins and outs and intruder detections.
>>
>> I've tried to connect to the MySQL database via the MySQL ODBC driver,
>> but have been unsuccessful so far. However, I have been able to use the
>> MySQL Administration and Query Browser program to access the MySQL
>> database on the Master server.
>>
>> I'm in the processes of developing instruction for our unit to "export"
>> the Audit data, clear the MySQL database, and import the data into an
>> Access database for audit analysis. Unfortunately, there are some manual
>
>> steps, but the process seems to be easy and quick to accomplish.
>
> I've been able to login remotely. Finally. However NOT as root. I had to
> create another user and grant it all rights for everything. That works from
> console and remotely, root still only works from the console. I'm wondering
> if this is a 'feature'...
>
>
> Regards
> -
I go to add a datasource into Coldfusion Administrator and I get a weird error. which is this error.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server. Attempted reconnect 3
times. Giving up.
The root cause was that:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server. Attempted reconnect 3
times. Giving up.
I use wamp server with Apache and MySQL 5.1.2.3(I think thats the version), I was told that I'd need to download JRun but I dunno, if that's my problem or not I thought Coldfusion 9 came with it.
Any help would be very kind thank you in advance.Did you try using MySQL's own JDBC driver?
http://dev.mysql.com/downloads/connector/j/
Adam
Maybe you are looking for
-
How can I get Netflix Movies to run on my MacBook Pro via wi fi?
When I log onto Netfix with my MacBook Pro and select a movie to watch on line, I find that I lack an application that will work only in a 32-bit environment. It won't load. Is there any other application I can use to substitute for that?
-
PCI_MSI_CAPABILITY data structure is not defined in the wdm.h?
Hi I cannot find the PCI_MSI_CAPABILITY data structure definition in the wdm.h. I found PCI_CAPABILITIES_HEADER and PCI_PM_CAPABILITY etc. are defined in the wdm.h. Am I missing something? Thank you, Tiger
-
Background/image alignment varies slightly in different browsers
Hi, To start, I'm pretty new to Dreamweaver and can't understand html to save my life so please bare with me if this has a simple solution.. I'm learning.:) I have a site that is finally lining up 100% in Safari, however, when I open it up in Firefox
-
How to call a portal service from a servlet
Hello all. I have a functioning portal service that I would like to call from a servlet. When I try to do so, I get a ClassCastException when I do this (on line two): IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources(); IDo
-
My FCP X render files are taking up my hardrive space!
When I use HD footage for my Final Cut Pro projects it takes up 20 GB per project.... I have a 3 TB external Hardrive, is their a way I can use that to move my render files to it and still be able to edit my project? Can i delete my render field with