openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritika Maheshwari" <ritikams...@gmail.com>
Subject Exception in thread "main" <4|false|0.0.0> org.apache.openjpa.persistence.InvalidStateException: You cannot transfer large result set fields from one object or field to another.
Date Tue, 13 Feb 2007 21:57:40 GMT
Hi,

I have orderline defined as LRS in Orders.In persistence.xml I have this
defined

<property name="openjpa.FetchBatchSize" value="1" />

My test program gives the above error

em.getTransaction().begin();

Query query = em.createQuery("select object(o)from Orders o where
o.o_id=3001 and o.o_d_id='02' and o.o_w_id='0005'");

List rs1 = query.getResultList();

Orders ord = (Orders)rs1.get(0);

Set l = ord.getOrderline();

Iterator it = l.iterator();

*while* (it.hasNext()){

System.*out*.println(((Orderline)it.next()).toString());

}

OpenJPAPersistence.*close*(it);

em.getTransaction().commit();

em.close();

here is the stack trace produced

Exception in thread "main" <4|false|0.0.0> *
org.apache.openjpa.persistence.InvalidStateException*: You cannot transfer
large result set fields from one object or field to another.

at org.apache.openjpa.util.AbstractLRSProxyCollection.setOwner(
AbstractLRSProxyCollection.java)

at org.apache.openjpa.kernel.DetachManager$DetachFieldManager.reproxy(*
DetachManager.java:517*)

at org.apache.openjpa.kernel.DetachManager.detachInternal(*
DetachManager.java:425*)

at org.apache.openjpa.kernel.DetachManager.detachAll(*DetachManager.java:293
*)

at org.apache.openjpa.kernel.BrokerImpl.detachAllInternal(*BrokerImpl.java
:3120*)

at org.apache.openjpa.kernel.BrokerImpl.free(*BrokerImpl.java:3996*)

at org.apache.openjpa.kernel.BrokerImpl.close(*BrokerImpl.java:3983*)

at org.apache.openjpa.kernel.DelegatingBroker.close(*DelegatingBroker.java
:1260*)

at org.apache.openjpa.persistence.EntityManagerImpl.close(*
EntityManagerImpl.java:981*)

at tutorial.ejb.Test.main(Test.java)

Any idea why is this happening

ritika

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message