Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338248

Summary: Hermes: Parser Integration Code Name and Location
Product: z_Archived Reporter: Shaun Smith <shaun.smith>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: douglas.clarke, eric.gwin, neil.hauge, pascal.filion, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 337911    
Attachments:
Description Flags
JPQL query to DatabaseQuery conversion using the Hermes parser
none
JPQL query to DatabaseQuery conversion using the Hermes parser
none
JPQL query to DatabaseQuery conversion using the Hermes parser
none
JPQL query to DatabaseQuery conversion using the Hermes parser
none
JPQL query to DatabaseQuery conversion using the Hermes parser
none
JPQL query to DatabaseQuery conversion using the Hermes parser
none
JPQL query to DatabaseQuery conversion using the Hermes parser
none
preliminary changes for ant build
none
build changes associated with Pascal's patch none

Description Shaun Smith CLA 2011-02-25 12:20:24 EST
The Hermes parser involves three components that need to be named and built:
1. JPQL Parser
2. EclipseLink JPA Integration Code
3. Tests

This bug addresses 2: EclipseLink Integration Code.

The Hermes parser integration code should be placed in o.e.p.core along side the ANTLR integration code.  The target packages are:

org.eclipse.persistence.internal.jpa.parsing.antlr
org.eclipse.persistence.internal.jpa.parsing.jpql

ANTLR integration code would move to the new package for consistency.

Introducing the Hermes integration code into o.e.p.core a new dependency on the Hermes JPQL parser bundle (Bug 338144).
Comment 1 Eric Gwin CLA 2011-03-02 14:19:51 EST
> The Hermes parser integration code should be placed in o.e.p.core along side
> the ANTLR integration code.  The target packages are:
> org.eclipse.persistence.internal.jpa.parsing.antlr
> org.eclipse.persistence.internal.jpa.parsing.jpql
> ANTLR integration code would move to the new package for consistency.
> Introducing the Hermes integration code into o.e.p.core a new dependency on the
> Hermes JPQL parser bundle (Bug 338144).

+1. I have no preference for the package names. These are fine by me.

I also spoke to Peter and he agrees in principle (putting the integration code for Hermes in core), though I'm not certain if he agrees with the details (moving antlr integration code, and the specified package names). I'm hoping add his own update soon.
Comment 2 Pascal Filion CLA 2011-03-03 18:19:26 EST
Created attachment 190331 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

The path includes the code that converts a JPQL query (string) to a DatabaseQuery by using the Hermes parser, see bug 338138.
Comment 3 Pascal Filion CLA 2011-03-09 18:14:19 EST
Created attachment 190805 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

Made sure the patch contains the latest code.
Comment 4 Pascal Filion CLA 2011-03-14 21:32:54 EDT
Created attachment 191180 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

This patch contains the latest code, which was built based on the changes made to the Hermes parser, refer to bug 339961.
Comment 5 Pascal Filion CLA 2011-04-11 19:05:36 EDT
Created attachment 192986 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

Updated EL code to use the latest Hermes, which was optimized with bug 341523.
Comment 6 Pascal Filion CLA 2011-04-12 07:50:09 EDT
Created attachment 193037 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

The patch I posted yesterday was depending on the pending pluggable parser (HermesParser was implementing JPQLQueryParser). This patch removed that dependency.

Note: The person who will commit this patch will have to change the build files, which is not part of the patch in order for core to depend on the Hermes parser (jpa/org.eclipse.persistence.jpa.jpql).
Comment 7 Pascal Filion CLA 2011-04-22 14:41:11 EDT
Created attachment 193939 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

The previous patch became out dated with the recent update to the Hermes parser, due to optimization and clean up in the validator and content assist classes.
Comment 8 Eric Gwin CLA 2011-05-04 09:04:46 EDT
The latest patch seems to have compile issues in core with the latest code on trunk:
    [javac] Compiling 1509 source files to C:\_EL_trunk6\foundation\org.eclipse.persistence.core\classes
    [javac] C:\_EL_trunk6\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\internal\jpa\jpql\HermesParser.java:33: cannot find symbol
    [javac] symbol  : class ANTLRQueryParser
    [javac] location: package org.eclipse.persistence.queries
    [javac] import org.eclipse.persistence.queries.ANTLRQueryParser;
    [javac]                                       ^
    [javac] C:\_EL_trunk6\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\internal\jpa\jpql\HermesParser.java:164: cannot find symbol
    [javac] symbol  : class ANTLRQueryParser
    [javac] location: class org.eclipse.persistence.internal.jpa.jpql.HermesParser
    [javac]                     ANTLRQueryParser parser = new ANTLRQueryParser();
    [javac]                     ^
    [javac] C:\_EL_trunk6\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\internal\jpa\jpql\HermesParser.java:164: cannot find symbol
    [javac] symbol  : class ANTLRQueryParser
    [javac] location: class org.eclipse.persistence.internal.jpa.jpql.HermesParser
    [javac]                     ANTLRQueryParser parser = new ANTLRQueryParser();
    [javac]                                                   ^
    [javac] Note: C:\_EL_trunk6\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\internal\sessions\AbstractSession.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 3 errors

I'm trying to verify changes to the build in core (new dependency on o.e.p.jpa.jpql plugin), and the bnd file used to generate manifests but cannot compile core.
Comment 9 Pascal Filion CLA 2011-05-04 09:10:01 EDT
Oops!!! I added ANTLRQueryParser so I could debug and test creating a DatabaseQuery and I didn't realize I didn't delete it before creating the patch. Let me create a new patch.
Comment 10 Pascal Filion CLA 2011-05-04 09:20:39 EDT
Created attachment 194710 [details]
JPQL query to DatabaseQuery conversion using the Hermes parser

Removed testing code that made the patch not compilable.
Comment 11 Eric Gwin CLA 2011-05-04 09:27:00 EDT
Created attachment 194712 [details]
preliminary changes for ant build

I've attached a patch for the build based of of revision 9303.
Comment 12 Neil Hauge CLA 2011-05-04 09:29:47 EDT
Was this a problem in M7?  If so, is there any impact to clients?
Comment 13 Pascal Filion CLA 2011-05-04 09:37:18 EDT
There is no impact for M7. The corrected patch is only in EL code, which is not in M7 code base (SVN).
Comment 14 Eric Gwin CLA 2011-05-04 10:22:15 EDT
Created attachment 194719 [details]
build changes associated with Pascal's patch

removed some debugging messages, and added generated and formated manifest.mf
Comment 15 Pascal Filion CLA 2011-05-11 09:30:41 EDT
I checked in the code and the build changes. Tom Ware reviewed the code and Eric reviewed the build changes.
Comment 16 Eclipse Webmaster CLA 2022-06-09 10:03:31 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink