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

Bug 331124

Summary: JPQL Query joining EmbeddableCollection is failing with IllegalArgumentException "unknown state or association field"
Product: z_Archived Reporter: Ronny Völker <ronny.voelker>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: jamesssss, joerg-schoemer, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
test case none

Description Ronny Völker CLA 2010-11-25 09:26:55 EST
Build Identifier: 2.1.0.v20100614-r7608

Caused by: Exception [EclipseLink-8030] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [select l from Label l join l.translations t where t.language = :lang], line 1, column 52: unknown state or association field [language] of class [com.test.Translation].
	at org.eclipse.persistence.exceptions.JPQLException.unknownAttribute(JPQLException.java:457)
	at org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.java:88)
	at org.eclipse.persistence.internal.jpa.parsing.Node.validate(Node.java:91)
	at org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode.validate(BinaryOperatorNode.java:34)
	at org.eclipse.persistence.internal.jpa.parsing.EqualsNode.validate(EqualsNode.java:41)
	at org.eclipse.persistence.internal.jpa.parsing.WhereNode.validate(WhereNode.java:34)
...


Reproducible: Always

Steps to Reproduce:
1. unzip test case
2. edit persistence.xml
3. mvn clean install
4. run Test.class
Comment 1 Ronny Völker CLA 2010-11-25 09:34:35 EST
Created attachment 183852 [details]
test case
Comment 2 Tom Ware CLA 2010-12-09 09:05:39 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Workaround is to go through either Criteria API, or EclipseLink-native expression API.
Comment 3 Jörg Schömer CLA 2011-05-31 11:13:15 EDT
What is the schedule for the Target Milestone "Future"?
Comment 4 Tom Ware CLA 2011-05-31 11:28:41 EDT
"Future" means that this bug is not targetted for a specific release.

Generally bugs move up into releases as we fix bugs that are targetted.  We use a number of criteria to determine which bugs to move up. (e.g. number of votes, submitter-provided patch availability, importance to the employers of the various committers, seriousness of the issue, ability to work around)
Comment 5 James Sutherland CLA 2011-11-07 11:05:39 EST
The issue is the wrong descriptor is used, need to use one from mapping, not non-initialized one.  Need to use descriptor as type the same a embedded.
Comment 6 James Sutherland CLA 2011-11-16 11:20:10 EST
See, Bug#314025
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:14:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:18:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink