Skip to Main Content

SQL Developer for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

'&' literal in the query text causes SQL Dev for VSCode to prompt for a substitution value

user_2DKLAJan 24 2024

Test query:

select '&' as val from dual;

And pressing Apply at this stage results in a Java exception:

[1/24/2024, 7:57:29 PM] [dbtools.bat(24172)] [WARN ] #stderr 
janv. 24, 2024 7:57:29 PM 
SEVERE: Error for: POST /20221610/databases/connections/sessions/r9VL8Lt_IRyU1HiguyNf9w/actions/execute 
DBTU-05002: An unexpected error occurred during processing of task: IYUImfeZFbsovuKJIt3vSg 
DBTU-05002: An unexpected error occurred during processing of task: IYUImfeZFbsovuKJIt3vSg. An error with the following message occurred: Cannot invoke "String.toUpperCase(java.util.Locale)" because the return value of "com.oracle.dbtools.server.common.bridge.scripts.SqlScript$SubstitutionVariable.name()" is null. Retry the task, if the issue persists contact product support 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.web.common.WebException.of(WebException.java:179) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.web.server.ErrorHandler.handleError(ErrorHandler.java:24) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.web.server.WebContainer.handleError(WebContainer.java:54) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.actions.Actions.dispatch(Actions.java:100) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.web.server.EmbeddableComponent.dispatch(EmbeddableComponent.java:55) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.actions.Actions$ImmutableRegistration.callIfMatches(Actions.java:325) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.actions.Actions.dispatch(Actions.java:93) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.web.server.EmbeddableComponent.dispatch(EmbeddableComponent.java:55) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.web.server.EmbeddableContainer.dispatch(EmbeddableContainer.java:91) 
[...]
Caused by: DBTU-05002: An unexpected error occurred during processing of task: IYUImfeZFbsovuKJIt3vSg. An error with the following message occurred: Cannot invoke "String.toUpperCase(java.util.Locale)" because the return value of "com.oracle.dbtools.server.common.bridge.scripts.SqlScript$SubstitutionVariable.name()" is null. Retry the task, if the issue persists contact product support 
[...]
Caused by: java.lang.NullPointerException: Cannot invoke "String.toUpperCase(java.util.Locale)" because the return value of "com.oracle.dbtools.server.common.bridge.scripts.SqlScript$SubstitutionVariable.name()" is null 
at com.oracle.dbtools.server.common.bridge@23.4.0/com.oracle.dbtools.server.common.bridge.scripts.SubstitutionVariables.configure(SubstitutionVariables.java:46) 
at com.oracle.dbtools.server.common.bridge@23.4.0/com.oracle.dbtools.server.common.bridge.scripts.DatabaseToolsScriptRunner.execute(DatabaseToolsScriptRunner.java:55) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.tasks.ErrorHandler.lambda$accept$0(ErrorHandler.java:70) 
at com.oracle.dbtools.utils.core@23.4.0/com.oracle.dbtools.utils.core.tasks.ErrorHandler.accept(ErrorHandler.java:76) 
... 28 more

Expected behaviour: no prompt in that particular case.

For the record, SQL*Plus:

SQL> select '&' as val from dual;

V
-
&

1 row selected.

SQL> select '&x' as val from dual;
Enter value for x:

Thanks & regards,

This post has been answered by thatJeffSmith-Oracle on Jan 24 2024
Jump to Answer
Comments
Post Details
Added on Jan 24 2024
1 comment
497 views