openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Stress tests and configuration
Date Mon, 07 May 2012 13:59:55 GMT
Daniel -

Can you post the entire stacktrace? You've snipped out the important parts.

Thanks,
Rick

On Mon, May 7, 2012 at 3:19 AM, Daniel Persson <mailto.woden@gmail.com>wrote:

> Hi.
>
> I'd used OpenJPA for my projects for a while now and started to use it at
> work.
>
> Our service runs on Tomcat and have a lot of users. So after implementing
> OpenJPA for a few months we are now in the testing phase.
> During the stress test adding a few hundred records using different tomcat
> threads I get the same OpenJPA error over and over.
>
> I've changed the configuration back and forth to resolve the issue.
> Sometimes I get it to work for a while and then it breaks again.
> So I would like to ask what the error could be a result of and if I have
> any obvious configuration faults.
>
> I've written a small test class adding entities using 1000 threads and this
> will generate the errors from time to time.
> The code uses one factory and a lot of managers.
>
> <openjpa-2.1.1-r422266:1148538 fatal store error>
> org.apache.openjpa.persistence.RollbackException: null
>        at
>
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:593)
>
> Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: null
>        at
> org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:2018)
>        at
>
> org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:94)
>        at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1498)
>        at
>
> org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:933)
>        at
>
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:569)
>        ... 27 more
> Caused by: java.lang.NullPointerException
>
>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" version="1.0">
>    <persistence-unit name="userDbPersistence"
> transaction-type="RESOURCE_LOCAL">
>        <non-jta-data-source>java:comp/env/jdbc/userDb</non-jta-data-source>
>
>        <class>......</class>
>
>        <properties>
>            <property name="openjpa.Multithreaded" value="true" />
>            <property name="openjpa.InverseManager" value="true" />
>            <property name="openjpa.DynamicDataStructs" value="true"/>
>            <property name="openjpa.Compatibility"
>
> value="QuotedNumbersInQueries=true,CopyOnDetach=true,cascadeWithDetach=true,superclassDiscriminatorStrategyByDefault=false"
> />
>            <property name="openjpa.DataCache" value="true(CacheSize=1000,
> SoftReferenceSize=0)"/>
>            <property name="openjpa.QueryCache" value="false"/>
>            <property name="openjpa.RemoteCommitProvider" value="sjvm"/>
>            <property name="openjpa.Log" value="DefaultLevel=WARN,
> Runtime=WARN, Tool=WARN, SQL=WARN"/>
>            <property name="openjpa.FetchBatchSize" value="0"/>
>            <property name="openjpa.DetachState"
> value="fetch-groups(DetachedStateField=true)"/>
>            <property name="openjpa.LockTimeout" value="3000"/>
>            <property name="openjpa.jdbc.EagerFetchMode" value="join" />
>            <property name="openjpa.jdbc.SubclassFetchMode"
> value="parallel" />
>        </properties>
>    </persistence-unit>
> </persistence>
>
> Any tips or suggestions are much appreciated. Have tried a lot of different
> configurations. One requirement for the configuration as well is that we
> want to use some sort of caching because this was one of the reason for the
> shift to openJPA.
>
> Best regards
>
> Daniel
>



-- 
*Rick Curtis*

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