You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Daryl Stultz <da...@6degrees.com> on 2009/09/08 14:42:04 UTC
Unhelpful exception message
Hi all,
I wrote this query here.
select o from User as o
where o.id in (
select valueInteger from UserPersistentParameter as o
)
but I got
<openjpa-1.2.1-r752877:753278 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: null
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:814)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
which isn't very helpful. I realized my error was in omitting the "o." prior
to valueInteger. It should read like this:
select o from User as o
where o.id in (
select o.valueInteger from UserPersistentParameter as o
)
Perhaps the exception could be a bit more descriptive.
--
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com
Re: Unhelpful exception message
Posted by Kevin Sutter <kw...@gmail.com>.
The exception text in trunk looks to be much clearer. I created a JIRA [1]
anyway so that we have this 1.2.x issue documented. Not sure if the trunk
exception processing applies to 1.2.x...
Kevin
[1] https://issues.apache.org/jira/browse/OPENJPA-1291
On Thu, Sep 10, 2009 at 12:44 PM, Pinaki Poddar <pp...@apache.org> wrote:
>
> Hi,
> The error message on trunk version looks better.
>
> <openjpa-0.0.0-rnull nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: Failed to execute query
> "select o from Account as o where o.id in (select balance from Account as
> o)". Check the query syntax for correctness. See nested exception for
> details.
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:865)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:787)
> at
> org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
> at
> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:291)
> at
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:303)
> .................................
> at Caused by: java.lang.IllegalArgumentException: Invalid unbound
> variable
> "balance" in query.
>
>
>
>
> Daryl Stultz wrote:
> >
> > On Tue, Sep 8, 2009 at 6:40 PM, Kevin Sutter <kw...@gmail.com> wrote:
> >
> >> Thanks, Daryl. From your description, I would agree with your
> >> assessment.
> >> :-) Could you open a JIRA issue [1] with information from this posting?
> >> If
> >> you don't have JIRA access, let me know and I can create it for you.
> >>
> >> Sure, I can do that but I don't have JIRA access.
> >
> > --
> > Daryl Stultz
> > _____________________________________
> > 6 Degrees Software and Consulting, Inc.
> > http://www.6degrees.com
> > mailto:daryl@6degrees.com
> >
> >
>
>
> -----
> Pinaki
> --
> View this message in context:
> http://n2.nabble.com/Unhelpful-exception-message-tp3603002p3618024.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
Re: Unhelpful exception message
Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
The error message on trunk version looks better.
<openjpa-0.0.0-rnull nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: Failed to execute query
"select o from Account as o where o.id in (select balance from Account as
o)". Check the query syntax for correctness. See nested exception for
details.
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:865)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:787)
at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:291)
at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:303)
.................................
at Caused by: java.lang.IllegalArgumentException: Invalid unbound variable
"balance" in query.
Daryl Stultz wrote:
>
> On Tue, Sep 8, 2009 at 6:40 PM, Kevin Sutter <kw...@gmail.com> wrote:
>
>> Thanks, Daryl. From your description, I would agree with your
>> assessment.
>> :-) Could you open a JIRA issue [1] with information from this posting?
>> If
>> you don't have JIRA access, let me know and I can create it for you.
>>
>> Sure, I can do that but I don't have JIRA access.
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
>
>
-----
Pinaki
--
View this message in context: http://n2.nabble.com/Unhelpful-exception-message-tp3603002p3618024.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Unhelpful exception message
Posted by Daryl Stultz <da...@6degrees.com>.
On Tue, Sep 8, 2009 at 6:40 PM, Kevin Sutter <kw...@gmail.com> wrote:
> Thanks, Daryl. From your description, I would agree with your assessment.
> :-) Could you open a JIRA issue [1] with information from this posting?
> If
> you don't have JIRA access, let me know and I can create it for you.
>
> Sure, I can do that but I don't have JIRA access.
--
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com
Re: Unhelpful exception message
Posted by Kevin Sutter <kw...@gmail.com>.
Thanks, Daryl. From your description, I would agree with your assessment.
:-) Could you open a JIRA issue [1] with information from this posting? If
you don't have JIRA access, let me know and I can create it for you.
Thanks,
Kevin
[1] https://issues.apache.org/jira/browse/OPENJPA
On Tue, Sep 8, 2009 at 7:42 AM, Daryl Stultz <da...@6degrees.com> wrote:
> Hi all,
> I wrote this query here.
>
> select o from User as o
> where o.id in (
> select valueInteger from UserPersistentParameter as o
> )
>
> but I got
> <openjpa-1.2.1-r752877:753278 nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: null
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:814)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
>
> which isn't very helpful. I realized my error was in omitting the "o."
> prior
> to valueInteger. It should read like this:
>
> select o from User as o
> where o.id in (
> select o.valueInteger from UserPersistentParameter as o
> )
>
> Perhaps the exception could be a bit more descriptive.
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
>