GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [plsql] Parsing exception SELECT...INTO on Associative Arrays Types · Issue #3515 · pmd/pmd

[plsql] Parsing exception SELECT...INTO on Associative Arrays Types #3515

New issue
Copy link
New issue
Copy link
Closed
#3518
Closed
[plsql] Parsing exception SELECT...INTO on Associative Arrays Types#3515
#3518
Copy link
Assignees
adangel
Labels
a:bugPMD crashes or fails to analyse a file.in:grammarAbout the grammar of a lexer or parser, eg, a parse/lex exception
Milestone
6.39.0

Description

@hgodinez89
hgodinez89
opened on Sep 21, 2021
Issue body actions

Affects PMD Version:

This error was testing in the following versions:

  • 6.38.0
  • 6.37.0
  • 6.36.0

Description:

Trying to analyze pl/sql code that has SELECT...INTO on Associative array types, PMD raises an exception error that indicates "Error while parsing".

Exception Stacktrace:

net.sourceforge.pmd.PMDException: Error while parsing C:\testfolder\example_procedure.prc
	at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:116)
	at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:95)
	at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:57)
	at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:85)
	at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:29)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: net.sourceforge.pmd.lang.plsql.ast.ParseException: Encountered " "(" "( "" at line 23, column 23.
Was expecting one of:
    "." ...
    "," ...
    "FROM" ...
    "." ...
    "." ...
    "," ...
    "FROM" ...
  
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.generateParseException(PLSQLParser.java)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.jj_consume_token(PLSQLParser.java)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.FromClause(PLSQLParser.java:21446)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.RestOfStatement(PLSQLParser.java:10603)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.SelectStatement(PLSQLParser.java:28435)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.UnlabelledStatement(PLSQLParser.java:23839)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.Statement(PLSQLParser.java:24741)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.ProgramUnit(PLSQLParser.java:6835)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.Global(PLSQLParser.java:879)
	at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.Input(PLSQLParser.java:153)
	at net.sourceforge.pmd.lang.plsql.PLSQLParser.parse(PLSQLParser.java:61)
	at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:127)
	at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:191)
	at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:113)
	... 10 more

Code Sample demonstrating the issue:

CREATE OR REPLACE PROCEDURE EXAMPLE_PROCEDURE IS
   --
   TYPE example_data_rt IS RECORD(
      field_one   PLS_INTEGER,
      field_two   PLS_INTEGER,
      field_three PLS_INTEGER);
   --
   TYPE example_data_aat IS TABLE OF example_data_rt INDEX BY BINARY_INTEGER;
   --
   l_example_data example_data_aat;
   --
BEGIN
   --
   SELECT 1 field_value_one, 2 field_value_two, 3 field_value_three
     INTO l_example_data(1).field_one,l_example_data(1).field_two,l_example_data(1).field_three
     FROM DUAL;
   --
END EXAMPLE_PROCEDURE;

Steps to reproduce:

  1. Put the code above ("Code Sample demonstrating the issue" section) in example_procedure.prc
  2. Execute PMD analyzer from CLI.
  3. See the error showed in the "Exception Stacktrace" section.

Running PMD through: [CLI]

Activity

  1. hgodinez89
    added
    a:bugPMD crashes or fails to analyse a file.
    on Sep 21, 2021
  2. adangel
    self-assigned this
    on Sep 21, 2021
  3. adangel
    added this to the 6.39.0 milestone on Sep 21, 2021
  4. adangel
    added
    in:grammarAbout the grammar of a lexer or parser, eg, a parse/lex exception
    on Sep 21, 2021
  5. adangel
    added a commit that references this issue on Sep 23, 2021

    [plsql] Parsing exception SELECT...INTO on Associative Arrays Types

    This issue will close once commit 6458f95 is merged into the 'main' branch.
    6458f95
  6. adangel
    closed this as completedin 6458f95on Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @adangel
    adangel

Labels

a:bugPMD crashes or fails to analyse a file.in:grammarAbout the grammar of a lexer or parser, eg, a parse/lex exception

Type

No type

Projects

No projects

    Milestone

    • 6.39.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.