You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by SomuReddy <ch...@gmail.com> on 2008/05/14 23:18:39 UTC

OpenJPA Update Issue with Order


Hi 

I am trying to update table using the executeUpdate() method. Table has the
20 columns, i am tyring to update the all the columns. when i run the
program it gives the following exception, And It says "parameters were not
given values", but I am specifying the all the values. though each time i
run, it is giving the different order.
Anybody has any solution for this??

50  fpa_Junit  INFO   [main] openjpa.Runtime - Starting OpenJPA
1.0.0-SNAPSHOT
170  fpa_Junit  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.OracleDictionary".
Exception in thread "main" <1.0.0-SNAPSHOT-SNAPSHOT nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: Cannot execute query; some
declared parameters were not given values.  You must supply a value for each
of the following parameters, in the given order: [20, 4, 11, 18, 3, 12, 13,
5, 7, 19, 14, 8, 6, 15, 1, 9, 16, 17, 2, 10]
	at
org.apache.openjpa.kernel.QueryImpl.assertParameters(QueryImpl.java:1670)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792)
	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:877)
	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:873)
	at
org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:565)
	at
org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:314)
	at
fpa.fw.ds.jpadataadapter.JPADataSourceAdapter.executeUpdate(JPADataSourceAdapter.java:395)
	at
fpa.common.di.dataservices.fwa.UpdateFWAsByFMUIDDIMediatorFunc.execute(UpdateFWAsByFMUIDDIMediatorFunc.java:112)
	at
fpa.common.di.dataservices.fwa.FWADIMediator.updateFWAsByFMUID(FWADIMediator.java:158)
	at
fpa.com.di.dataservices.fwa.UpdateFWAsByFMUIDsDITest.testUpdateFWAsByFMUIDTest(UpdateFWAsByFMUIDsDITest.java:71)
	at
fpa.com.di.dataservices.fwa.UpdateFWAsByFMUIDsDITest.main(UpdateFWAsByFMUIDsDITest.java:83)

Thanks In Advance!!!
Regards,
Somu

-- 
View this message in context: http://www.nabble.com/OpenJPA-Update-Issue-with-Order-tp17241072p17241072.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: OpenJPA Update Issue with Order

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

Two things:

the 1.0.0-SNAPSHOT isn't a good release to use; and

is it possible for you to post the code that is causing the problem  
with a more current release (1.0.2 or 1.1.0-SNAPSHOT)?

Craig

On May 14, 2008, at 2:18 PM, SomuReddy wrote:

>
>
> Hi
>
> I am trying to update table using the executeUpdate() method. Table  
> has the
> 20 columns, i am tyring to update the all the columns. when i run the
> program it gives the following exception, And It says "parameters  
> were not
> given values", but I am specifying the all the values. though each  
> time i
> run, it is giving the different order.
> Anybody has any solution for this??
>
> 50  fpa_Junit  INFO   [main] openjpa.Runtime - Starting OpenJPA
> 1.0.0-SNAPSHOT
> 170  fpa_Junit  INFO   [main] openjpa.jdbc.JDBC - Using dictionary  
> class
> "org.apache.openjpa.jdbc.sql.OracleDictionary".
> Exception in thread "main" <1.0.0-SNAPSHOT-SNAPSHOT nonfatal user  
> error>
> org.apache.openjpa.persistence.ArgumentException: Cannot execute  
> query; some
> declared parameters were not given values.  You must supply a value  
> for each
> of the following parameters, in the given order: [20, 4, 11, 18, 3,  
> 12, 13,
> 5, 7, 19, 14, 8, 6, 15, 1, 9, 16, 17, 2, 10]
> 	at
> org.apache.openjpa.kernel.QueryImpl.assertParameters(QueryImpl.java: 
> 1670)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:877)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:873)
> 	at
> org 
> .apache 
> .openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:565)
> 	at
> org 
> .apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java: 
> 314)
> 	at
> fpa 
> .fw 
> .ds 
> .jpadataadapter 
> .JPADataSourceAdapter.executeUpdate(JPADataSourceAdapter.java:395)
> 	at
> fpa 
> .common 
> .di 
> .dataservices 
> .fwa 
> .UpdateFWAsByFMUIDDIMediatorFunc 
> .execute(UpdateFWAsByFMUIDDIMediatorFunc.java:112)
> 	at
> fpa 
> .common 
> .di 
> .dataservices.fwa.FWADIMediator.updateFWAsByFMUID(FWADIMediator.java: 
> 158)
> 	at
> fpa 
> .com 
> .di 
> .dataservices 
> .fwa 
> .UpdateFWAsByFMUIDsDITest 
> .testUpdateFWAsByFMUIDTest(UpdateFWAsByFMUIDsDITest.java:71)
> 	at
> fpa 
> .com 
> .di 
> .dataservices 
> .fwa.UpdateFWAsByFMUIDsDITest.main(UpdateFWAsByFMUIDsDITest.java:83)
>
> Thanks In Advance!!!
> Regards,
> Somu
>
> -- 
> View this message in context: http://www.nabble.com/OpenJPA-Update-Issue-with-Order-tp17241072p17241072.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

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!