Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Re: Strange Exception during native UPDATE-query

Miłosz Tylenda

2008-08-21

Replies: Find Java Web Hosting

Author LoginPost Reply

> I'm getting a strange Exception when executing the follwing native query
> to a MySQL db:
>
>        String statement = "UPDATE JBT_Order_Product " +
>                 "SET product_id=100"+
>                   " WHERE EXISTS " +
>                      "(SELECT o.id FROM JBT_Order o " +
>                         "WHERE o.scenario=0 " +
>                         "AND o.id = order_id)";
>        Query query = em.createNativeQuery(statement);
>        query.executeUpdate();
>
> JBT_Order_Product is a Join-Table consisting of the two columns
> product_id -> JBT_Product.id   and
> order_id -> JBT_Order.id
>
> Stacktrace:
>
> <openjpa-1.2.0-r422266:683325 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: PROCEDURE id does
> not exist

Seb, have you tried to upgrade your JDBC driver? It might be the cause.

Regards,
Milosz



©2008 gg3721.com - Jax Systems, LLC, U.S.A.