KEY was exactly what I was looking for. Thanks!
- Howard
- Reply message -
From: Rick Curtis curti...@gmail.com
To: users@openjpa.apache.org users@openjpa.apache.org
Subject: OpenJPA querying on element collections
Date: Tue, Sep 27, 2011 8:35 am
Howard -
Yes, it is possible. I'd
Some persisted entities are shared between threads, but not
EntityManagers.
This is the root of your problem. EntityManagers and Entities can't be
shared across threads.
Thanks,
Rick
Section 7.2 -- JPA 2.0 Spec
An entity manager must not be shared among multiple concurrently executing
threads,
Hi,
You have been referencing code, but I haven't seen any code attachments or
code snippets to look at...
A good reference for OpenJPA's enhancement processing can be found on our
wiki:
http://openjpa.apache.org/entity-enhancement.html
You are correct. There are hooks in the WebSphere code to
Concurrent threads can operate on an OpenJPA EntityManager. However, by
default, EntityManager is not thread-safe. Try
property name=openjpa.Multithreaded value=true/
Please note that this flag will ensure that OpenJPA will protect all its
internal data structures for concurrent access. But the
Does OpenJPA really support standalone usage?
Yes.
org.xml.sax.SAXNotRecognizedException:
http://java.sun.com/xml/jaxp/properties/schemaLanguage
Most likely the problem lies with XML parsers available in your environment.
1. How are you invoking the standalone program?
2. What SAXParser is
property name=openjpa.Multithreaded value=true/
Be careful when setting this property as there is at least one known bug[1].
Thanks,
Rick
[1] https://issues.apache.org/jira/browse/OPENJPA-1716
On Wed, Sep 28, 2011 at 9:01 AM, Pinaki Poddar ppod...@apache.org wrote:
Concurrent threads can
OK, thanks. But, now the original problem appears again
SAX Parser class --- org.apache.xerces.jaxp.SAXParserFactoryImpl
javax.persistence.PersistenceException: Explicit persistence provider
error(s) occurred for event after trying the following discovered
implementations:
Oops,
Please do this to see which parser is active
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
System.err.println(Factory: + factory.getClass().getName());
Here's the output:
Factory: org.apache.xerces.jaxp.SAXParserFactoryImpl
Parser: org.apache.xerces.jaxp.SAXParserImpl
Thanks for your help...
From: Pinaki Poddar [via OpenJPA]
[mailto:ml-node+s208410n6840929...@n2.nabble.com]
Sent: Wednesday, September 28, 2011 10:44 AM
To: Barnett, James
Hi kevin,
Attached POJO:--
http://openjpa.208410.n2.nabble.com/file/n6841060/BranchVO.java
BranchVO.java
Code snippet to retrieve values
//native sql query
String njSql = SELECT b.branch_id, b.branch_cust_id,
ba.branch_address_street1 from branch as b, +
We are in difficult territory now. The error shows that the SAXParser does
not recognize a property that OpenJPA is attempting to set before using the
parser.
Now, I ran a small test and my SAXFactory/Parser are same as yours. I am
using JDK 1.5.
Please run the following code (preferably from a
I'm going to throw this one out as a wild hair...
What JDK is being used? I notice the user's id is from HP and I believe HP
has a special version of the JDK. If, by chance, you are using the special
HP JDK, can you try the scenario with a standard Sun/Oracle JDK? Like I
said, just a wild
Hi -- my environ:
- jdk 1.6. 0_22 (Sun/Oracle JDK)
- Using Eclipse Run as Java Application
Results of 'testParserProperty' invocation:
class org.apache.xerces.jaxp.SAXParserFactoryImpl
class org.apache.xerces.jaxp.SAXParserImpl
org.xml.sax.SAXNotRecognizedException:
Hi,
BranchVO is an Embeddable. The enhancement process should process @Entity,
@MappedSuperClass, and @Embeddable POJOs.
You mentioned earlier that you were using WebSphere. But, the code snippet
below shows you manually creating the EMF and EM. So, I would guess that
for this test case, you
Please run the following code (*preferably* from a command-line)
I will change that *preferably* to a *must*.
And ensure *nothing else* is in your classpath (other than the program
itself :)
As you can see that the problem can be reproduced even without OpenJPA. It
is caused by the
No problem and thanks a lot! Running standalone worked -- I will figure out the
conflict. Thanks for your time patience...
From: Pinaki Poddar [via OpenJPA]
[mailto:ml-node+s208410n6841367...@n2.nabble.com]
Sent: Wednesday, September 28, 2011 12:36 PM
To: Barnett, James
Subject: RE: problems
Not a true problem I don't think, but a curiosity.
I am using the version of JPA 1.2.3-SNAPSHOT which is included in WebSphere
7.
I have a base class that contains common fields, such as id, insert user,
insert datetime, etc, and this is annotated as @MappedSuperclass. My
entities all extend
I see. I'm looking forward to the next release then! :)
Am 22.09.2011 18:39, schrieb Pinaki Poddar:
Hi Christopher,
The old value is not available *externally* via SaveFieldManager. That
is why all that work gone in writing an Auditor, as I had mentioned earlier.
-
Pinaki Poddar
Sorry. It was my mistake. I was trying different scenairos. I forgot to
remove @Embeddable annotation.
If i use embeddable, I am getting below exception
org.apache.openjpa.persistence.InvalidStateException: Cannot instantiate
virtual mapping com.company.vo.BranchVO.
I am running application on
I'm looking forward to the next release then! :)
Following Linus' Law (given enough eyeballs, all bugs are shallow), if
more people test it out, then OpenJPA will have a bug-free release.
I was hoping that so much interest in Auditing (a mail chain with 60+
replies) will make some people to
Hi,
Your posts are going all over the map... It looks like you are attempting
to track several different issues and the details are getting muddled...
Since you are using WebSphere, have you considered using the PMR process to
track this problem? You might get a more dedicated response...
If
Sure Kevin. Let me create new post with all details.
Thanks
unmarshall
--
View this message in context:
http://openjpa.208410.n2.nabble.com/How-to-Enable-Buildtime-entity-enhancement-in-RSA-tp6836583p6841828.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
This is interesting. I thought FindBugs ran against the java source, not
the class files. The pcVersionInit field that you reference is a field that
is inserted into the bytecodes of an Entity class file during the OpenJPA
enhancement processing. (FYI, any fields or methods that are prefaced by
Just for my own curiosity, where can I find out what pcVersionInit is?
pcVersionInit was added with OPENJPA-1400[1].
Thanks,
Rick
[1] https://issues.apache.org/jira/browse/OPENJPA-1400
On Wed, Sep 28, 2011 at 3:18 PM, kostellodon donald.g.koste...@citi.comwrote:
Not a true problem I don't
Hi,
We have different business departments and each of these departments have
their own persistent units. Since departments are dynamic, we have thought
of using application-mangaged entity manager based on the persistent unit
passed for respective business unit.
We are creating map of emf for
FindBugs runs against the class files. We are running this from Jenkins, and
are using Maven to do the build. So, we've got Maven set up to do
compile-time enhancement. To check against unenhanced classes, we'd have to
do something like creating two different builds using different Maven
We have this common code becuase we dont know entity defined in the
persistence.xml belongs to which persistent unit. so iterate over entity
managers to find out. Once we find out we assign entity manager and then
interact with db with that em.
//em1 we got it from emf map
Setlt;EntityTypelt;?gt;
27 matches
Mail list logo