Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3416

Syntax error on executing "ROLLBACK" statement

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 10.3.1.4
    • Component/s: JDBC
    • Labels:
      None

      Description

      Trying to execute the following code :
      Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
      Properties properties = new Properties();
      properties.setProperty("user","");
      properties.setProperty("password", "");
      Connection con = DriverManager.getConnection("jdbc:derby:sample", properties);
      con.createStatement().execute("ROLLBACK");

      I got the following error:

      java.sql.SQLSyntaxErrorException: Syntax error: Encountered "<EOF>" at line 1, column 8.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:91)
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:202)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:585)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:528)
      at scriptella.driver.derby.DerbyScriptTest.test(DerbyScriptTest.java:54)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
      Caused by: java.sql.SQLException: Syntax error: Encountered "<EOF>" at line 1, column 8.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:135)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
      ... 29 more
      Caused by: ERROR 42X01: Syntax error: Encountered "<EOF>" at line 1, column 8.
      at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
      at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(ParserImpl.java:155)
      at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:280)
      at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
      at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:753)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:579)
      ... 23 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              volk Kirill Volgin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: