java.sql.SQLNonTransientConnectionException: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message (additional information may be available in the derby.log file on the server)

Apache's JIRA Issue Tracker | Dag H. Wanvik | 6 years ago
  1. 0

    Cf the attached repro: when performing the rollback after the database has been shutdown, we see this error: There was 1 error: 1) testShutdown(org.apache.derbyTesting.functionTests.tests.store.Foo)java.sql.SQLNonTransientConnectionException: Network protocol exception: actual code point, 4,692, does not match expected code point, 9,224. The connection has been terminated. at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71) at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:358) at org.apache.derby.client.am.Connection.rollback(Connection.java:659) at org.apache.derbyTesting.junit.BaseJDBCTestCase.rollback(BaseJDBCTestCase.java:387) at org.apache.derbyTesting.functionTests.tests.store.Foo.testShutdown(Foo.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25) at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25) Caused by: org.apache.derby.client.am.DisconnectException: Network protocol exception: actual code point, 4,692, does not match expected code point, 9,224. The connection has been terminated. at org.apache.derby.client.net.Reply.parseLengthAndMatchCodePoint(Reply.java:1075) at org.apache.derby.client.net.NetConnectionReply.parseSQLCARD(NetConnectionReply.java:2572) at org.apache.derby.client.net.NetConnectionReply.parseRDBRLLBCKreply(NetConnectionReply.java:219) at org.apache.derby.client.net.NetConnectionReply.readLocalRollback(NetConnectionReply.java:141) at org.apache.derby.client.net.ConnectionReply.readLocalRollback(ConnectionReply.java:48) at org.apache.derby.client.net.NetConnection.readLocalRollback_(NetConnection.java:1515) at org.apache.derby.client.am.Connection.readRollback(Connection.java:707) at org.apache.derby.client.am.Connection.flowRollback(Connection.java:690) at org.apache.derby.client.am.Connection.rollback(Connection.java:655) ... 29 more

    Apache's JIRA Issue Tracker | 6 years ago | Dag H. Wanvik
    java.sql.SQLNonTransientConnectionException: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message (additional information may be available in the derby.log file on the server)
  2. 0

    Answer a Question | WebRatio

    webratio.com | 6 months ago
    java.sql.SQLNonTransientConnectionException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only 0 bytes.  The connection has been terminated.
  3. 0

    Catch DatabaseException

    Oracle Community | 1 decade ago | 843830
    org.apache.derby.client.am.DisconnectException: A communication error has been detected. Communication protocol being used: Reply.fill(). Communication API being used: InputStream.read(). Location where the error was detected: insufficient data. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS Error Code: -4499 Call:SELECT ID, NAME, VALUE FROM SETTING WHERE (NAME = CAST (? AS VARCHAR(32672) )) bind => [admin.password] Query:ReportQuery(test.persistence.Setting)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If the database doesn't exist, the system hang hard, and it is hard to recover... hard reboot required. It is a bit boring. The Eclipse log gives a !ENTRY org.hibernate.eclipse 2 30000 2006-07-06 11:34:34.760 !MESSAGE WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata !STACK 0 org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found. at org.apache.derby.client.net.NetConnectionReply.parseRDBNFNRM(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source) at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source) at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source) at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260) at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:133) at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:119) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:123) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:229) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:234) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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 org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

    Hibernate JIRA | 1 decade ago | Brice Laurencin
    org.apache.derby.client.am.DisconnectException: The application server rejected establishment of the connection. An attempt was made to access a database, Traffic, which was not found.
  6. 0

    Can not catch DatabaseException!?

    Oracle Community | 1 decade ago | Dan_B
    org.apache.derby.client.am.DisconnectException: A communication error has been detected. Communication protocol being used: Reply.fill(). Communication API being used: InputStream.read(). Location where the error was detected: insufficient data. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS Error Code: -4499 Call:SELECT ID, NAME, VALUE FROM SETTING WHERE (NAME = CAST (? AS VARCHAR(32672) )) bind => [admin.password] Query:ReportQuery(test.persistence.Setting)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.derby.client.am.DisconnectException

      A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message (additional information may be available in the derby.log file on the server)

      at org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM()
    2. Apache Derby Client JDBC Driver
      Statement.executeQuery
      1. org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM(NetConnectionReply.java:882)
      2. org.apache.derby.client.net.NetStatementReply.parsePrepareError(NetStatementReply.java:550)
      3. org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(NetStatementReply.java:144)
      4. org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(NetStatementReply.java:53)
      5. org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(StatementReply.java:40)
      6. org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(NetStatement.java:138)
      7. org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Statement.java:1443)
      8. org.apache.derby.client.am.Statement.flowExecute(Statement.java:2117)
      9. org.apache.derby.client.am.Statement.executeQueryX(Statement.java:492)
      10. org.apache.derby.client.am.Statement.executeQuery(Statement.java:477)
      11. org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
      12. org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:358)
      13. org.apache.derby.client.am.Statement.executeQuery(Statement.java:486)
      13 frames
    3. org.apache.derbyTesting
      Foo.testShutdown
      1. org.apache.derbyTesting.functionTests.tests.store.Foo.testShutdown(Foo.java:102)
      1 frame
    4. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3 frames
    5. org.apache.derbyTesting
      BaseTestCase.runBare
      1. org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
      1 frame
    6. JUnit
      TestSetup.run
      1. junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      2. junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      3. junit.extensions.TestSetup.run(TestSetup.java:25)
      3 frames
    7. org.apache.derbyTesting
      BaseTestSetup.run
      1. org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      1 frame
    8. JUnit
      TestSetup.run
      1. junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      2. junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      3. junit.extensions.TestSetup.run(TestSetup.java:25)
      3 frames