Forum Stats

  • 3,752,633 Users
  • 2,250,529 Discussions
  • 7,867,903 Comments

Discussions

Error while running script in Sqlcl

User_ZUUOD
User_ZUUOD Member Posts: 798 Bronze Badge
edited Oct 19, 2017 2:49PM in SQLcl

Hi All,

Please suggest why I am getting this error in Sqlcl.

pastedImage_0.png

Best Answer

  • Gary Graham-Oracle
    Gary Graham-Oracle Member Posts: 3,256 Bronze Crown
    edited Oct 19, 2017 2:22PM Accepted Answer

    There is a bug in 17.3 with a workaround:  set encoding UTF8

    For example...

    SQL> show versionOracle SQLDeveloper Command-Line (SQLcl) version: 17.3.0.256.1818SQL> show encodingEncoding:WE8MSWIN1252SQL> @ test.sql  Oct 19, 2017 11:18:56 AM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor <init>SEVERE: Could not process url:file:/C:/Tools/sqlcl/r17_3/sqlcl/bin/test.sqlOct 19, 2017 11:18:56 AM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor runSEVERE: java.io.Reader.<init>(Unknown Source)java.lang.NullPointerException        at java.io.Reader.<init>(Unknown Source)        at java.io.BufferedReader.<init>(Unknown Source)        at java.io.BufferedReader.<init>(Unknown Source)        at oracle.dbtools.raptor.newscriptrunner.ScriptParser.scriptParserInit(ScriptParser.java:87)        at oracle.dbtools.raptor.newscriptrunner.ScriptParser.<init>(ScriptParser.java:83)        at oracle.dbtools.raptor.newscriptrunner.ScriptParser.<init>(ScriptParser.java:75)        at oracle.dbtools.raptor.newscriptrunner.FallbackParserProvider.<init>(FallbackParserProvider.java:22)        at oracle.dbtools.raptor.newscriptrunner.SqlParserProvider.getScriptParserIterator(SqlParserProvider.java:25)        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:169)        at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runExecuteFile(SQLPLUS.java:3870)        at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.run(SQLPLUS.java:210)        at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQLPLUS(ScriptRunner.java:406)        at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:243)        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:337)        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:225)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:390)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:401)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:1225)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:477)SQL> set encoding UTF8SQL> @ test.sqlD-XSQL>

    where test.sql contains "select * from dual;"

Answers

  • John Thorton
    John Thorton Member Posts: 14,493 Silver Crown
    edited Oct 18, 2017 4:53PM

    post COPY & PASTE proof that you can successfully run any "sample.sql"  script

    post content of xplan.sql file

    You can COPY directly from Windows CMD terminal.

  • User_ZUUOD
    User_ZUUOD Member Posts: 798 Bronze Badge
    edited Oct 18, 2017 5:11PM

    I am not able to run even select * from dual script.

  • Paulzip
    Paulzip Member Posts: 8,423 Blue Diamond
    edited Oct 18, 2017 5:32PM

    Probably should be moved to the SQLcl forums.

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,778 Bronze Crown
    edited Oct 18, 2017 8:27PM

    sqlcl version?

  • BluShadow
    BluShadow Member, Moderator Posts: 41,321 Red Diamond
    edited Oct 19, 2017 3:33AM

    *** Moderator Note: Question now moved to the SQLcl product space as this is more about the tool than the SQL or PL/SQL languages.

  • Gary Graham-Oracle
    Gary Graham-Oracle Member Posts: 3,256 Bronze Crown
    edited Oct 19, 2017 2:22PM Accepted Answer

    There is a bug in 17.3 with a workaround:  set encoding UTF8

    For example...

    SQL> show versionOracle SQLDeveloper Command-Line (SQLcl) version: 17.3.0.256.1818SQL> show encodingEncoding:WE8MSWIN1252SQL> @ test.sql  Oct 19, 2017 11:18:56 AM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor <init>SEVERE: Could not process url:file:/C:/Tools/sqlcl/r17_3/sqlcl/bin/test.sqlOct 19, 2017 11:18:56 AM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor runSEVERE: java.io.Reader.<init>(Unknown Source)java.lang.NullPointerException        at java.io.Reader.<init>(Unknown Source)        at java.io.BufferedReader.<init>(Unknown Source)        at java.io.BufferedReader.<init>(Unknown Source)        at oracle.dbtools.raptor.newscriptrunner.ScriptParser.scriptParserInit(ScriptParser.java:87)        at oracle.dbtools.raptor.newscriptrunner.ScriptParser.<init>(ScriptParser.java:83)        at oracle.dbtools.raptor.newscriptrunner.ScriptParser.<init>(ScriptParser.java:75)        at oracle.dbtools.raptor.newscriptrunner.FallbackParserProvider.<init>(FallbackParserProvider.java:22)        at oracle.dbtools.raptor.newscriptrunner.SqlParserProvider.getScriptParserIterator(SqlParserProvider.java:25)        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:169)        at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runExecuteFile(SQLPLUS.java:3870)        at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.run(SQLPLUS.java:210)        at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQLPLUS(ScriptRunner.java:406)        at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:243)        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:337)        at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:225)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:390)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:401)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:1225)        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:477)SQL> set encoding UTF8SQL> @ test.sqlD-XSQL>

    where test.sql contains "select * from dual;"