You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Marc Prud'hommeaux <mp...@apache.org> on 2007/04/01 18:30:15 UTC

Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Seem fair enough to get rid of the description. I've opened https:// 
issues.apache.org/jira/browse/OPENJPA-196 describing the issue.

+1 from me to remove the restriction that there be exactly as many  
positional parameters declared as were assigned.



On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:

> Actually, I think there is a bigger problem...  Say I have a query  
> like this:
>
>     SELECT x FROM foo AS x WHERE foo.name = ?2
>
> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...) code  
> assumes that if I have 1 parameter it is numbered ?1, but in EJB  
> 2.1 this was not a requirement and there are certification tests  
> that verify you are allowed to have "unused" parameters (e.g, in my  
> example about ?1 and ?N where N>2 are all not used).  I couldn't  
> find any text in the specification that says that all all  
> positional parameters must be used in the query, but I did find  
> text that say the EJB-QL 3.0 language is an extension of the EJB-QL  
> 2.1 language:
>
> "The Java Persistence query language is an extension of the  
> Enterprise Java Beans query language, EJB QL, definedin[5]."
>
> So I think we must remove the "extra-params" check, but I would be  
> happy with a "don't check for extra-params flag".
>
> -dain
>
> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
>
>> I'm working on a CMP 2 implementation that delegates to OpenJPA  
>> for persistence.  I'm running into a problem where I get the  
>> following exception:
>>
>> org.apache.openjpa.persistence.ArgumentException : More parameters  
>> were passed to execute() than were declared: 4 parameters were  
>> specified for query execution, but only 2 parameters were declared  
>> in the query.
>>
>>
>> In CMP you declare finder and select methods that have parameters  
>> which are passed into the query engine.  You can have as many  
>> parameters as you like but are not required to use them all, but  
>> it appears that OpenJPA is enforcing a restriction where if the  
>> EJB-QL text only lists say 2 parameters and I set 4 I get the  
>> above exception.  In order of perference:
>>
>> Is this spec required? If not, can we remove the check?
>>
>> Is there a way to disable the check?  If so, how?
>>
>> Is there a way to determine the number of paramters a query  
>> takes?  If so, I can change my code.
>>
>> Is there a way to get the ejbql text from a Query object? If so,  
>> I'll write a quick parser to determine number of queries myself.
>>
>> BTW, I'm currently using 0.9.6.
>>
>> Thanks,
>>
>> -dain
>


RE: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Patrick Linskey <pl...@bea.com>.
> How do I create a goal in JIRA? I don't seem to have access 
> to do so, but
> I'm using the same ID that I had before I became a committer. 
> It happens to
> be the same username as my Apache account, is there something 
> I need to do
> to "link" them?

I just added you to the openjpa-developers JIRA group, and added you as
a "Committer" in the OpenJPA Project Roles administration setting. That
gives you nearly the same amount of control as I have, and I was able to
add new milestones somehow via the project administration page (you can
get there via the Administration tab on the top bar). Let me know if
that works out.

I'm not really sure what the different JIRA security model options that
we're using all boil down to, so I'm kinda just trying out different
settings here.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Michael Dick [mailto:michael.d.dick@gmail.com] 
> Sent: Monday, April 02, 2007 11:47 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: [VOTE] ArgumentException : More parameters were 
> passed to execute() than were declared
> 
> On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
> >
> > > I have no problem adding this to the release. I was hoping to get
> > > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
> > > access, and then start the release process.
> >
> > You should have commit access now.
> >
> > > Is there anything else that we need to get in? If these are
> > > the only changes
> > > we need, I'll go ahead and start the release this afternoon.
> >
> > I think that the next step is to create an 0.9.8 goal 
> within JIRA and
> > move everything except those things we plan for 0.9.7 out 
> to 0.9.8. Once
> > we've done that and resolved all the 0.9.7 issues, we 
> should be ready to
> > build a release.
> 
> 
> How do I create a goal in JIRA? I don't seem to have access 
> to do so, but
> I'm using the same ID that I had before I became a committer. 
> It happens to
> be the same username as my Apache account, is there something 
> I need to do
> to "link" them?
> 
> 
> I'm assuming that you've got the link to the release process that Marc
> > put together, right?
> 
> 
> Yes, I've been going through that and the Apache 
> documentation this morning.
> 
> 
> -Patrick
> >
> > --
> > Patrick Linskey
> > BEA Systems, Inc.
> >
> > 
> ______________________________________________________________
> _________
> > Notice:  This email message, together with any attachments, 
> may contain
> > information  of  BEA Systems,  Inc.,  its subsidiaries  and 
>  affiliated
> > entities,  that may be confidential,  proprietary,  
> copyrighted  and/or
> > legally privileged, and is intended solely for the use of 
> the individual
> > or entity named in this message. If you are not the 
> intended recipient,
> > and have received this message in error, please immediately 
> return this
> > by email and then delete it.
> >
> > > -----Original Message-----
> > > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > > Sent: Monday, April 02, 2007 10:58 AM
> > > To: open-jpa-dev@incubator.apache.org
> > > Subject: Re: [VOTE] ArgumentException : More parameters were
> > > passed to execute() than were declared
> > >
> > > I have no problem adding this to the release. I was hoping to get
> > > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
> > > access, and then
> > > start the release process.
> > >
> > > Is there anything else that we need to get in? If these are
> > > the only changes
> > > we need, I'll go ahead and start the release this afternoon.
> > >
> > > On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
> > > >
> > > > I don't think that it's been cut yet. Mike: where do we 
> stand on the
> > > > 0.9.7 process?
> > > >
> > > > -Patrick
> > > >
> > > > --
> > > > Patrick Linskey
> > > > BEA Systems, Inc.
> > > >
> > > >
> > > ______________________________________________________________
> > > _________
> > > > Notice:  This email message, together with any attachments,
> > > may contain
> > > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
> > >  affiliated
> > > > entities,  that may be confidential,  proprietary,
> > > copyrighted  and/or
> > > > legally privileged, and is intended solely for the use of
> > > the individual
> > > > or entity named in this message. If you are not the
> > > intended recipient,
> > > > and have received this message in error, please immediately
> > > return this
> > > > by email and then delete it.
> > > >
> > > > > -----Original Message-----
> > > > > From: Dain Sundstrom [mailto:dain@iq80.com]
> > > > > Sent: Monday, April 02, 2007 9:23 AM
> > > > > To: open-jpa-dev@incubator.apache.org
> > > > > Subject: Re: [VOTE] ArgumentException : More parameters were
> > > > > passed to execute() than were declared
> > > > >
> > > > > Is this something we can put in 0.9.7 or has that been
> > > cut already?
> > > > >
> > > > > -dain
> > > > >
> > > > > On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
> > > > >
> > > > > > +1 to remove the restriction. As long as no parameters are
> > > > > missing,
> > > > > > the query should be considered sufficient.
> > > > > >
> > > > > > Craig
> > > > > >
> > > > > > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
> > > > > >
> > > > > >>
> > > > > >> Seem fair enough to get rid of the description. I've opened
> > > > > >> https://issues.apache.org/jira/browse/OPENJPA-196
> > > describing the
> > > > > >> issue.
> > > > > >>
> > > > > >> +1 from me to remove the restriction that there be exactly
> > > > > as many
> > > > > >> positional parameters declared as were assigned.
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> > > > > >>
> > > > > >>> Actually, I think there is a bigger problem...  
> Say I have a
> > > > > >>> query like this:
> > > > > >>>
> > > > > >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
> > > > > >>>
> > > > > >>> The 
> org.apache.openjpa.kernel.QueryImpl.assertParameters(...)
> > > > > >>> code assumes that if I have 1 parameter it is numbered
> > > > > ?1, but in
> > > > > >>> EJB 2.1 this was not a requirement and there are 
> certification
> > > > > >>> tests that verify you are allowed to have 
> "unused" parameters
> > > > > >>> (e.g, in my example about ?1 and ?N where N>2 are all not
> > > > > used).
> > > > > >>> I couldn't find any text in the specification that
> > > says that all
> > > > > >>> all positional parameters must be used in the 
> query, but I did
> > > > > >>> find text that say the EJB-QL 3.0 language is an
> > > > > extension of the
> > > > > >>> EJB-QL 2.1 language:
> > > > > >>>
> > > > > >>> "The Java Persistence query language is an 
> extension of the
> > > > > >>> Enterprise Java Beans query language, EJB QL, 
> definedin[5]."
> > > > > >>>
> > > > > >>> So I think we must remove the "extra-params" check,
> > > but I would
> > > > > >>> be happy with a "don't check for extra-params flag".
> > > > > >>>
> > > > > >>> -dain
> > > > > >>>
> > > > > >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> > > > > >>>
> > > > > >>>> I'm working on a CMP 2 implementation that delegates
> > > to OpenJPA
> > > > > >>>> for persistence.  I'm running into a problem 
> where I get the
> > > > > >>>> following exception:
> > > > > >>>>
> > > > > >>>> org.apache.openjpa.persistence.ArgumentException : More
> > > > > >>>> parameters were passed to execute() than were declared: 4
> > > > > >>>> parameters were specified for query execution, but only 2
> > > > > >>>> parameters were declared in the query.
> > > > > >>>>
> > > > > >>>>
> > > > > >>>> In CMP you declare finder and select methods that have
> > > > > >>>> parameters which are passed into the query engine.  You
> > > > > can have
> > > > > >>>> as many parameters as you like but are not required
> > > to use them
> > > > > >>>> all, but it appears that OpenJPA is enforcing a 
> restriction
> > > > > >>>> where if the EJB-QL text only lists say 2 parameters and
> > > > > I set 4
> > > > > >>>> I get the above exception.  In order of perference:
> > > > > >>>>
> > > > > >>>> Is this spec required? If not, can we remove the check?
> > > > > >>>>
> > > > > >>>> Is there a way to disable the check?  If so, how?
> > > > > >>>>
> > > > > >>>> Is there a way to determine the number of 
> paramters a query
> > > > > >>>> takes?  If so, I can change my code.
> > > > > >>>>
> > > > > >>>> Is there a way to get the ejbql text from a Query
> > > > > object? If so,
> > > > > >>>> I'll write a quick parser to determine number of
> > > queries myself.
> > > > > >>>>
> > > > > >>>> BTW, I'm currently using 0.9.6.
> > > > > >>>>
> > > > > >>>> Thanks,
> > > > > >>>>
> > > > > >>>> -dain
> > > > > >>>
> > > > > >>
> > > > > >
> > > > > > Craig Russell
> > > > > > Architect, Sun Java Enterprise System
> > > > > http://java.sun.com/products/jdo
> > > > > > 408 276-5638 mailto:Craig.Russell@sun.com
> > > > > > P.S. A good JDO? O, Gasp!
> > > > > >
> > > > >
> > > > >
> > > >
> > > > Notice:  This email message, together with any attachments,
> > > may contain
> > > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
> > >  affiliated
> > > > entities,  that may be confidential,  proprietary,
> > > copyrighted  and/or
> > > > legally privileged, and is intended solely for the use of
> > > the individual or
> > > > entity named in this message. If you are not the intended
> > > recipient, and
> > > > have received this message in error, please immediately
> > > return this by email
> > > > and then delete it.
> > > >
> > >
> > >
> > >
> > > --
> > > -Michael Dick
> > >
> >
> > Notice:  This email message, together with any attachments, 
> may contain
> > information  of  BEA Systems,  Inc.,  its subsidiaries  and 
>  affiliated
> > entities,  that may be confidential,  proprietary,  
> copyrighted  and/or
> > legally privileged, and is intended solely for the use of 
> the individual or
> > entity named in this message. If you are not the intended 
> recipient, and
> > have received this message in error, please immediately 
> return this by email
> > and then delete it.
> >
> 
> 
> 
> -- 
> -Michael Dick
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

RE: JIRA powers

Posted by Patrick Linskey <pl...@bea.com>.
Actually, I don't think that he does anymore... I granted him
jira-administrators briefly, and then discovered the Project Roles
business, so removed the jira-administrators bits.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
> Sent: Monday, April 02, 2007 11:59 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: JIRA powers
> 
> Hi Mike,
> 
> You have god-like powers in Jira (group jira-administrator). 
> You have  
> the ability to do anything you want.
> 
> Go to the administration page for OpenJPA. Click on manage versions;  
> add a version.
> 
> Craig
> 
> On Apr 2, 2007, at 11:47 AM, Michael Dick wrote:
> 
> > On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
> >>
> >> > I have no problem adding this to the release. I was hoping to get
> >> > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
> >> > access, and then start the release process.
> >>
> >> You should have commit access now.
> >>
> >> > Is there anything else that we need to get in? If these are
> >> > the only changes
> >> > we need, I'll go ahead and start the release this afternoon.
> >>
> >> I think that the next step is to create an 0.9.8 goal 
> within JIRA and
> >> move everything except those things we plan for 0.9.7 out to  
> >> 0.9.8. Once
> >> we've done that and resolved all the 0.9.7 issues, we should be  
> >> ready to
> >> build a release.
> >
> >
> > How do I create a goal in JIRA? I don't seem to have access to do  
> > so, but
> > I'm using the same ID that I had before I became a committer. It  
> > happens to
> > be the same username as my Apache account, is there something I  
> > need to do
> > to "link" them?
> >
> >
> > I'm assuming that you've got the link to the release 
> process that Marc
> >> put together, right?
> >
> >
> > Yes, I've been going through that and the Apache 
> documentation this  
> > morning.
> >
> >
> > -Patrick
> >>
> >> --
> >> Patrick Linskey
> >> BEA Systems, Inc.
> >>
> >> 
> _____________________________________________________________________ 
> >> __
> >> Notice:  This email message, together with any attachments, may  
> >> contain
> >> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> >> affiliated
> >> entities,  that may be confidential,  proprietary,  copyrighted   
> >> and/or
> >> legally privileged, and is intended solely for the use of the  
> >> individual
> >> or entity named in this message. If you are not the intended  
> >> recipient,
> >> and have received this message in error, please 
> immediately return  
> >> this
> >> by email and then delete it.
> >>
> >> > -----Original Message-----
> >> > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> >> > Sent: Monday, April 02, 2007 10:58 AM
> >> > To: open-jpa-dev@incubator.apache.org
> >> > Subject: Re: [VOTE] ArgumentException : More parameters were
> >> > passed to execute() than were declared
> >> >
> >> > I have no problem adding this to the release. I was hoping to get
> >> > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
> >> > access, and then
> >> > start the release process.
> >> >
> >> > Is there anything else that we need to get in? If these are
> >> > the only changes
> >> > we need, I'll go ahead and start the release this afternoon.
> >> >
> >> > On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
> >> > >
> >> > > I don't think that it's been cut yet. Mike: where do we stand  
> >> on the
> >> > > 0.9.7 process?
> >> > >
> >> > > -Patrick
> >> > >
> >> > > --
> >> > > Patrick Linskey
> >> > > BEA Systems, Inc.
> >> > >
> >> > >
> >> > ______________________________________________________________
> >> > _________
> >> > > Notice:  This email message, together with any attachments,
> >> > may contain
> >> > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
> >> >  affiliated
> >> > > entities,  that may be confidential,  proprietary,
> >> > copyrighted  and/or
> >> > > legally privileged, and is intended solely for the use of
> >> > the individual
> >> > > or entity named in this message. If you are not the
> >> > intended recipient,
> >> > > and have received this message in error, please immediately
> >> > return this
> >> > > by email and then delete it.
> >> > >
> >> > > > -----Original Message-----
> >> > > > From: Dain Sundstrom [mailto:dain@iq80.com]
> >> > > > Sent: Monday, April 02, 2007 9:23 AM
> >> > > > To: open-jpa-dev@incubator.apache.org
> >> > > > Subject: Re: [VOTE] ArgumentException : More parameters were
> >> > > > passed to execute() than were declared
> >> > > >
> >> > > > Is this something we can put in 0.9.7 or has that been
> >> > cut already?
> >> > > >
> >> > > > -dain
> >> > > >
> >> > > > On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
> >> > > >
> >> > > > > +1 to remove the restriction. As long as no parameters are
> >> > > > missing,
> >> > > > > the query should be considered sufficient.
> >> > > > >
> >> > > > > Craig
> >> > > > >
> >> > > > > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
> >> > > > >
> >> > > > >>
> >> > > > >> Seem fair enough to get rid of the description. 
> I've opened
> >> > > > >> https://issues.apache.org/jira/browse/OPENJPA-196
> >> > describing the
> >> > > > >> issue.
> >> > > > >>
> >> > > > >> +1 from me to remove the restriction that there be exactly
> >> > > > as many
> >> > > > >> positional parameters declared as were assigned.
> >> > > > >>
> >> > > > >>
> >> > > > >>
> >> > > > >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> >> > > > >>
> >> > > > >>> Actually, I think there is a bigger problem...  Say I  
> >> have a
> >> > > > >>> query like this:
> >> > > > >>>
> >> > > > >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
> >> > > > >>>
> >> > > > >>> The org.apache.openjpa.kernel.QueryImpl.assertParameters 
> >> (...)
> >> > > > >>> code assumes that if I have 1 parameter it is numbered
> >> > > > ?1, but in
> >> > > > >>> EJB 2.1 this was not a requirement and there are  
> >> certification
> >> > > > >>> tests that verify you are allowed to have "unused"  
> >> parameters
> >> > > > >>> (e.g, in my example about ?1 and ?N where N>2 are all not
> >> > > > used).
> >> > > > >>> I couldn't find any text in the specification that
> >> > says that all
> >> > > > >>> all positional parameters must be used in the 
> query, but  
> >> I did
> >> > > > >>> find text that say the EJB-QL 3.0 language is an
> >> > > > extension of the
> >> > > > >>> EJB-QL 2.1 language:
> >> > > > >>>
> >> > > > >>> "The Java Persistence query language is an 
> extension of the
> >> > > > >>> Enterprise Java Beans query language, EJB QL, definedin 
> >> [5]."
> >> > > > >>>
> >> > > > >>> So I think we must remove the "extra-params" check,
> >> > but I would
> >> > > > >>> be happy with a "don't check for extra-params flag".
> >> > > > >>>
> >> > > > >>> -dain
> >> > > > >>>
> >> > > > >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> >> > > > >>>
> >> > > > >>>> I'm working on a CMP 2 implementation that delegates
> >> > to OpenJPA
> >> > > > >>>> for persistence.  I'm running into a problem where I  
> >> get the
> >> > > > >>>> following exception:
> >> > > > >>>>
> >> > > > >>>> org.apache.openjpa.persistence.ArgumentException : More
> >> > > > >>>> parameters were passed to execute() than were 
> declared: 4
> >> > > > >>>> parameters were specified for query execution, 
> but only 2
> >> > > > >>>> parameters were declared in the query.
> >> > > > >>>>
> >> > > > >>>>
> >> > > > >>>> In CMP you declare finder and select methods that have
> >> > > > >>>> parameters which are passed into the query engine.  You
> >> > > > can have
> >> > > > >>>> as many parameters as you like but are not required
> >> > to use them
> >> > > > >>>> all, but it appears that OpenJPA is enforcing a  
> >> restriction
> >> > > > >>>> where if the EJB-QL text only lists say 2 parameters and
> >> > > > I set 4
> >> > > > >>>> I get the above exception.  In order of perference:
> >> > > > >>>>
> >> > > > >>>> Is this spec required? If not, can we remove the check?
> >> > > > >>>>
> >> > > > >>>> Is there a way to disable the check?  If so, how?
> >> > > > >>>>
> >> > > > >>>> Is there a way to determine the number of paramters a  
> >> query
> >> > > > >>>> takes?  If so, I can change my code.
> >> > > > >>>>
> >> > > > >>>> Is there a way to get the ejbql text from a Query
> >> > > > object? If so,
> >> > > > >>>> I'll write a quick parser to determine number of
> >> > queries myself.
> >> > > > >>>>
> >> > > > >>>> BTW, I'm currently using 0.9.6.
> >> > > > >>>>
> >> > > > >>>> Thanks,
> >> > > > >>>>
> >> > > > >>>> -dain
> >> > > > >>>
> >> > > > >>
> >> > > > >
> >> > > > > Craig Russell
> >> > > > > Architect, Sun Java Enterprise System
> >> > > > http://java.sun.com/products/jdo
> >> > > > > 408 276-5638 mailto:Craig.Russell@sun.com
> >> > > > > P.S. A good JDO? O, Gasp!
> >> > > > >
> >> > > >
> >> > > >
> >> > >
> >> > > Notice:  This email message, together with any attachments,
> >> > may contain
> >> > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
> >> >  affiliated
> >> > > entities,  that may be confidential,  proprietary,
> >> > copyrighted  and/or
> >> > > legally privileged, and is intended solely for the use of
> >> > the individual or
> >> > > entity named in this message. If you are not the intended
> >> > recipient, and
> >> > > have received this message in error, please immediately
> >> > return this by email
> >> > > and then delete it.
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > -Michael Dick
> >> >
> >>
> >> Notice:  This email message, together with any attachments, may  
> >> contain
> >> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> >> affiliated
> >> entities,  that may be confidential,  proprietary,  copyrighted   
> >> and/or
> >> legally privileged, and is intended solely for the use of the  
> >> individual or
> >> entity named in this message. If you are not the intended  
> >> recipient, and
> >> have received this message in error, please immediately return  
> >> this by email
> >> and then delete it.
> >>
> >
> >
> >
> > -- 
> > -Michael Dick
> 
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

JIRA powers

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Mike,

You have god-like powers in Jira (group jira-administrator). You have  
the ability to do anything you want.

Go to the administration page for OpenJPA. Click on manage versions;  
add a version.

Craig

On Apr 2, 2007, at 11:47 AM, Michael Dick wrote:

> On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
>>
>> > I have no problem adding this to the release. I was hoping to get
>> > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
>> > access, and then start the release process.
>>
>> You should have commit access now.
>>
>> > Is there anything else that we need to get in? If these are
>> > the only changes
>> > we need, I'll go ahead and start the release this afternoon.
>>
>> I think that the next step is to create an 0.9.8 goal within JIRA and
>> move everything except those things we plan for 0.9.7 out to  
>> 0.9.8. Once
>> we've done that and resolved all the 0.9.7 issues, we should be  
>> ready to
>> build a release.
>
>
> How do I create a goal in JIRA? I don't seem to have access to do  
> so, but
> I'm using the same ID that I had before I became a committer. It  
> happens to
> be the same username as my Apache account, is there something I  
> need to do
> to "link" them?
>
>
> I'm assuming that you've got the link to the release process that Marc
>> put together, right?
>
>
> Yes, I've been going through that and the Apache documentation this  
> morning.
>
>
> -Patrick
>>
>> --
>> Patrick Linskey
>> BEA Systems, Inc.
>>
>> _____________________________________________________________________ 
>> __
>> Notice:  This email message, together with any attachments, may  
>> contain
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
>> affiliated
>> entities,  that may be confidential,  proprietary,  copyrighted   
>> and/or
>> legally privileged, and is intended solely for the use of the  
>> individual
>> or entity named in this message. If you are not the intended  
>> recipient,
>> and have received this message in error, please immediately return  
>> this
>> by email and then delete it.
>>
>> > -----Original Message-----
>> > From: Michael Dick [mailto:michael.d.dick@gmail.com]
>> > Sent: Monday, April 02, 2007 10:58 AM
>> > To: open-jpa-dev@incubator.apache.org
>> > Subject: Re: [VOTE] ArgumentException : More parameters were
>> > passed to execute() than were declared
>> >
>> > I have no problem adding this to the release. I was hoping to get
>> > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
>> > access, and then
>> > start the release process.
>> >
>> > Is there anything else that we need to get in? If these are
>> > the only changes
>> > we need, I'll go ahead and start the release this afternoon.
>> >
>> > On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
>> > >
>> > > I don't think that it's been cut yet. Mike: where do we stand  
>> on the
>> > > 0.9.7 process?
>> > >
>> > > -Patrick
>> > >
>> > > --
>> > > Patrick Linskey
>> > > BEA Systems, Inc.
>> > >
>> > >
>> > ______________________________________________________________
>> > _________
>> > > Notice:  This email message, together with any attachments,
>> > may contain
>> > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
>> >  affiliated
>> > > entities,  that may be confidential,  proprietary,
>> > copyrighted  and/or
>> > > legally privileged, and is intended solely for the use of
>> > the individual
>> > > or entity named in this message. If you are not the
>> > intended recipient,
>> > > and have received this message in error, please immediately
>> > return this
>> > > by email and then delete it.
>> > >
>> > > > -----Original Message-----
>> > > > From: Dain Sundstrom [mailto:dain@iq80.com]
>> > > > Sent: Monday, April 02, 2007 9:23 AM
>> > > > To: open-jpa-dev@incubator.apache.org
>> > > > Subject: Re: [VOTE] ArgumentException : More parameters were
>> > > > passed to execute() than were declared
>> > > >
>> > > > Is this something we can put in 0.9.7 or has that been
>> > cut already?
>> > > >
>> > > > -dain
>> > > >
>> > > > On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
>> > > >
>> > > > > +1 to remove the restriction. As long as no parameters are
>> > > > missing,
>> > > > > the query should be considered sufficient.
>> > > > >
>> > > > > Craig
>> > > > >
>> > > > > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
>> > > > >
>> > > > >>
>> > > > >> Seem fair enough to get rid of the description. I've opened
>> > > > >> https://issues.apache.org/jira/browse/OPENJPA-196
>> > describing the
>> > > > >> issue.
>> > > > >>
>> > > > >> +1 from me to remove the restriction that there be exactly
>> > > > as many
>> > > > >> positional parameters declared as were assigned.
>> > > > >>
>> > > > >>
>> > > > >>
>> > > > >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
>> > > > >>
>> > > > >>> Actually, I think there is a bigger problem...  Say I  
>> have a
>> > > > >>> query like this:
>> > > > >>>
>> > > > >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
>> > > > >>>
>> > > > >>> The org.apache.openjpa.kernel.QueryImpl.assertParameters 
>> (...)
>> > > > >>> code assumes that if I have 1 parameter it is numbered
>> > > > ?1, but in
>> > > > >>> EJB 2.1 this was not a requirement and there are  
>> certification
>> > > > >>> tests that verify you are allowed to have "unused"  
>> parameters
>> > > > >>> (e.g, in my example about ?1 and ?N where N>2 are all not
>> > > > used).
>> > > > >>> I couldn't find any text in the specification that
>> > says that all
>> > > > >>> all positional parameters must be used in the query, but  
>> I did
>> > > > >>> find text that say the EJB-QL 3.0 language is an
>> > > > extension of the
>> > > > >>> EJB-QL 2.1 language:
>> > > > >>>
>> > > > >>> "The Java Persistence query language is an extension of the
>> > > > >>> Enterprise Java Beans query language, EJB QL, definedin 
>> [5]."
>> > > > >>>
>> > > > >>> So I think we must remove the "extra-params" check,
>> > but I would
>> > > > >>> be happy with a "don't check for extra-params flag".
>> > > > >>>
>> > > > >>> -dain
>> > > > >>>
>> > > > >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
>> > > > >>>
>> > > > >>>> I'm working on a CMP 2 implementation that delegates
>> > to OpenJPA
>> > > > >>>> for persistence.  I'm running into a problem where I  
>> get the
>> > > > >>>> following exception:
>> > > > >>>>
>> > > > >>>> org.apache.openjpa.persistence.ArgumentException : More
>> > > > >>>> parameters were passed to execute() than were declared: 4
>> > > > >>>> parameters were specified for query execution, but only 2
>> > > > >>>> parameters were declared in the query.
>> > > > >>>>
>> > > > >>>>
>> > > > >>>> In CMP you declare finder and select methods that have
>> > > > >>>> parameters which are passed into the query engine.  You
>> > > > can have
>> > > > >>>> as many parameters as you like but are not required
>> > to use them
>> > > > >>>> all, but it appears that OpenJPA is enforcing a  
>> restriction
>> > > > >>>> where if the EJB-QL text only lists say 2 parameters and
>> > > > I set 4
>> > > > >>>> I get the above exception.  In order of perference:
>> > > > >>>>
>> > > > >>>> Is this spec required? If not, can we remove the check?
>> > > > >>>>
>> > > > >>>> Is there a way to disable the check?  If so, how?
>> > > > >>>>
>> > > > >>>> Is there a way to determine the number of paramters a  
>> query
>> > > > >>>> takes?  If so, I can change my code.
>> > > > >>>>
>> > > > >>>> Is there a way to get the ejbql text from a Query
>> > > > object? If so,
>> > > > >>>> I'll write a quick parser to determine number of
>> > queries myself.
>> > > > >>>>
>> > > > >>>> BTW, I'm currently using 0.9.6.
>> > > > >>>>
>> > > > >>>> Thanks,
>> > > > >>>>
>> > > > >>>> -dain
>> > > > >>>
>> > > > >>
>> > > > >
>> > > > > Craig Russell
>> > > > > Architect, Sun Java Enterprise System
>> > > > http://java.sun.com/products/jdo
>> > > > > 408 276-5638 mailto:Craig.Russell@sun.com
>> > > > > P.S. A good JDO? O, Gasp!
>> > > > >
>> > > >
>> > > >
>> > >
>> > > Notice:  This email message, together with any attachments,
>> > may contain
>> > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
>> >  affiliated
>> > > entities,  that may be confidential,  proprietary,
>> > copyrighted  and/or
>> > > legally privileged, and is intended solely for the use of
>> > the individual or
>> > > entity named in this message. If you are not the intended
>> > recipient, and
>> > > have received this message in error, please immediately
>> > return this by email
>> > > and then delete it.
>> > >
>> >
>> >
>> >
>> > --
>> > -Michael Dick
>> >
>>
>> Notice:  This email message, together with any attachments, may  
>> contain
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
>> affiliated
>> entities,  that may be confidential,  proprietary,  copyrighted   
>> and/or
>> legally privileged, and is intended solely for the use of the  
>> individual or
>> entity named in this message. If you are not the intended  
>> recipient, and
>> have received this message in error, please immediately return  
>> this by email
>> and then delete it.
>>
>
>
>
> -- 
> -Michael Dick

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Michael Dick <mi...@gmail.com>.
On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
>
> > I have no problem adding this to the release. I was hoping to get
> > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
> > access, and then start the release process.
>
> You should have commit access now.
>
> > Is there anything else that we need to get in? If these are
> > the only changes
> > we need, I'll go ahead and start the release this afternoon.
>
> I think that the next step is to create an 0.9.8 goal within JIRA and
> move everything except those things we plan for 0.9.7 out to 0.9.8. Once
> we've done that and resolved all the 0.9.7 issues, we should be ready to
> build a release.


How do I create a goal in JIRA? I don't seem to have access to do so, but
I'm using the same ID that I had before I became a committer. It happens to
be the same username as my Apache account, is there something I need to do
to "link" them?


I'm assuming that you've got the link to the release process that Marc
> put together, right?


Yes, I've been going through that and the Apache documentation this morning.


-Patrick
>
> --
> Patrick Linskey
> BEA Systems, Inc.
>
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
> > -----Original Message-----
> > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > Sent: Monday, April 02, 2007 10:58 AM
> > To: open-jpa-dev@incubator.apache.org
> > Subject: Re: [VOTE] ArgumentException : More parameters were
> > passed to execute() than were declared
> >
> > I have no problem adding this to the release. I was hoping to get
> > OpenJPA-185 and OpenJPA-179 in as soon as I got commit
> > access, and then
> > start the release process.
> >
> > Is there anything else that we need to get in? If these are
> > the only changes
> > we need, I'll go ahead and start the release this afternoon.
> >
> > On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
> > >
> > > I don't think that it's been cut yet. Mike: where do we stand on the
> > > 0.9.7 process?
> > >
> > > -Patrick
> > >
> > > --
> > > Patrick Linskey
> > > BEA Systems, Inc.
> > >
> > >
> > ______________________________________________________________
> > _________
> > > Notice:  This email message, together with any attachments,
> > may contain
> > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
> >  affiliated
> > > entities,  that may be confidential,  proprietary,
> > copyrighted  and/or
> > > legally privileged, and is intended solely for the use of
> > the individual
> > > or entity named in this message. If you are not the
> > intended recipient,
> > > and have received this message in error, please immediately
> > return this
> > > by email and then delete it.
> > >
> > > > -----Original Message-----
> > > > From: Dain Sundstrom [mailto:dain@iq80.com]
> > > > Sent: Monday, April 02, 2007 9:23 AM
> > > > To: open-jpa-dev@incubator.apache.org
> > > > Subject: Re: [VOTE] ArgumentException : More parameters were
> > > > passed to execute() than were declared
> > > >
> > > > Is this something we can put in 0.9.7 or has that been
> > cut already?
> > > >
> > > > -dain
> > > >
> > > > On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
> > > >
> > > > > +1 to remove the restriction. As long as no parameters are
> > > > missing,
> > > > > the query should be considered sufficient.
> > > > >
> > > > > Craig
> > > > >
> > > > > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
> > > > >
> > > > >>
> > > > >> Seem fair enough to get rid of the description. I've opened
> > > > >> https://issues.apache.org/jira/browse/OPENJPA-196
> > describing the
> > > > >> issue.
> > > > >>
> > > > >> +1 from me to remove the restriction that there be exactly
> > > > as many
> > > > >> positional parameters declared as were assigned.
> > > > >>
> > > > >>
> > > > >>
> > > > >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> > > > >>
> > > > >>> Actually, I think there is a bigger problem...  Say I have a
> > > > >>> query like this:
> > > > >>>
> > > > >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
> > > > >>>
> > > > >>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)
> > > > >>> code assumes that if I have 1 parameter it is numbered
> > > > ?1, but in
> > > > >>> EJB 2.1 this was not a requirement and there are certification
> > > > >>> tests that verify you are allowed to have "unused" parameters
> > > > >>> (e.g, in my example about ?1 and ?N where N>2 are all not
> > > > used).
> > > > >>> I couldn't find any text in the specification that
> > says that all
> > > > >>> all positional parameters must be used in the query, but I did
> > > > >>> find text that say the EJB-QL 3.0 language is an
> > > > extension of the
> > > > >>> EJB-QL 2.1 language:
> > > > >>>
> > > > >>> "The Java Persistence query language is an extension of the
> > > > >>> Enterprise Java Beans query language, EJB QL, definedin[5]."
> > > > >>>
> > > > >>> So I think we must remove the "extra-params" check,
> > but I would
> > > > >>> be happy with a "don't check for extra-params flag".
> > > > >>>
> > > > >>> -dain
> > > > >>>
> > > > >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> > > > >>>
> > > > >>>> I'm working on a CMP 2 implementation that delegates
> > to OpenJPA
> > > > >>>> for persistence.  I'm running into a problem where I get the
> > > > >>>> following exception:
> > > > >>>>
> > > > >>>> org.apache.openjpa.persistence.ArgumentException : More
> > > > >>>> parameters were passed to execute() than were declared: 4
> > > > >>>> parameters were specified for query execution, but only 2
> > > > >>>> parameters were declared in the query.
> > > > >>>>
> > > > >>>>
> > > > >>>> In CMP you declare finder and select methods that have
> > > > >>>> parameters which are passed into the query engine.  You
> > > > can have
> > > > >>>> as many parameters as you like but are not required
> > to use them
> > > > >>>> all, but it appears that OpenJPA is enforcing a restriction
> > > > >>>> where if the EJB-QL text only lists say 2 parameters and
> > > > I set 4
> > > > >>>> I get the above exception.  In order of perference:
> > > > >>>>
> > > > >>>> Is this spec required? If not, can we remove the check?
> > > > >>>>
> > > > >>>> Is there a way to disable the check?  If so, how?
> > > > >>>>
> > > > >>>> Is there a way to determine the number of paramters a query
> > > > >>>> takes?  If so, I can change my code.
> > > > >>>>
> > > > >>>> Is there a way to get the ejbql text from a Query
> > > > object? If so,
> > > > >>>> I'll write a quick parser to determine number of
> > queries myself.
> > > > >>>>
> > > > >>>> BTW, I'm currently using 0.9.6.
> > > > >>>>
> > > > >>>> Thanks,
> > > > >>>>
> > > > >>>> -dain
> > > > >>>
> > > > >>
> > > > >
> > > > > Craig Russell
> > > > > Architect, Sun Java Enterprise System
> > > > http://java.sun.com/products/jdo
> > > > > 408 276-5638 mailto:Craig.Russell@sun.com
> > > > > P.S. A good JDO? O, Gasp!
> > > > >
> > > >
> > > >
> > >
> > > Notice:  This email message, together with any attachments,
> > may contain
> > > information  of  BEA Systems,  Inc.,  its subsidiaries  and
> >  affiliated
> > > entities,  that may be confidential,  proprietary,
> > copyrighted  and/or
> > > legally privileged, and is intended solely for the use of
> > the individual or
> > > entity named in this message. If you are not the intended
> > recipient, and
> > > have received this message in error, please immediately
> > return this by email
> > > and then delete it.
> > >
> >
> >
> >
> > --
> > -Michael Dick
> >
>
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual or
> entity named in this message. If you are not the intended recipient, and
> have received this message in error, please immediately return this by email
> and then delete it.
>



-- 
-Michael Dick

RE: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Patrick Linskey <pl...@bea.com>.
> I have no problem adding this to the release. I was hoping to get
> OpenJPA-185 and OpenJPA-179 in as soon as I got commit 
> access, and then start the release process.

You should have commit access now.

> Is there anything else that we need to get in? If these are 
> the only changes
> we need, I'll go ahead and start the release this afternoon.

I think that the next step is to create an 0.9.8 goal within JIRA and
move everything except those things we plan for 0.9.7 out to 0.9.8. Once
we've done that and resolved all the 0.9.7 issues, we should be ready to
build a release.

I'm assuming that you've got the link to the release process that Marc
put together, right?

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Michael Dick [mailto:michael.d.dick@gmail.com] 
> Sent: Monday, April 02, 2007 10:58 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: [VOTE] ArgumentException : More parameters were 
> passed to execute() than were declared
> 
> I have no problem adding this to the release. I was hoping to get
> OpenJPA-185 and OpenJPA-179 in as soon as I got commit 
> access, and then
> start the release process.
> 
> Is there anything else that we need to get in? If these are 
> the only changes
> we need, I'll go ahead and start the release this afternoon.
> 
> On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
> >
> > I don't think that it's been cut yet. Mike: where do we stand on the
> > 0.9.7 process?
> >
> > -Patrick
> >
> > --
> > Patrick Linskey
> > BEA Systems, Inc.
> >
> > 
> ______________________________________________________________
> _________
> > Notice:  This email message, together with any attachments, 
> may contain
> > information  of  BEA Systems,  Inc.,  its subsidiaries  and 
>  affiliated
> > entities,  that may be confidential,  proprietary,  
> copyrighted  and/or
> > legally privileged, and is intended solely for the use of 
> the individual
> > or entity named in this message. If you are not the 
> intended recipient,
> > and have received this message in error, please immediately 
> return this
> > by email and then delete it.
> >
> > > -----Original Message-----
> > > From: Dain Sundstrom [mailto:dain@iq80.com]
> > > Sent: Monday, April 02, 2007 9:23 AM
> > > To: open-jpa-dev@incubator.apache.org
> > > Subject: Re: [VOTE] ArgumentException : More parameters were
> > > passed to execute() than were declared
> > >
> > > Is this something we can put in 0.9.7 or has that been 
> cut already?
> > >
> > > -dain
> > >
> > > On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
> > >
> > > > +1 to remove the restriction. As long as no parameters are
> > > missing,
> > > > the query should be considered sufficient.
> > > >
> > > > Craig
> > > >
> > > > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
> > > >
> > > >>
> > > >> Seem fair enough to get rid of the description. I've opened
> > > >> https://issues.apache.org/jira/browse/OPENJPA-196 
> describing the
> > > >> issue.
> > > >>
> > > >> +1 from me to remove the restriction that there be exactly
> > > as many
> > > >> positional parameters declared as were assigned.
> > > >>
> > > >>
> > > >>
> > > >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> > > >>
> > > >>> Actually, I think there is a bigger problem...  Say I have a
> > > >>> query like this:
> > > >>>
> > > >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
> > > >>>
> > > >>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)
> > > >>> code assumes that if I have 1 parameter it is numbered
> > > ?1, but in
> > > >>> EJB 2.1 this was not a requirement and there are certification
> > > >>> tests that verify you are allowed to have "unused" parameters
> > > >>> (e.g, in my example about ?1 and ?N where N>2 are all not
> > > used).
> > > >>> I couldn't find any text in the specification that 
> says that all
> > > >>> all positional parameters must be used in the query, but I did
> > > >>> find text that say the EJB-QL 3.0 language is an
> > > extension of the
> > > >>> EJB-QL 2.1 language:
> > > >>>
> > > >>> "The Java Persistence query language is an extension of the
> > > >>> Enterprise Java Beans query language, EJB QL, definedin[5]."
> > > >>>
> > > >>> So I think we must remove the "extra-params" check, 
> but I would
> > > >>> be happy with a "don't check for extra-params flag".
> > > >>>
> > > >>> -dain
> > > >>>
> > > >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> > > >>>
> > > >>>> I'm working on a CMP 2 implementation that delegates 
> to OpenJPA
> > > >>>> for persistence.  I'm running into a problem where I get the
> > > >>>> following exception:
> > > >>>>
> > > >>>> org.apache.openjpa.persistence.ArgumentException : More
> > > >>>> parameters were passed to execute() than were declared: 4
> > > >>>> parameters were specified for query execution, but only 2
> > > >>>> parameters were declared in the query.
> > > >>>>
> > > >>>>
> > > >>>> In CMP you declare finder and select methods that have
> > > >>>> parameters which are passed into the query engine.  You
> > > can have
> > > >>>> as many parameters as you like but are not required 
> to use them
> > > >>>> all, but it appears that OpenJPA is enforcing a restriction
> > > >>>> where if the EJB-QL text only lists say 2 parameters and
> > > I set 4
> > > >>>> I get the above exception.  In order of perference:
> > > >>>>
> > > >>>> Is this spec required? If not, can we remove the check?
> > > >>>>
> > > >>>> Is there a way to disable the check?  If so, how?
> > > >>>>
> > > >>>> Is there a way to determine the number of paramters a query
> > > >>>> takes?  If so, I can change my code.
> > > >>>>
> > > >>>> Is there a way to get the ejbql text from a Query
> > > object? If so,
> > > >>>> I'll write a quick parser to determine number of 
> queries myself.
> > > >>>>
> > > >>>> BTW, I'm currently using 0.9.6.
> > > >>>>
> > > >>>> Thanks,
> > > >>>>
> > > >>>> -dain
> > > >>>
> > > >>
> > > >
> > > > Craig Russell
> > > > Architect, Sun Java Enterprise System
> > > http://java.sun.com/products/jdo
> > > > 408 276-5638 mailto:Craig.Russell@sun.com
> > > > P.S. A good JDO? O, Gasp!
> > > >
> > >
> > >
> >
> > Notice:  This email message, together with any attachments, 
> may contain
> > information  of  BEA Systems,  Inc.,  its subsidiaries  and 
>  affiliated
> > entities,  that may be confidential,  proprietary,  
> copyrighted  and/or
> > legally privileged, and is intended solely for the use of 
> the individual or
> > entity named in this message. If you are not the intended 
> recipient, and
> > have received this message in error, please immediately 
> return this by email
> > and then delete it.
> >
> 
> 
> 
> -- 
> -Michael Dick
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Michael Dick <mi...@gmail.com>.
I have no problem adding this to the release. I was hoping to get
OpenJPA-185 and OpenJPA-179 in as soon as I got commit access, and then
start the release process.

Is there anything else that we need to get in? If these are the only changes
we need, I'll go ahead and start the release this afternoon.

On 4/2/07, Patrick Linskey <pl...@bea.com> wrote:
>
> I don't think that it's been cut yet. Mike: where do we stand on the
> 0.9.7 process?
>
> -Patrick
>
> --
> Patrick Linskey
> BEA Systems, Inc.
>
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
> > -----Original Message-----
> > From: Dain Sundstrom [mailto:dain@iq80.com]
> > Sent: Monday, April 02, 2007 9:23 AM
> > To: open-jpa-dev@incubator.apache.org
> > Subject: Re: [VOTE] ArgumentException : More parameters were
> > passed to execute() than were declared
> >
> > Is this something we can put in 0.9.7 or has that been cut already?
> >
> > -dain
> >
> > On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
> >
> > > +1 to remove the restriction. As long as no parameters are
> > missing,
> > > the query should be considered sufficient.
> > >
> > > Craig
> > >
> > > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
> > >
> > >>
> > >> Seem fair enough to get rid of the description. I've opened
> > >> https://issues.apache.org/jira/browse/OPENJPA-196 describing the
> > >> issue.
> > >>
> > >> +1 from me to remove the restriction that there be exactly
> > as many
> > >> positional parameters declared as were assigned.
> > >>
> > >>
> > >>
> > >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> > >>
> > >>> Actually, I think there is a bigger problem...  Say I have a
> > >>> query like this:
> > >>>
> > >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
> > >>>
> > >>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)
> > >>> code assumes that if I have 1 parameter it is numbered
> > ?1, but in
> > >>> EJB 2.1 this was not a requirement and there are certification
> > >>> tests that verify you are allowed to have "unused" parameters
> > >>> (e.g, in my example about ?1 and ?N where N>2 are all not
> > used).
> > >>> I couldn't find any text in the specification that says that all
> > >>> all positional parameters must be used in the query, but I did
> > >>> find text that say the EJB-QL 3.0 language is an
> > extension of the
> > >>> EJB-QL 2.1 language:
> > >>>
> > >>> "The Java Persistence query language is an extension of the
> > >>> Enterprise Java Beans query language, EJB QL, definedin[5]."
> > >>>
> > >>> So I think we must remove the "extra-params" check, but I would
> > >>> be happy with a "don't check for extra-params flag".
> > >>>
> > >>> -dain
> > >>>
> > >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> > >>>
> > >>>> I'm working on a CMP 2 implementation that delegates to OpenJPA
> > >>>> for persistence.  I'm running into a problem where I get the
> > >>>> following exception:
> > >>>>
> > >>>> org.apache.openjpa.persistence.ArgumentException : More
> > >>>> parameters were passed to execute() than were declared: 4
> > >>>> parameters were specified for query execution, but only 2
> > >>>> parameters were declared in the query.
> > >>>>
> > >>>>
> > >>>> In CMP you declare finder and select methods that have
> > >>>> parameters which are passed into the query engine.  You
> > can have
> > >>>> as many parameters as you like but are not required to use them
> > >>>> all, but it appears that OpenJPA is enforcing a restriction
> > >>>> where if the EJB-QL text only lists say 2 parameters and
> > I set 4
> > >>>> I get the above exception.  In order of perference:
> > >>>>
> > >>>> Is this spec required? If not, can we remove the check?
> > >>>>
> > >>>> Is there a way to disable the check?  If so, how?
> > >>>>
> > >>>> Is there a way to determine the number of paramters a query
> > >>>> takes?  If so, I can change my code.
> > >>>>
> > >>>> Is there a way to get the ejbql text from a Query
> > object? If so,
> > >>>> I'll write a quick parser to determine number of queries myself.
> > >>>>
> > >>>> BTW, I'm currently using 0.9.6.
> > >>>>
> > >>>> Thanks,
> > >>>>
> > >>>> -dain
> > >>>
> > >>
> > >
> > > Craig Russell
> > > Architect, Sun Java Enterprise System
> > http://java.sun.com/products/jdo
> > > 408 276-5638 mailto:Craig.Russell@sun.com
> > > P.S. A good JDO? O, Gasp!
> > >
> >
> >
>
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual or
> entity named in this message. If you are not the intended recipient, and
> have received this message in error, please immediately return this by email
> and then delete it.
>



-- 
-Michael Dick

RE: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Patrick Linskey <pl...@bea.com>.
I don't think that it's been cut yet. Mike: where do we stand on the
0.9.7 process?

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Dain Sundstrom [mailto:dain@iq80.com] 
> Sent: Monday, April 02, 2007 9:23 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: [VOTE] ArgumentException : More parameters were 
> passed to execute() than were declared
> 
> Is this something we can put in 0.9.7 or has that been cut already?
> 
> -dain
> 
> On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
> 
> > +1 to remove the restriction. As long as no parameters are 
> missing,  
> > the query should be considered sufficient.
> >
> > Craig
> >
> > On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
> >
> >>
> >> Seem fair enough to get rid of the description. I've opened  
> >> https://issues.apache.org/jira/browse/OPENJPA-196 describing the  
> >> issue.
> >>
> >> +1 from me to remove the restriction that there be exactly 
> as many  
> >> positional parameters declared as were assigned.
> >>
> >>
> >>
> >> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> >>
> >>> Actually, I think there is a bigger problem...  Say I have a  
> >>> query like this:
> >>>
> >>>     SELECT x FROM foo AS x WHERE foo.name = ?2
> >>>
> >>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)  
> >>> code assumes that if I have 1 parameter it is numbered 
> ?1, but in  
> >>> EJB 2.1 this was not a requirement and there are certification  
> >>> tests that verify you are allowed to have "unused" parameters  
> >>> (e.g, in my example about ?1 and ?N where N>2 are all not 
> used).   
> >>> I couldn't find any text in the specification that says that all  
> >>> all positional parameters must be used in the query, but I did  
> >>> find text that say the EJB-QL 3.0 language is an 
> extension of the  
> >>> EJB-QL 2.1 language:
> >>>
> >>> "The Java Persistence query language is an extension of the  
> >>> Enterprise Java Beans query language, EJB QL, definedin[5]."
> >>>
> >>> So I think we must remove the "extra-params" check, but I would  
> >>> be happy with a "don't check for extra-params flag".
> >>>
> >>> -dain
> >>>
> >>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> >>>
> >>>> I'm working on a CMP 2 implementation that delegates to OpenJPA  
> >>>> for persistence.  I'm running into a problem where I get the  
> >>>> following exception:
> >>>>
> >>>> org.apache.openjpa.persistence.ArgumentException : More  
> >>>> parameters were passed to execute() than were declared: 4  
> >>>> parameters were specified for query execution, but only 2  
> >>>> parameters were declared in the query.
> >>>>
> >>>>
> >>>> In CMP you declare finder and select methods that have  
> >>>> parameters which are passed into the query engine.  You 
> can have  
> >>>> as many parameters as you like but are not required to use them  
> >>>> all, but it appears that OpenJPA is enforcing a restriction  
> >>>> where if the EJB-QL text only lists say 2 parameters and 
> I set 4  
> >>>> I get the above exception.  In order of perference:
> >>>>
> >>>> Is this spec required? If not, can we remove the check?
> >>>>
> >>>> Is there a way to disable the check?  If so, how?
> >>>>
> >>>> Is there a way to determine the number of paramters a query  
> >>>> takes?  If so, I can change my code.
> >>>>
> >>>> Is there a way to get the ejbql text from a Query 
> object? If so,  
> >>>> I'll write a quick parser to determine number of queries myself.
> >>>>
> >>>> BTW, I'm currently using 0.9.6.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> -dain
> >>>
> >>
> >
> > Craig Russell
> > Architect, Sun Java Enterprise System 
> http://java.sun.com/products/jdo
> > 408 276-5638 mailto:Craig.Russell@sun.com
> > P.S. A good JDO? O, Gasp!
> >
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Dain Sundstrom <da...@iq80.com>.
I tested the fix and it solved my problem.

Thanks,

-dain

On Apr 2, 2007, at 3:00 PM, Marc Prud'hommeaux wrote:

> Dain-
>
> On Apr 2, 2007, at 12:23 PM, Dain Sundstrom wrote:
>
>> Is this something we can put in 0.9.7 or has that been cut already?
>
> I've gone ahead and committed the fix for this.
>
>
>
>> -dain
>>
>> On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
>>
>>> +1 to remove the restriction. As long as no parameters are  
>>> missing, the query should be considered sufficient.
>>>
>>> Craig
>>>
>>> On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
>>>
>>>>
>>>> Seem fair enough to get rid of the description. I've opened  
>>>> https://issues.apache.org/jira/browse/OPENJPA-196 describing the  
>>>> issue.
>>>>
>>>> +1 from me to remove the restriction that there be exactly as  
>>>> many positional parameters declared as were assigned.
>>>>
>>>>
>>>>
>>>> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
>>>>
>>>>> Actually, I think there is a bigger problem...  Say I have a  
>>>>> query like this:
>>>>>
>>>>>     SELECT x FROM foo AS x WHERE foo.name = ?2
>>>>>
>>>>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)  
>>>>> code assumes that if I have 1 parameter it is numbered ?1, but  
>>>>> in EJB 2.1 this was not a requirement and there are  
>>>>> certification tests that verify you are allowed to have  
>>>>> "unused" parameters (e.g, in my example about ?1 and ?N where  
>>>>> N>2 are all not used).  I couldn't find any text in the  
>>>>> specification that says that all all positional parameters must  
>>>>> be used in the query, but I did find text that say the EJB-QL  
>>>>> 3.0 language is an extension of the EJB-QL 2.1 language:
>>>>>
>>>>> "The Java Persistence query language is an extension of the  
>>>>> Enterprise Java Beans query language, EJB QL, definedin[5]."
>>>>>
>>>>> So I think we must remove the "extra-params" check, but I would  
>>>>> be happy with a "don't check for extra-params flag".
>>>>>
>>>>> -dain
>>>>>
>>>>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
>>>>>
>>>>>> I'm working on a CMP 2 implementation that delegates to  
>>>>>> OpenJPA for persistence.  I'm running into a problem where I  
>>>>>> get the following exception:
>>>>>>
>>>>>> org.apache.openjpa.persistence.ArgumentException : More  
>>>>>> parameters were passed to execute() than were declared: 4  
>>>>>> parameters were specified for query execution, but only 2  
>>>>>> parameters were declared in the query.
>>>>>>
>>>>>>
>>>>>> In CMP you declare finder and select methods that have  
>>>>>> parameters which are passed into the query engine.  You can  
>>>>>> have as many parameters as you like but are not required to  
>>>>>> use them all, but it appears that OpenJPA is enforcing a  
>>>>>> restriction where if the EJB-QL text only lists say 2  
>>>>>> parameters and I set 4 I get the above exception.  In order of  
>>>>>> perference:
>>>>>>
>>>>>> Is this spec required? If not, can we remove the check?
>>>>>>
>>>>>> Is there a way to disable the check?  If so, how?
>>>>>>
>>>>>> Is there a way to determine the number of paramters a query  
>>>>>> takes?  If so, I can change my code.
>>>>>>
>>>>>> Is there a way to get the ejbql text from a Query object? If  
>>>>>> so, I'll write a quick parser to determine number of queries  
>>>>>> myself.
>>>>>>
>>>>>> BTW, I'm currently using 0.9.6.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> -dain
>>>>>
>>>>
>>>
>>> Craig Russell
>>> Architect, Sun Java Enterprise System http://java.sun.com/ 
>>> products/jdo
>>> 408 276-5638 mailto:Craig.Russell@sun.com
>>> P.S. A good JDO? O, Gasp!
>>>
>>
>


Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Marc Prud'hommeaux <mp...@apache.org>.
Dain-

On Apr 2, 2007, at 12:23 PM, Dain Sundstrom wrote:

> Is this something we can put in 0.9.7 or has that been cut already?

I've gone ahead and committed the fix for this.



> -dain
>
> On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:
>
>> +1 to remove the restriction. As long as no parameters are  
>> missing, the query should be considered sufficient.
>>
>> Craig
>>
>> On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
>>
>>>
>>> Seem fair enough to get rid of the description. I've opened  
>>> https://issues.apache.org/jira/browse/OPENJPA-196 describing the  
>>> issue.
>>>
>>> +1 from me to remove the restriction that there be exactly as  
>>> many positional parameters declared as were assigned.
>>>
>>>
>>>
>>> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
>>>
>>>> Actually, I think there is a bigger problem...  Say I have a  
>>>> query like this:
>>>>
>>>>     SELECT x FROM foo AS x WHERE foo.name = ?2
>>>>
>>>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)  
>>>> code assumes that if I have 1 parameter it is numbered ?1, but  
>>>> in EJB 2.1 this was not a requirement and there are  
>>>> certification tests that verify you are allowed to have "unused"  
>>>> parameters (e.g, in my example about ?1 and ?N where N>2 are all  
>>>> not used).  I couldn't find any text in the specification that  
>>>> says that all all positional parameters must be used in the  
>>>> query, but I did find text that say the EJB-QL 3.0 language is  
>>>> an extension of the EJB-QL 2.1 language:
>>>>
>>>> "The Java Persistence query language is an extension of the  
>>>> Enterprise Java Beans query language, EJB QL, definedin[5]."
>>>>
>>>> So I think we must remove the "extra-params" check, but I would  
>>>> be happy with a "don't check for extra-params flag".
>>>>
>>>> -dain
>>>>
>>>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
>>>>
>>>>> I'm working on a CMP 2 implementation that delegates to OpenJPA  
>>>>> for persistence.  I'm running into a problem where I get the  
>>>>> following exception:
>>>>>
>>>>> org.apache.openjpa.persistence.ArgumentException : More  
>>>>> parameters were passed to execute() than were declared: 4  
>>>>> parameters were specified for query execution, but only 2  
>>>>> parameters were declared in the query.
>>>>>
>>>>>
>>>>> In CMP you declare finder and select methods that have  
>>>>> parameters which are passed into the query engine.  You can  
>>>>> have as many parameters as you like but are not required to use  
>>>>> them all, but it appears that OpenJPA is enforcing a  
>>>>> restriction where if the EJB-QL text only lists say 2  
>>>>> parameters and I set 4 I get the above exception.  In order of  
>>>>> perference:
>>>>>
>>>>> Is this spec required? If not, can we remove the check?
>>>>>
>>>>> Is there a way to disable the check?  If so, how?
>>>>>
>>>>> Is there a way to determine the number of paramters a query  
>>>>> takes?  If so, I can change my code.
>>>>>
>>>>> Is there a way to get the ejbql text from a Query object? If  
>>>>> so, I'll write a quick parser to determine number of queries  
>>>>> myself.
>>>>>
>>>>> BTW, I'm currently using 0.9.6.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> -dain
>>>>
>>>
>>
>> Craig Russell
>> Architect, Sun Java Enterprise System http://java.sun.com/products/ 
>> jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> P.S. A good JDO? O, Gasp!
>>
>


Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Dain Sundstrom <da...@iq80.com>.
Is this something we can put in 0.9.7 or has that been cut already?

-dain

On Apr 1, 2007, at 10:07 PM, Craig L Russell wrote:

> +1 to remove the restriction. As long as no parameters are missing,  
> the query should be considered sufficient.
>
> Craig
>
> On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:
>
>>
>> Seem fair enough to get rid of the description. I've opened  
>> https://issues.apache.org/jira/browse/OPENJPA-196 describing the  
>> issue.
>>
>> +1 from me to remove the restriction that there be exactly as many  
>> positional parameters declared as were assigned.
>>
>>
>>
>> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
>>
>>> Actually, I think there is a bigger problem...  Say I have a  
>>> query like this:
>>>
>>>     SELECT x FROM foo AS x WHERE foo.name = ?2
>>>
>>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...)  
>>> code assumes that if I have 1 parameter it is numbered ?1, but in  
>>> EJB 2.1 this was not a requirement and there are certification  
>>> tests that verify you are allowed to have "unused" parameters  
>>> (e.g, in my example about ?1 and ?N where N>2 are all not used).   
>>> I couldn't find any text in the specification that says that all  
>>> all positional parameters must be used in the query, but I did  
>>> find text that say the EJB-QL 3.0 language is an extension of the  
>>> EJB-QL 2.1 language:
>>>
>>> "The Java Persistence query language is an extension of the  
>>> Enterprise Java Beans query language, EJB QL, definedin[5]."
>>>
>>> So I think we must remove the "extra-params" check, but I would  
>>> be happy with a "don't check for extra-params flag".
>>>
>>> -dain
>>>
>>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
>>>
>>>> I'm working on a CMP 2 implementation that delegates to OpenJPA  
>>>> for persistence.  I'm running into a problem where I get the  
>>>> following exception:
>>>>
>>>> org.apache.openjpa.persistence.ArgumentException : More  
>>>> parameters were passed to execute() than were declared: 4  
>>>> parameters were specified for query execution, but only 2  
>>>> parameters were declared in the query.
>>>>
>>>>
>>>> In CMP you declare finder and select methods that have  
>>>> parameters which are passed into the query engine.  You can have  
>>>> as many parameters as you like but are not required to use them  
>>>> all, but it appears that OpenJPA is enforcing a restriction  
>>>> where if the EJB-QL text only lists say 2 parameters and I set 4  
>>>> I get the above exception.  In order of perference:
>>>>
>>>> Is this spec required? If not, can we remove the check?
>>>>
>>>> Is there a way to disable the check?  If so, how?
>>>>
>>>> Is there a way to determine the number of paramters a query  
>>>> takes?  If so, I can change my code.
>>>>
>>>> Is there a way to get the ejbql text from a Query object? If so,  
>>>> I'll write a quick parser to determine number of queries myself.
>>>>
>>>> BTW, I'm currently using 0.9.6.
>>>>
>>>> Thanks,
>>>>
>>>> -dain
>>>
>>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>


Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Craig L Russell <Cr...@Sun.COM>.
+1 to remove the restriction. As long as no parameters are missing,  
the query should be considered sufficient.

Craig

On Apr 1, 2007, at 9:30 AM, Marc Prud'hommeaux wrote:

>
> Seem fair enough to get rid of the description. I've opened https:// 
> issues.apache.org/jira/browse/OPENJPA-196 describing the issue.
>
> +1 from me to remove the restriction that there be exactly as many  
> positional parameters declared as were assigned.
>
>
>
> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
>
>> Actually, I think there is a bigger problem...  Say I have a query  
>> like this:
>>
>>     SELECT x FROM foo AS x WHERE foo.name = ?2
>>
>> The org.apache.openjpa.kernel.QueryImpl.assertParameters(...) code  
>> assumes that if I have 1 parameter it is numbered ?1, but in EJB  
>> 2.1 this was not a requirement and there are certification tests  
>> that verify you are allowed to have "unused" parameters (e.g, in  
>> my example about ?1 and ?N where N>2 are all not used).  I  
>> couldn't find any text in the specification that says that all all  
>> positional parameters must be used in the query, but I did find  
>> text that say the EJB-QL 3.0 language is an extension of the EJB- 
>> QL 2.1 language:
>>
>> "The Java Persistence query language is an extension of the  
>> Enterprise Java Beans query language, EJB QL, definedin[5]."
>>
>> So I think we must remove the "extra-params" check, but I would be  
>> happy with a "don't check for extra-params flag".
>>
>> -dain
>>
>> On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
>>
>>> I'm working on a CMP 2 implementation that delegates to OpenJPA  
>>> for persistence.  I'm running into a problem where I get the  
>>> following exception:
>>>
>>> org.apache.openjpa.persistence.ArgumentException : More  
>>> parameters were passed to execute() than were declared: 4  
>>> parameters were specified for query execution, but only 2  
>>> parameters were declared in the query.
>>>
>>>
>>> In CMP you declare finder and select methods that have parameters  
>>> which are passed into the query engine.  You can have as many  
>>> parameters as you like but are not required to use them all, but  
>>> it appears that OpenJPA is enforcing a restriction where if the  
>>> EJB-QL text only lists say 2 parameters and I set 4 I get the  
>>> above exception.  In order of perference:
>>>
>>> Is this spec required? If not, can we remove the check?
>>>
>>> Is there a way to disable the check?  If so, how?
>>>
>>> Is there a way to determine the number of paramters a query  
>>> takes?  If so, I can change my code.
>>>
>>> Is there a way to get the ejbql text from a Query object? If so,  
>>> I'll write a quick parser to determine number of queries myself.
>>>
>>> BTW, I'm currently using 0.9.6.
>>>
>>> Thanks,
>>>
>>> -dain
>>
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


RE: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

Posted by Patrick Linskey <pl...@bea.com>.
+1.

On a side note, I really don't understand why named and positional
parameters are in separate namespaces.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Marc Prud'hommeaux [mailto:mprudhomapache@gmail.com] On 
> Behalf Of Marc Prud'hommeaux
> Sent: Sunday, April 01, 2007 9:30 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: [VOTE] ArgumentException : More parameters were 
> passed to execute() than were declared
> 
> 
> Seem fair enough to get rid of the description. I've opened https:// 
> issues.apache.org/jira/browse/OPENJPA-196 describing the issue.
> 
> +1 from me to remove the restriction that there be exactly as many  
> positional parameters declared as were assigned.
> 
> 
> 
> On Mar 31, 2007, at 7:32 PM, Dain Sundstrom wrote:
> 
> > Actually, I think there is a bigger problem...  Say I have a query  
> > like this:
> >
> >     SELECT x FROM foo AS x WHERE foo.name = ?2
> >
> > The org.apache.openjpa.kernel.QueryImpl.assertParameters(...) code  
> > assumes that if I have 1 parameter it is numbered ?1, but in EJB  
> > 2.1 this was not a requirement and there are certification tests  
> > that verify you are allowed to have "unused" parameters 
> (e.g, in my  
> > example about ?1 and ?N where N>2 are all not used).  I couldn't  
> > find any text in the specification that says that all all  
> > positional parameters must be used in the query, but I did find  
> > text that say the EJB-QL 3.0 language is an extension of 
> the EJB-QL  
> > 2.1 language:
> >
> > "The Java Persistence query language is an extension of the  
> > Enterprise Java Beans query language, EJB QL, definedin[5]."
> >
> > So I think we must remove the "extra-params" check, but I would be  
> > happy with a "don't check for extra-params flag".
> >
> > -dain
> >
> > On Mar 31, 2007, at 8:56 AM, Dain Sundstrom wrote:
> >
> >> I'm working on a CMP 2 implementation that delegates to OpenJPA  
> >> for persistence.  I'm running into a problem where I get the  
> >> following exception:
> >>
> >> org.apache.openjpa.persistence.ArgumentException : More 
> parameters  
> >> were passed to execute() than were declared: 4 parameters were  
> >> specified for query execution, but only 2 parameters were 
> declared  
> >> in the query.
> >>
> >>
> >> In CMP you declare finder and select methods that have parameters  
> >> which are passed into the query engine.  You can have as many  
> >> parameters as you like but are not required to use them all, but  
> >> it appears that OpenJPA is enforcing a restriction where if the  
> >> EJB-QL text only lists say 2 parameters and I set 4 I get the  
> >> above exception.  In order of perference:
> >>
> >> Is this spec required? If not, can we remove the check?
> >>
> >> Is there a way to disable the check?  If so, how?
> >>
> >> Is there a way to determine the number of paramters a query  
> >> takes?  If so, I can change my code.
> >>
> >> Is there a way to get the ejbql text from a Query object? If so,  
> >> I'll write a quick parser to determine number of queries myself.
> >>
> >> BTW, I'm currently using 0.9.6.
> >>
> >> Thanks,
> >>
> >> -dain
> >
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.