Java.sql.SQLException: Lost connection to server during query
Hi all,
While I execute the sql query, i get the following exception
java.sql.SQLException: Lost connection to server during query
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.executeQuery(Unknown Source)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:302)
Below is my code to execute the query.
String sqlQuery = "some query";
Connection dbConnection=null;
PreparedStatement stmt = null;
ResultSet rs = null;
try
dbConnection=getDBConnection(); //perform lookup on the data source, and return the connection
stmt= prepareStmt(dbConnection, sqlQuery);
rs = stmt.executeQuery(); //fail here
//more below......
catch(Exception e)
throw e;
finally
releaseResource(stmt,dbConnection);
closeResultSet(rs);
}The DB i am using is MySql 4.0, Server: Jboss3.2. Could I know the possible reason that will cause the above exception?
Thanks for your help
Anyone would help me.
I am using linux, resin, jdk1.3 and Mysql plus mm.mysql driver. I write some static class which open one database connection for the class. I found that if the Server is ideal for period of time. When I doing the query again I meet same error message.
ava.sql.SQLException: Lost connection to server during query
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.Statement.executeQuery(Unknown Source)
at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Unknown Source)
at com.ccnet.desktop.Grouping.getDomainBanner(Grouping.java:1835)
Similar Messages
-
Exception java.sql.SQLException: This Connection has either timed out
I am using JRUN 4 & SQL Server 2000
and Driver is Type 4 SQL Server 2000.
Type 4 driver : com.microsoft.jdbc.sqlserver.SQLServerDriver
I am able to connect & fire the query but while insertion record it gives me this error.
Exception java.sql.SQLException: This Connection has either timed out
or been closed, and it has returned to its pool. You must re-acquire the Connect
ion.
java.sql.SQLException: This Connection has either timed out or been closed, and
it has returned to its pool. You must re-acquire the Connection.
at jrun.sql.JRunConnectionHandle.assertConnectionExists(JRunConnectionHa
ndle.java:50)
at jrun.sql.JRunConnectionHandle.rollback(JRunConnectionHandle.java:107)
at krisolshipping.common.LMaintain.postData(LMaintain.java:563)
at krisolshipping.securities.SUser.doPost(SUser.java:186)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:
226)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:
527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
ava:451)
Krisol 03 Exception java.sql.SQLException: This Connection has either timed out
or been closed, and it has returned to its pool. at jrunx.scheduler.Worke
rThread.run(WorkerThread.java:66)
You must re-acquire the Connection.
java.sql.SQLException: This Connection has either timed out or been closed, and
it has returned to its pool. You must re-acquire the Connection.Did you by any chance close the connection?
The following appendix in the connection URL is recommended for M$ SQL:
jdbc:microsoft:sqlserver://mssql:1433;SelectMethod=Cursor -
Java.sql.SQLException: Closed Connection from Custom Identity Service
Hi,
Here is an issue I am trying to resolve:
Platform: Oracle BPEL 10.1.2
OS: Red Hat Enterprise Linux ES release 4 (Nahant Update 4)
Please note that the whole thing has been working in other same type of installations (e.g. RedHat, Windows, Developer BPEL on Windows & Linux) but this seems to be something special on this server. Any help will be appreciated:
This actually work for sometime (2-3 hours) and then suddenly stops working even if we don't do any transaction on it.
Thanks,
Bipul Dutta.
Error stack:
09/08/17 12:45:25 CustomIdentityService::authenticateUser():: begin
############# inside authenticateUser
09/08/17 12:45:25 CustomIdentityService::user authenticated
############# inside getUser()
09/08/17 12:45:25 java.sql.SQLException: Closed Connection
09/08/17 12:45:25 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
09/08/17 12:45:25 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
09/08/17 12:45:25 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:239)
09/08/17 12:45:25 at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:930)
09/08/17 12:45:25 at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:826)
09/08/17 12:45:25 at oracle.tip.pc.services.identity.FAMDBProvider.getUser(FAMDBProvider.java:418)
09/08/17 12:45:25 at oracle.tip.pc.services.identity.FAMCustomIdentityService.lookupUser(FAMCustomIdentityService.java:101)
09/08/17 12:45:25 at oracle.tip.pc.services.hw.worklist.WorklistService.authenticateUser(WorklistService.java:333)
09/08/17 12:45:25 at com.famis.web.service.core.humanworkflow.service.AbstractTaskWebService.getBpelContext(AbstractTaskWebService.java:20)
09/08/17 12:45:25 at com.famis.web.service.core.humanworkflow.service.GetTasksWebServiceImpl.process(GetTasksWebServiceImpl.java:51)
09/08/17 12:45:25 at com.famis.web.service.core.humanworkflow.service.TaskWebServiceImpl.process(TaskWebServiceImpl.java:68)
09/08/17 12:45:25 at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
09/08/17 12:45:25 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
09/08/17 12:45:25 at java.lang.reflect.Method.invoke(Method.java:324)
09/08/17 12:45:25 at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:141)
09/08/17 12:45:25 at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
09/08/17 12:45:25 at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
09/08/17 12:45:25 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
09/08/17 12:45:25 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
09/08/17 12:45:25 at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
09/08/17 12:45:25 at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
09/08/17 12:45:25 at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
09/08/17 12:45:25 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
09/08/17 12:45:25 at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
09/08/17 12:45:25 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
09/08/17 12:45:25 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
09/08/17 12:45:25 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
09/08/17 12:45:25 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)
09/08/17 12:45:25 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
09/08/17 12:45:25 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
09/08/17 12:45:25 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
09/08/17 12:45:25 at java.lang.Thread.run(Thread.java:534)
<2009-08-17 12:45:25,877> <ERROR> <tmobilet.collaxa.cube.services> <PCException::<init>> User is not found.
<2009-08-17 12:45:25,877> <ERROR> <tmobilet.collaxa.cube.services> <PCException::<init>> User "BSAUNDE4" is not found in realm "tmobilet".
<2009-08-17 12:45:25,877> <ERROR> <tmobilet.collaxa.cube.services> <PCException::<init>> Check the error stack and fix the cause of the error. Contact
Edited by: user11798418 on Aug 17, 2009 10:30 AM>
I have my application jar on the server, and launch this JFrame application from the browser. ><zen question>
Which particular 'the browser'? What version of what browser running on what OS?
</zen question>
The reason I ask is that it is up to the browser to call an applet's stop()/destroy() methods and if they do not do so - there is almost nothing we as developers can do about it.
If you need such reliable shut down behaviour, it would be best to launch the applet or frame using Java Web Start. -
Java.sql.SQLException: Closed Connection error when invoking web service
Hi
I've assembled a simple web service for an Oracle PL/SQL package and deployed it on a Standalone OC4J, when I come to invoke it on the Oracle Enterprise Manager screen I'm getting the following returned within the envelope body:
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>Internal Server Error (serialization error: java.sql.SQLException: java.sql.SQLException: Closed Connection)</faultstring>
</env:Fault>
</env:Body>
The function that is called within the database returns a user defined object that consists of a RAW value and an XMLTYPE. The function takes a string as a parameter, when I enter a string that I know will not return an object there is no error in the envelope body, only when there is an object to return does the error appear.
Anyone have any suggestion as to why this is?I'm no further forward with this: has anyone assembled, deployed and invoked a web service that returns a XMLTYPE?? I know this should be possible but I think there's maybe some manual intervention required with the classes created with webservicesassembler: I'd really appreciate it if anyone with any experience of this kind of thing could help me think this through.
-
Java.sql.SQLException: Closed Connection
Hello
I am getting a java.sql.SQLException: Closed Connection with a simple SELECT query. This seems to be happening if i leave a session time out on a browser window. After i log on again and try to access a page which calls this simple SELECT query im getting this:
java.sql.SQLException: Closed Connection
<Error><JTA><BEA-110412><Name=[EJB com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke<com.bea.wlw.runitme.core.request.Request>], Xid=.....Status=Rolled back.[Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],HeuristicErrorCode=XA_HEURHAZ......
I need to shutdown and startup WebLogic to get my SELECT query running again in such a situation.
HELP PLEASE, any suggestions?
thanks lots
rinaHello
Please note that i am using pageflows and my select query is in a .jcx file. Here is the full stack trace:
<29-May-2007 14:58:28 o'clock BST> <Warning> <WLW> <BTG005273> <portalServer> <ExecuteThread: '14' for queue: 'default'> <admin> <BEA1-0082B1D46822545AA9E0> <000000> <Id=top-level; Method=portlets.Admin.ManagedMobile.CreateUser.Uup_Usercontext.getCusPneumonics(); Failure=java.sql.SQLException: Closed Connection [ServiceException]>
####<29-May-2007 14:58:28 o'clock BST> <Error> <JTA> <BTG005273> <portalServer> <ExecuteThread: '14' for queue: 'default'> <admin> <BEA1-0082B1D46822545AA9E0> <BEA-110412> <Name=[EJB com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(com.bea.wlw.runtime.core.request.Request)],Xid=BEA1-0082B1D46822545AA9E0(42197291),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=60,activeThread=Thread[ExecuteThread: '14' for queue: 'default',5,Thread Group for Queue: 'default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=portalServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@283f1b9,re-Registered = false),SCInfo[TestPortal+portalServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(com.bea.wlw.runtime.core.request.Request)], weblogic.jdbc=t3://10.235.102.63:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=portalServer+10.235.102.63:7001+TestPortal+t3+, XAResources={},NonXAResources={})],CoordinatorURL=portalServer+10.235.102.63:7001+TestPortal+t3+) completed heuristically: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: Closed Connection)) >
####<29-May-2007 14:58:28 o'clock BST> <Error> <EJB> <BTG005273> <portalServer> <ExecuteThread: '14' for queue: 'default'> <admin> <> <BEA-010025> <Exception occurred during rollback of transaction Name=[EJB com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(com.bea.wlw.runtime.core.request.Request)],Xid=BEA1-0082B1D46822545AA9E0(42197291),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=60,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=portalServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@283f1b9,re-Registered = false),SCInfo[TestPortal+portalServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(com.bea.wlw.runtime.core.request.Request)], weblogic.jdbc=t3://10.235.102.63:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=portalServer+10.235.102.63:7001+TestPortal+t3+, XAResources={},NonXAResources={})],CoordinatorURL=portalServer+10.235.102.63:7001+TestPortal+t3+): javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: Closed Connection))
at weblogic.transaction.internal.ServerTransactionImpl.internalRollback()V(ServerTransactionImpl.java:396)
at weblogic.transaction.internal.ServerTransactionImpl.rollback()V(ServerTransactionImpl.java:362)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(BaseEJBObject.java:279)
at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(StatelessEJBObject.java:140)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:110)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
at $Proxy13.getCusPneumonics(Ljava.lang.String;)Ljavax.sql.RowSet;(Unknown Source)
at portlets.Admin.ManagedMobile.CreateUser.CreateUserController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(CreateUserController.jpf:189)
at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1507)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(Ljava.lang.String;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1433)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.struts.action.ActionForward;(FlowController.java:764)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.struts.action.ActionForward;(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.struts.action.ActionForward;(FlowController.java:594)
at org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.action.Action;Lorg.apache.struts.action.ActionForm;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:507)
at com.bea.wlw.netui.pageflow.PageFlowUtils.strutsLookup(Ljavax.servlet.ServletContext;Ljavax.servlet.ServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljava.lang.String;[Ljava.lang.String;)Lcom.bea.wlw.netui.pageflow.ActionResult;(PageFlowUtils.java:1617)
at com.bea.netuix.servlets.controls.content.PageflowContent.preRender()V(PageflowContent.java:449)
at com.bea.netuix.nf.ControlLifecycle$5.visit(Lcom.bea.netuix.nf.UIControl;Ljava.lang.Object;)Z(ControlLifecycle.java:405)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom.bea.netuix.nf.VisitorType;Lcom.bea.netuix.nf.UIControl;Ljava.lang.Object;Lcom.bea.netuix.nf.concurrency.ControlTreeWalkerPool;Lcom.bea.netuix.nf.concurrency.WorkerCount;ZZ)V(ControlTreeWalker.java:618)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom.bea.netuix.nf.VisitorType;Lcom.bea.netuix.nf.UIControl;Ljava.lang.Object;Lcom.bea.netuix.nf.concurrency.ControlTreeWalkerPool;Lcom.bea.netuix.nf.concurrency.WorkerCount;ZZ)V(ControlTreeWalker.java:629)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom.bea.netuix.nf.VisitorType;Lcom.bea.netuix.nf.UIControl;Ljava.lang.Object;Lcom.bea.netuix.nf.concurrency.ControlTreeWalkerPool;Lcom.bea.netuix.nf.concurrency.WorkerCount;ZZ)V(ControlTreeWalker.java:629)
[/i PLEASE HELP
Thanks
Rina -
PLSQL webservice eventually gives java.sql.SQLException: Closed Connection
Hi
We have created a web service based on a plsql procedure in jdeveloper 10.1.2.1.0
We deployed the web service to .ear file in jdev and then deployed that ear file to our 10.1.2 app server.
The web service works fine for a short time but then gives
java.sql.SQLException: Closed Connection
The web service is not used frequently so it's possible the connection is timing out. I haven't tested invoking the web service perodically to see if it remains alive.
I tried to follow this note on metalink
https://metalink.oracle.com/metalink/plsql/f?p=130:14:2526430465590485698::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,370209.1,1,1,1,helvetica
Which wants me to make changes to the file <webservice_name>Base.java in our case GPAuditBase.java
My questions are:
1. In the jdeveloper navigator there is a file called GPAuditBase.sqlj but it does not contain all the code mentioned in the metalink note. Specifically the finally{} section. Do I need to edit the generated GPAuditBase.java that is saved in the src folder for the project? That file seems to contain the code mentioned in the metalink note.
2. If so, how are those changes reflected in the ear file that I want to deploy to my app server? Do I change the files in the src folder and then deploy to ear in jdev
thanks
paul schweigerahem...
bump -
Intermittent java.sql.SQLException: Closed Connection HELP
We are using 10G rac, with jdbc string with failover with ojdbc14.jar thin client. I am getting this intermittent error
I can't understand why, my dba says there are no alrets on dbs. Never had an issue with code base on 9i, and classes12.jar. Using jdk 1.42. Usually when bounce weblogic we are okay, running 8.1sp2. I can't really bounce weblogic when this happens everytime so I need to figure out root cause and a way to fix the pool without bouncing. I tried reseting the pool won't work, funnny thing is other pools connnecting to same db, but different schema are not showing this error. any help would be appreiciated.
Anyone come across this issue Help
@4000000047b08bfd0530357c DBLogger - Driver Name Version : Oracle JDBC driver
@4000000047b08bfd0530a6c4 DBLogger - Driver Version : 10.2.0.3.0
@4000000047b08bfd0531c004 DBLogger - Driver Major Version : 10
@4000000047b08bfd0531c7d4 DBLogger - Driver Minor Version : 2
@4000000047b08bfd09eec344 SQL Exception: Closed Connection
@4000000047b08bfd09f0f5c4 java.sql.SQLException: Closed Connection
@4000000047b08bfd09fd6174 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE
rror.java:112)
@4000000047b08bfd09fe8e3c at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE
rror.java:146)
@4000000047b08bfd0a0099ac at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE
rror.java:208)
@4000000047b08bfd0a029194 at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(Physical
Connection.java:1057)
Here is entry of pool
<JDBCConnectionPool CapacityIncrement="2"
ConnLeakProfilingEnabled="true"
DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="5"
MaxCapacity="20" Name="NightFirePool"
Password="{3DES}nQGiomkBhcA=" Properties="user=nfire"
ShrinkFrequencySeconds="900" Targets="eai00prod"
TestConnectionsOnCreate="true" TestConnectionsOnRelease="true"
TestConnectionsOnReserve="true" TestFrequencySeconds="60"
TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PR
OTOCOL=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_N
AME=eaiprod)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=5)(DELAY=10))))"/>Irfan Ahmed wrote:
We are using 10G rac, with jdbc string with failover with ojdbc14.jar thin client. I am getting this intermittent error
I can't understand why, my dba says there are no alrets on dbs. Never had an issue with code base on 9i, and classes12.jar.
Using jdk 1.42. Usually when bounce weblogic we are okay, running 8.1sp2. I can't really bounce weblogic when this happens
everytime so I need to figure out root cause and a way to fix the pool without bouncing. I tried reseting the pool won't
work, funnny thing is other pools connnecting to same db, but different schema are not showing this error. any help would
be appreiciated.
Anyone come across this issue Help
@4000000047b08bfd0530357c DBLogger - Driver Name Version : Oracle JDBC driver
@4000000047b08bfd0530a6c4 DBLogger - Driver Version : 10.2.0.3.0
@4000000047b08bfd0531c004 DBLogger - Driver Major Version : 10
@4000000047b08bfd0531c7d4 DBLogger - Driver Minor Version : 2
@4000000047b08bfd09eec344 SQL Exception: Closed Connection
@4000000047b08bfd09f0f5c4 java.sql.SQLException: Closed Connection
@4000000047b08bfd09fd6174 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE
rror.java:112)
@4000000047b08bfd09fe8e3c at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE
rror.java:146)
@4000000047b08bfd0a0099ac at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE
rror.java:208)
@4000000047b08bfd0a029194 at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(Physical
Connection.java:1057)
Here is entry of pool
<JDBCConnectionPool CapacityIncrement="2"
ConnLeakProfilingEnabled="true"
DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="5"
MaxCapacity="20" Name="NightFirePool"
Password="{3DES}nQGiomkBhcA=" Properties="user=nfire"
ShrinkFrequencySeconds="900" Targets="eai00prod"
TestConnectionsOnCreate="true" TestConnectionsOnRelease="true"
TestConnectionsOnReserve="true" TestFrequencySeconds="60"
TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PR
OTOCOL=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_N
AME=eaiprod)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=5)(DELAY=10))))"/>Hi. Can you show me the whole stacktrace?
Your pool could be faster, without any
bad side-effects, by turning off TestConnectionsOnCreate
and TestConnectionsOnRelease. They don't help. I would
also suggest turning off shrinking. Those changes will
make the pool faster and more stable. I''d like the
stack trace to see if there's any hint about who closed
the connection...
Joe -
Java.sql.SQLException: Closed Connection: next
java.sql.SQLException: Closed Connection: next
Here's the JDBC SELECT code:
Class.forName(driver);
con = DriverManager.getConnection(url, user, password);
stmt = con.createStatement();
rs = stmt.executeQuery(select_query);
while(rs.next()) /*Exception occurs on this line! */
Here's what I know:
I can connect to the instance using TORA ok.
The SQL query returns rows from TORA.
I believe the connections are ok because if I purposely mess up the syntax, I get back ORA-errors.
I can execute an INSERT statement ok from a servlet.
I'm using the classes12.zip drivers from the oracle jdbc installation directory.
I'm using the default JDK in WSAD 5.1
Thank you all for helping!
Ryan
[email protected]Ryan,
I'm only guessing, but I don't think that:
DriverManager.getConnection(url, user, password);is how to obtain a "Connection" object when using WSAD ("WebSphere", right?) -- even though I don't use WSAD, myself.
Is the java code you posted part of a POJO (Plain Old Java Object)? Or a servlet? Or an EJB? Or a JSP?
Remember, error messages can sometimes be misleading.
What Oracle database version are you using?
What platform are you using?
Good Luck,
Avi. -
Java.sql.SQLException: ORA-00933: error when executing query
Hello,
I am trying to execute the following query from a jsp page.
String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";
stmt.executeQuery(sqlUpdate);
I get the follwoing error java.sql.SQLException: ORA-00933: SQL command not properly ended
When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.
Thanks,
Nikky128Nikky128 wrote:
Hello,
I am trying to execute the following query from a jsp page.There's a big part of your problem. You shouldn't be doing database stuff in JSPs. If you must, you should be using JSTL and its <sql> tags.
String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";Not using PreparedStatement here is just a silly noob error.
When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.Probably a single or double quote that you can't see. PreparedStatement will eliminate that problem.
% -
Java.sql.SQLException:login again to server
Hello,
I have a web site deployed on ias 6.5
the connnection closes during the night when it is left idle.
then i need to restart the app server since connection with the database is lost.
Pls help
VishalAre you using IAS conenction pooling ?
Whenever programs uses the connection, check the connection whether or not is alive. If not, recconnect it. -
I am trying to connect to SQL Server 2000 from a JSP (Weblogic 7.0) using a
connection pool. (Without datasource etc). I am getting the above mentioned
exception.
If i connect through sun.jdbc.odbc it works fine. I dont know what i am
doing wrong. Can anyone help out with this problem.
thnx in advance.
FrankyFranky Ronald D'Souza wrote:
I am trying to connect to SQL Server 2000 from a JSP (Weblogic 7.0) using a
connection pool. (Without datasource etc). I am getting the above mentioned
exception.
If i connect through sun.jdbc.odbc it works fine. I dont know what i am
doing wrong. Can anyone help out with this problem.Whose SQLServer drier are you using? Can you connect to the DBMS using the
driver in a simple standalone program?
Joe
>
>
thnx in advance.
Franky -
Can anyone help.when trying to add a project from the creative cloud I get an error saying lost connection to server even though I am signed in to creative cloud.
Anyone would help me.
I am using linux, resin, jdk1.3 and Mysql plus mm.mysql driver. I write some static class which open one database connection for the class. I found that if the Server is ideal for period of time. When I doing the query again I meet same error message.
ava.sql.SQLException: Lost connection to server during query
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.Statement.executeQuery(Unknown Source)
at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Unknown Source)
at com.ccnet.desktop.Grouping.getDomainBanner(Grouping.java:1835) -
Parental control = lost connection to server
If parental controls are enabled -- even if child's use (for example, in Content) is not actually limited -- why do Safari and Firefox lose connection? Error message is "Firefox can't establish a connection to the server at [url]" for accounts that are "managed," that is, for which parental controls are enabled. Firefox works fine for all other accounts whether "standard" or "admin." This also happens in Safari: "can't connect to the server "livepage.apple.com"."
Anyone would help me.
I am using linux, resin, jdk1.3 and Mysql plus mm.mysql driver. I write some static class which open one database connection for the class. I found that if the Server is ideal for period of time. When I doing the query again I meet same error message.
ava.sql.SQLException: Lost connection to server during query
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.Statement.executeQuery(Unknown Source)
at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Unknown Source)
at com.ccnet.desktop.Grouping.getDomainBanner(Grouping.java:1835) -
Toplink + Websphere : java.sql.SQLException: DSRA9420E:
Hello,
I 'm getting this exception on a Websphere environment using Toplink to access data base. I'm getting the connection from the database using a data source configured in the application server.
Any help is welcome ...
java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
Caused by: java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reactivate(WSJdbcConnection.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java(Compiled Code))
at oracle.toplink.queryframework.SQLCall.prepareStatement(SQLCall.java(Compiled Code))
... 60 more
Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reassociate(WSJdbcConnection.java(Compiled Code))
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.associateConnection(WSRdbManagedConnectionImpl.java(Compiled Code))
at com.ibm.ejs.j2c.MCWrapper.associateConnection(MCWrapper.java(Compiled Code))
at com.ibm.ejs.j2c.ConnectionManager.reassociateConnectionHandle(ConnectionManager.java(Compiled Code))
at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))you mean the WAS configuration for the data source ?
toplink is configured so as to use the WAS datasource, and use external pooling.
here is the complete stack trace :
Caused by: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.9) (Build 060118)): oracle.toplink.exceptions.DatabaseException
Description de l'exception : java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
Exception interne : java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
Code d'erreur : 0
at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java(Compiled Code))
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java(Compiled Code))
at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java(Compiled Code))
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java(Compiled Code))
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java(Inlined Compiled Code))
at oracle.toplink.internal.queryframework.CallQueryMechanism.selectOneRow(CallQueryMechanism.java(Compiled Code))
at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java(Inlined Compiled Code))
at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java(Compiled Code))
at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java(Compiled Code))
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java(Compiled Code))
at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java(Compiled Code))
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java(Inlined Compiled Code))
at oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java(Inlined Compiled Code))
at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java(Compiled Code))
at oracle.toplink.publicinterface.Session.executeQuery(Session.java(Compiled Code))
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java(Compiled Code))
at oracle.toplink.publicinterface.Session.executeQuery(Session.java(Compiled Code))
at oracle.toplink.publicinterface.Session.executeQuery(Session.java(Inlined Compiled Code))
at oracle.toplink.publicinterface.Session.readObject(Session.java(Compiled Code))
... 25 more
Caused by: java.sql.SQLException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reactivate(WSJdbcConnection.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java(Compiled Code))
at oracle.toplink.queryframework.SQLCall.prepareStatement(SQLCall.java(Compiled Code))
... 45 more
Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA9420E: Connection cannot be reassociated because child objects are still open., error code: CHILDREN_STILL_OPEN
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java(Compiled Code))
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reassociate(WSJdbcConnection.java(Compiled Code))
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.associateConnection(WSRdbManagedConnectionImpl.java(Compiled Code))
at com.ibm.ejs.j2c.MCWrapper.associateConnection(MCWrapper.java(Compiled Code))
at com.ibm.ejs.j2c.ConnectionManager.reassociateConnectionHandle(ConnectionManager.java(Compiled Code))
at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
... 50 more -
Hi
I'm migrate from MS SQL 2005 to Oracle 11g using SQL Developer V3.0.04
Trying to use the batch file migration.bat. Found the documentation with migration -help=guide
Every action I start results in the SQLException below:
D:\oracle\product\sqldeveloper_3.0.04\sqldeveloper\sqldeveloper\bin>migration -actions=mkconn -connDetails=super_oracle:oracle:system/manager@xxxxxxxx:1521/mps
Error: java.sql.SQLException: Invalid connection information specified.
Verify the URL format for the specified driver.
HELP:
Running the command with -output=d:\migr creates a logfile with the same error message.
If I run the login credential with sqlplus system/manager@xxxxxxxx:1521/mps, I manage to connect to the database.
I assume the help is wrong specifying host:port:sid. I think host:port/sid is correct, at least with sqlplus this works
If I do a migration with sqldeveloper it works too.
I'm lost at this point. Any advise is appreciated.
Thanks a lot
BeatHi
In SQL Developer, did you already create a connection to the Oracle database storing the Migration Repository?
Yes
I do:
migration -action=init -conn=MyRepositoryDB
HELP:
Syntax:
Migration -help|-h=<actions> to get help on one or more actions.
where
+<actions> could be one or more (comma separated list) actions or guide+
guide provides a walk through of a typical migration
Examples:
Migration -help=capture
Migration -h=capture,convert
Migration -h=guide
The message: init completed successfully is missing. Only HELP:.......... is showing up
The same if I do now:
D:\oracle\product\sqldeveloper_3.0.04\sqldeveloper\sqldeveloper\bin>migration -action=lsconn
HELP:
Syntax:
Migration -help|-h=<actions> to get help on one or more actions.
where
+<actions> could be one or more (comma separated list) actions or guide+
guide provides a walk through of a typical migration
Examples:
Migration -help=capture
Migration -h=capture,convert
Migration -h=guide
Valid actions:
capture, convert, datamove, delcaptured, delconn, delconverted, driver, generate, guide, idmap, info, init, ls
m, runsql, scan and translate
D:\oracle\product\sqldeveloper_3.0.04\sqldeveloper\sqldeveloper\bin>
Only HELP:.......... is showing up
Maybe you are looking for
-
Date prompt issue in obiee 10g
Hi Experts, Am facing the date prompt error, but the type is mentioned as date, after this also am getting same problem plz help Thanks Vijay
-
Java.lang.OutOfMemoryError: unable to create new native thread
Hi All, I have installed weblogic server 8 sp4 in production environment . I am facing problems with JVM issues . JVM is crashing very frequently with the following errro : ####<Jun 18, 2009 10:58:22 AM IST> <Info> <Common> <IMM90K-21> <SalesCom> <Ex
-
Looking for a convertor from HTML to PDF with J2SE
Hi all, My current project would generate some XML data and display it on the web. Needless to say I have to prepare a matching set of XSL to transform the XML into HTML. I got that part done. However, my project also requires a PDF output of the sam
-
Why can't I link one Pages document to another Pages document?
You'd think this would be a basic functionality in Pages: to be able to create a hyperlink in one Pages document that opens another Pages document. Currently I'm using iWork 2008, and I can't do this. Can I do it in iWork 2009? Until I can, iWork, in
-
What does per Wlan Band select and load balancing do ?
Good morning.....We recently upgraded our controllers from 4.2.185 to 6.0.188 and have noticed many clients having connectivity issues. We have Aggressive load balancing turned off globally but have noticed that band select and load balancing are ena