Yes, that is a bit annoying. What could we do to improve the error?
Maybe it'd be useful if we expand the alias to the full type.

-Patrick

On Tue, Mar 4, 2008 at 7:27 AM, Marc LaPierre <[EMAIL PROTECTED]> wrote:
> Resolved:
>
>  Turns out that the aliases for entities must be unique across the
>  application for each named query. My use of "x" in all named queries
>  seemed to have caused this.
>
>  Odd bug, but you get used to those with JPA. :-/
>
>  Marc
>
>
>
>  -----Original Message-----
>  From: Marc LaPierre [mailto:[EMAIL PROTECTED]
>  Sent: Tuesday, March 04, 2008 9:53 AM
>  To: [email protected]
>  Subject: All named queries throw ArgumentException: No field named "bar"
>  in class "x".
>
>  Hi all,
>
>
>
>  I've move my application from debugging in eclipse to packaging it into
>  a WAR file and deploying it on Tomcat. Using remote debugging, I find
>  that the following error is being thrown anytime a named query is
>  called.
>
>
>
>  <openjpa-1.0.0-r420667:568756 nonfatal user error>
>  org.apache.openjpa.persistence.ArgumentException: An error occurred
>  while parsing the query filter "SELECT x FROM Foo x WHERE x.bar=:bar".
>  Error message: No field named "bar" in class "x".
>
>
>
>  If I run a regular find or findAll, the classes load up fine. Any
>  thoughts as to why this would happen?
>
>
>
>  Thanks,
>
>
>
>  Marc
>
>
>
>
>
>  Note: I know this makes it harder to help, but unfortunately I can't
>  post my actual code (NDA, etc). What I can say is that the same code
>  works fine when debugging from eclipse.
>
>
>  ---------------------------------------------------------------------
>  This transmission (including any attachments) may contain confidential
>  information, privileged material (including material protected by the
>  solicitor-client or other applicable privileges), or constitute
>  non-public information. Any use of this information by anyone other than
>  the intended recipient is prohibited. If you have received this
>  transmission in error, please immediately reply to the sender and delete
>  this information from your system. Use, dissemination, distribution, or
>  reproduction of this transmission by unintended recipients is not
>  authorized and may be unlawful.
>
>  ---------------------------------------------------------------------
>  This transmission (including any attachments) may contain confidential 
> information, privileged material (including material protected by the 
> solicitor-client or other applicable privileges), or constitute non-public 
> information. Any use of this information by anyone other than the intended 
> recipient is prohibited. If you have received this transmission in error, 
> please immediately reply to the sender and delete this information from your 
> system. Use, dissemination, distribution, or reproduction of this 
> transmission by unintended recipients is not authorized and may be unlawful.
>



-- 
Patrick Linskey
202 669 5907

Reply via email to