[GH-ISSUE #1432] Oracle DB procedural language block #318

Closed
opened 2026-03-07 20:47:40 +03:00 by kerem · 3 comments
Owner

Originally created by @DanHartman on GitHub (Jan 25, 2023).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1432

Describe the bug
PL/SQL blocks are receiving an error.

To Reproduce
Steps to reproduce the behavior:

  1. Launch an SQL Editor session by clicking the SQL button in the top banner
  2. Use the select connection drop down to use a previously defined connection to an oracle database
  3. Enter a simple "Hello World" PL/SQL block like this
BEGIN
  DBMS_OUTPUT.put_line ('Hello World!');
END;
/

  1. Execute SQL script with ALT+X
  2. I am receiving the error
Error executing query:
SQL Error [6550] [65000]: ORA-06550: line 3, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.

io.cloudbeaver.DBWebException: Error executing query:
SQL Error [6550] [65000]: ORA-06550: line 3, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.

	at io.cloudbeaver.service.sql.WebSQLProcessor.processQuery(WebSQLProcessor.java:217)
	at io.cloudbeaver.service.sql.impl.WebServiceSQL$1.run(WebServiceSQL.java:374)
	at io.cloudbeaver.model.session.WebSession$1.run(WebSession.java:722)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [6550] [65000]: ORA-06550: line 3, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.

	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
	at io.cloudbeaver.service.sql.WebSQLProcessor.lambda$1(WebSQLProcessor.java:209)
	at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:173)
	at io.cloudbeaver.service.sql.WebSQLProcessor.processQuery(WebSQLProcessor.java:177)
	... 4 more
Caused by: java.sql.SQLException: ORA-06550: line 3, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37)
	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
	at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1737)
	at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1692)
	at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300)
	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:329)
	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.lambda$0(JDBCStatementImpl.java:131)
	at org.jkiss.dbeaver.utils.SecurityManagerUtils.wrapDriverActions(SecurityManagerUtils.java:96)
	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
	... 7 more
Caused by: Error : 6550, Position : 48, Sql = BEGIN
  DBMS_OUTPUT.put_line('Hello World!');
END, OriginalSql = BEGIN
  DBMS_OUTPUT.put_line('Hello World!');
END, Error Msg = ORA-06550: line 3, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
	... 23 more

Screenshots
image

Desktop (please complete the following information):

  • Tested with Chrome on Linux Version 108.0.5359.71 (Official Build) (64-bit)
  • Oracle version is 19.3.0
  • Cloudbeaver deployed with docker tag: dbeaver/cloudbeaver:22.3.0

Expected result
Issuing this function via Oracle's sqlplus tool returns the following

SQL> BEGIN
  2    DBMS_OUTPUT.put_line('Hello World!');
  3  END;
  4  /

PL/SQL procedure successfully completed.

There was no output because the SET SERVEROUTPUT ON; statement had not been issued. But the block was compiled, which is the primary objective. I find it interesting that the error message says The symbol ";" was substituted for "end-of-file" to continue and then it appears that the absence of that semi-colon is then producing error PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

If you remove that final semi-colon and execute it again via sqlplus it returns the same error

SQL> BEGIN
  2    DBMS_OUTPUT.put_line('Hello World!');
  3  END
  4  /
END
  *
ERROR at line 3:
ORA-06550: line 3, column 3:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
following:
; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.
Originally created by @DanHartman on GitHub (Jan 25, 2023). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1432 **Describe the bug** PL/SQL blocks are receiving an error. **To Reproduce** Steps to reproduce the behavior: 1. Launch an SQL Editor session by clicking the `SQL` button in the top banner 2. Use the `select connection` drop down to use a previously defined connection to an oracle database 3. Enter a simple "Hello World" PL/SQL block like this ```SQL BEGIN DBMS_OUTPUT.put_line ('Hello World!'); END; / ``` 4. Execute SQL script with ALT+X 5. I am receiving the error ```sh Error executing query: SQL Error [6550] [65000]: ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol ";" was substituted for "end-of-file" to continue. io.cloudbeaver.DBWebException: Error executing query: SQL Error [6550] [65000]: ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol ";" was substituted for "end-of-file" to continue. at io.cloudbeaver.service.sql.WebSQLProcessor.processQuery(WebSQLProcessor.java:217) at io.cloudbeaver.service.sql.impl.WebServiceSQL$1.run(WebServiceSQL.java:374) at io.cloudbeaver.model.session.WebSession$1.run(WebSession.java:722) at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [6550] [65000]: ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol ";" was substituted for "end-of-file" to continue. at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133) at io.cloudbeaver.service.sql.WebSQLProcessor.lambda$1(WebSQLProcessor.java:209) at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:173) at io.cloudbeaver.service.sql.WebSQLProcessor.processQuery(WebSQLProcessor.java:177) ... 4 more Caused by: java.sql.SQLException: ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol ";" was substituted for "end-of-file" to continue. at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1737) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1692) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:329) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.lambda$0(JDBCStatementImpl.java:131) at org.jkiss.dbeaver.utils.SecurityManagerUtils.wrapDriverActions(SecurityManagerUtils.java:96) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131) ... 7 more Caused by: Error : 6550, Position : 48, Sql = BEGIN DBMS_OUTPUT.put_line('Hello World!'); END, OriginalSql = BEGIN DBMS_OUTPUT.put_line('Hello World!'); END, Error Msg = ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol ";" was substituted for "end-of-file" to continue. at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498) ... 23 more ``` **Screenshots** ![image](https://user-images.githubusercontent.com/1824639/214608047-6d2227da-f2f9-4b1a-95f8-aa22425ae5ce.png) **Desktop (please complete the following information):** - Tested with Chrome on Linux Version 108.0.5359.71 (Official Build) (64-bit) - Oracle version is 19.3.0 - Cloudbeaver deployed with docker tag: `dbeaver/cloudbeaver:22.3.0` **Expected result** Issuing this function via Oracle's `sqlplus` tool returns the following ```sh SQL> BEGIN 2 DBMS_OUTPUT.put_line('Hello World!'); 3 END; 4 / PL/SQL procedure successfully completed. ``` There was no output because the `SET SERVEROUTPUT ON;` statement had not been issued. But the block was compiled, which is the primary objective. I find it interesting that the error message says `The symbol ";" was substituted for "end-of-file" to continue` and then it appears that the absence of that semi-colon is then producing error `PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:` If you remove that final semi-colon and execute it again via `sqlplus` it returns the same error ```sh SQL> BEGIN 2 DBMS_OUTPUT.put_line('Hello World!'); 3 END 4 / END * ERROR at line 3: ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier> The symbol ";" was substituted for "end-of-file" to continue. ```
kerem closed this issue 2026-03-07 20:47:41 +03:00
Author
Owner

@DanHartman commented on GitHub (Jan 25, 2023):

It looks like this removing the semi-colon: https://github.com/dbeaver/cloudbeaver/blob/devel/webapp/packages/plugin-sql-editor/src/SQLParser.ts#L259-L264

<!-- gh-comment-id:1403853829 --> @DanHartman commented on GitHub (Jan 25, 2023): It looks like this removing the semi-colon: https://github.com/dbeaver/cloudbeaver/blob/devel/webapp/packages/plugin-sql-editor/src/SQLParser.ts#L259-L264
Author
Owner

@MarinaVorobeva21 commented on GitHub (Jan 26, 2023):

Thank you for the issue. It reproduces in our environments and will be fixed in future releases.

<!-- gh-comment-id:1405503011 --> @MarinaVorobeva21 commented on GitHub (Jan 26, 2023): Thank you for the issue. It reproduces in our environments and will be fixed in future releases.
Author
Owner

@dariamarutkina commented on GitHub (Mar 6, 2023):

Fixed in milestone 23.0.0

<!-- gh-comment-id:1456499784 --> @dariamarutkina commented on GitHub (Mar 6, 2023): Fixed in milestone 23.0.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#318
No description provided.