Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange errors in sqldeveloper console #38

Open
wienerri opened this issue Jul 19, 2021 · 3 comments
Open

Strange errors in sqldeveloper console #38

wienerri opened this issue Jul 19, 2021 · 3 comments
Assignees

Comments

@wienerri
Copy link

wienerri commented Jul 19, 2021

I have got strange errors in sqldeveloper console. I don't know how it is important, formating code seems to be working OK.

I have downloaded latest version of plsql-formatter-settings-main.zip (readme date is 18.7.2021 16:34).

Console output:

Bind var 'offset' not found: null
Symbol 'analytic_clause[6,12)' not found
Symbol 'JSON_OBJECT' not found
incrementalAlignments callback: null
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at oracle.dbtools.arbori.Program.javaCallback(Program.java:1344)
        at oracle.dbtools.arbori.Program.eval(Program.java:1243)
        at oracle.dbtools.app.Format.format(Format.java:375)
        at oracle.dbtools.raptor.config.FormatSQLOptionsPanel.updatePreview(FormatSQLOptionsPanel.java:654)
        at oracle.dbtools.raptor.config.FormatSQLAdvancedOptions.valueChanged(FormatSQLAdvancedOptions.java:370)
        at javax.swing.JTree.fireValueChanged(JTree.java:2934)
        at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3398)
        at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:635)
        at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1093)
        at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:294)
        at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:188)
        at javax.swing.JTree.setSelectionPath(JTree.java:1641)
        at oracle.dbtools.raptor.config.FormatSQLAdvancedOptions.<init>(FormatSQLAdvancedOptions.java:165)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at javax.ide.util.MetaClass.newInstance(MetaClass.java:145)
        at oracle.dbtools.raptor.standalone.IndexedPreferencesCommand$IndexPreferencesTask.doWork(IndexedPreferencesCommand.java:122)
        at oracle.dbtools.raptor.standalone.IndexedPreferencesCommand$IndexPreferencesTask.doWork(IndexedPreferencesCommand.java:65)
        at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at oracle.dbtools.app.Format.incrementalAlignments(Format.java:818)
        ... 32 more
incrementalAlignments callback: null
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at oracle.dbtools.arbori.Program.javaCallback(Program.java:1344)
        at oracle.dbtools.arbori.Program.eval(Program.java:1243)
        at oracle.dbtools.app.Format.format(Format.java:375)
        at oracle.dbtools.format.FormatCommand.formatCode(FormatCommand.java:94)
        at oracle.dbtools.format.FormatCommand$1.doWork(FormatCommand.java:54)
        at oracle.dbtools.format.FormatCommand$1.doWork(FormatCommand.java:49)
        at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at oracle.dbtools.app.Format.incrementalAlignments(Format.java:818)
        ... 18 more
Bind var 'offset' not found: null
@thatjeffsmith
Copy link
Collaborator

It would be good to know the sql you were working with when you got this error

@bamcgill
Copy link
Member

@wienerri if you get a chance send the sql: in the meantime, I've asked the Vadim to take a look at the trace.

@Vadimtro
Copy link

The version of SqlDev/SqlCl (the parser/Arbori library) is out of sync with the formatter program.

P.S. The parser in SQLDev is in perpetual maintenance mode, where the parser bugs are discovered and fixed. Consequently, parser rules change, and the symbols like analytic_clause[6,12) are renamed. You can find the valid symbol by searching analytic_clause[ in the allRules.txt, or drop it from the formatter program altogether. Admittedly, SQLDev should have grammar symbol names more resilient to the rules change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants