This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 165623

Summary: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: ** BEGIN NESTE
Product: db Reporter: Kenneth Ganfield <kganfield>
Component: CodeAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: blocker CC: sduvur, tonik
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=150805
Issue Type: DEFECT Exception Reporter: 150805
Attachments: stacktrace
stacktrace

Description Kenneth Ganfield 2009-05-20 16:01:14 UTC
Build: NetBeans IDE Dev (Build 200905190201)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-57, Java(TM) SE Runtime Environment, 1.6.0_07-b06-153
OS: Mac OS X, 10.5.6, x86_64

User Comments:
kganfield: trying to view data in mysql table in services window



Stacktrace: 
org.netbeans.modules.db.metadata.model.api.MetadataModelException: org.netbeans.modules.db.metadata.model.api.MetadataException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


** BEGIN NESTED EXCEPTION ** 

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
MESSAGE: The last packet successfully received from the server was94476 seconds ago.The last packet sent successfully to the server was 94476 seconds ago, which  is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

STACKTRACE:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was94476 seconds ago
        at org.netbeans.modules.db.metadata.model.JDBCConnMetadataModel.runReadAction(JDBCConnMetadataModel.java:99)
        at org.netbeans.modules.db.metadata.model.api.MetadataModel.runReadAction(MetadataModel.java:89)
        at org.netbeans.modules.db.explorer.node.TableNodeProvider.initialize(TableNodeProvider.java:99)
        at org.netbeans.api.db.explorer.node.NodeProvider.getNodes(NodeProvider.java:103)
        at org.netbeans.modules.db.explorer.node.NodeRegistry.getNodes(NodeRegistry.java:149)
        at org.netbeans.api.db.explorer.node.ChildNodeFactory.createKeys(ChildNodeFactory.java:104)
Comment 1 Kenneth Ganfield 2009-05-20 16:01:26 UTC
Created attachment 82492 [details]
stacktrace
Comment 2 Jiri Rechtacek 2009-06-19 15:58:10 UTC
*** Issue 164853 has been marked as a duplicate of this issue. ***
Comment 3 Exceptions Reporter 2009-06-30 16:08:24 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows Vista, 6.0, amd64

User Comments: 
Connecting to remote mysql database. expanded connection, expanded database, expanded Tables. That's when i got the error. 

Stacktrace: 
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


** BEGIN NESTED EXCEPTION ** 

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
MESSAGE: Communications link failure

Last packet sent to the server was 0 ms ago.

STACKTRACE:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
	at com.mysql.jdbc.MysqlIO.reuseAndReadPacke
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:0)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
Comment 4 Exceptions Reporter 2009-06-30 16:08:42 UTC
Created attachment 84197 [details]
stacktrace
Comment 5 Exceptions Reporter 2009-06-30 16:09:00 UTC
This issue already has 7 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150805
Comment 6 Exceptions Reporter 2009-08-17 15:45:31 UTC
This issue already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150805
Comment 7 Jiri Rechtacek 2009-08-21 09:54:52 UTC
*** Issue 170256 has been marked as a duplicate of this issue. ***
Comment 8 Exceptions Reporter 2009-09-10 06:44:51 UTC
This issue already has 12 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=150805
Comment 9 schkovich 2011-07-13 14:08:09 UTC
Product Version: NetBeans IDE Dev (Build 201107120600)
Java: 1.6.0_22; OpenJDK 64-Bit Server VM 20.0-b11
System: Linux version 2.6.38-10-generic running on amd64; UTF-8; en_GB (nb)

I was trying to invoke code completion of column name in SQL query. Connection was present. I will install Java JDK over the weekend and try to reproduce the problem.

(SQLCompletionQuery.java:627)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.completeColumnSimpleIdent(SQLCompletionQuery.java:464)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.completeColumn(SQLCompletionQuery.java:420)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.completeSelect(SQLCompletionQuery.java:231)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.doQuery(SQLCompletionQuery.java:207)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery$1.run(SQLCompletionQuery.java:163)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery$1.run(SQLCompletionQuery.java:150)
	at org.netbeans.modules.db.metadata.model.JDBCConnMetadataModel.runReadAction(JDBCConnMetadataModel.java:97)
Caused: org.netbeans.modules.db.metadata.model.api.MetadataModelException
	at org.netbeans.modules.db.metadata.model.JDBCConnMetadataModel.runReadAction(JDBCConnMetadataModel.java:102)
	at org.netbeans.modules.db.metadata.model.api.MetadataModel.runReadAction(MetadataModel.java:92)
[catch] at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.doQuery(SQLCompletionQuery.java:150)
	at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.query(SQLCompletionQuery.java:139)
	at org.netbeans.modules.db.sql.editor.api.completion.SQLCompletion.query(SQLCompletion.java:85)
	at org.netbeans.modules.php.editor.sql.PHPSQLCompletion$Query.doQuery(PHPSQLCompletion.java:110)
	at org.netbeans.modules.php.editor.sql.PHPSQLCompletion$Query.query(PHPSQLCompletion.java:83)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:223)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.apache.commons.logging.impl.NoOpLog arbitrarily from one of ModuleCL@19fac852[org.netbeans.modules.html.validation] and ModuleCL@3ea86d12[org.netbeans.libs.commons_logging] starting from SystemClassLoader[256 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
Comment 10 Jaroslav Havlin 2012-05-17 15:39:03 UTC
Issues related to refreshing of tree nodes had probably been solved,
I wasn't able to reproduce them.

Exception-handling that affects auto-completion was fixed:
http://hg.netbeans.org/core-main/rev/23bbbe7d9f3a
http://hg.netbeans.org/core-main/rev/b24c4a329cd6
Comment 11 Quality Engineering 2012-05-18 09:51:43 UTC
Integrated into 'main-golden', will be available in build *201205180400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/23bbbe7d9f3a
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #165623 - Handle undocumented exceptions in DatabaseMetadata methods