Re: How to disable jpql Polymorphic Queries

2009-07-13 Thread Jeff Yin
Thanks a lot for your help though it doesn't work. rpalache wrote: > > Hi Jeff, > > Yes you are correct. I developed a simple test case for this and I see > that the SubclassFetchMode is not helping resolve the issue. > > I did more debugging in the openJPA code and see that currently in case

Re: How to disable jpql Polymorphic Queries

2009-07-13 Thread Jeff Yin
Great, it works! Thanks a lot. Pinaki Poddar wrote: > > try: > javax.persistence.Query q = em.createQuery(aJPQLString); > q.setHint("openjpa.Subclasses", "false"); > > > > Jeff Yin wrote: >> >> if i use a jpql query select a from A a >> all the instances of the subclasses of A will be re

Re: How to disable jpql Polymorphic Queries

2009-07-13 Thread Pinaki Poddar
try: javax.persistence.Query q = em.createQuery(aJPQLString); q.setHint("openjpa.Subclasses", "false"); Jeff Yin wrote: > > if i use a jpql query select a from A a > all the instances of the subclasses of A will be returned, how can i > disable this behavior? thanks. > - Pinaki --

Re: FW: Memory leak

2009-07-13 Thread David Minor
Hi Mike, Nothing else has changed. The application extends spring 2.0's AbstractEntityManagerFactoryBean class (apparently so that the persistence.xml file can be named something different). I notice it is checking the return type of AbstractEntityManagerFactoryBean's getPersistenceProvider() for

Re: How to disable jpql Polymorphic Queries

2009-07-13 Thread rpalache
Hi Jeff, Yes you are correct. I developed a simple test case for this and I see that the SubclassFetchMode is not helping resolve the issue. I did more debugging in the openJPA code and see that currently in case of subclasses the queries for subclasses will be executed and I see no way to stop

Re: Named Query fails but SQL works

2009-07-13 Thread Kevin Sutter
Hmmm... Your find() operation is not quite the same as your query. Besides the obvious of using a single input parameter for the find and the three input parameters for the query, the find operation is based off the ORG_ID field and the query is not using that field at all. The query seems to be

Re: Memory leak

2009-07-13 Thread Michael Dick
Hi David, FinalizingBrokerImpl will close itself and free resources when it's GC'ed. It sounds like something else is holding on to a lot of references to FBImpl (I'd guess something changed "upstream"). One cause is if the application creates a large number of EntityManagers and doesn't close th

Memory leak

2009-07-13 Thread David Minor
Upgrading openjpa from 1.0.1 to 1.2.1 seems to introduce a memory leak in our application -- leaving the server running for a few days results in OOM errors (there are quartz tasks making simple openjpa selects during this time). A heap dump reveals org.apache.openjpa.kernel.FinalizingBrokerImpl as

Re: OPENJPA and TOMCAT

2009-07-13 Thread Daryl Stultz
On Mon, Jul 13, 2009 at 10:59 AM, Alla wrote: > > I would appreciate if you would refer me to the instructions how to > integrate > OPENJPA and TOMCAT > thanks a lot I think the main issue is that you have manage the Entity Manages and Factory yourself. This might help: http://javanotepad.blogs

OPENJPA and TOMCAT

2009-07-13 Thread Alla
I would appreciate if you would refer me to the instructions how to integrate OPENJPA and TOMCAT thanks a lot -- View this message in context: http://n2.nabble.com/OPENJPA-and-TOMCAT-tp3250957p3250957.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Named Query fails but SQL works

2009-07-13 Thread jewettdiane
It finds the record if I just run getEntityManager().find(entityClass, id): SELECT t0.LST_UPDT_CD, t0.LST_UPDT_TMP, t0.LST_UPDT_USER_ID, t0.ADP_ACCOUNT_TYPE_CD, t0.BILLING_CYCLE_CD, t0.BILLING_FIRST_DT, t0.CONTRACT_SIGNED_DT, t0.CUST_ORG_ID, t0.DUNS_NBR, t0.fein, t0.INT

Re: [VOTE] OpenJPA Logo Contest - Final Round through July 15

2009-07-13 Thread Daryl Stultz
On Sat, Jul 11, 2009 at 6:11 AM, Pid wrote: > > With the greatest of respect and hopefully without causing a controversy, > can I suggest that the differences between 1 and 3 are so small I agree. In many applications of the logo, the details in the "O" of #3 will be lost. My vote is #1. --

Re: null values not updating

2009-07-13 Thread Daryl Stultz
On Sat, Jul 11, 2009 at 2:05 AM, coloradoflyer wrote: > > Hi Daryl, > > I added in a 'version' colum to the table, and get/set methods for Version > and annotated it @Version > ... > With these changes, the problem did not change. Given that I solved my null problems without using @Version, I'm

Exception of merge method.

2009-07-13 Thread wang yu
Hello, My case is: 1. Find an entity and close the context. 2. Update it with user input. 3. Create a new EntityManager and try to merge it into new context. Then the following exception was thrown: org.apache.openjpa.persistence.InvalidStateException: The generated value processing detected an