Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A457970F for ; Tue, 8 May 2012 13:11:29 +0000 (UTC) Received: (qmail 79501 invoked by uid 500); 8 May 2012 13:11:24 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 79460 invoked by uid 500); 8 May 2012 13:11:24 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 79418 invoked by uid 99); 8 May 2012 13:11:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 13:11:24 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of curtisr7@gmail.com designates 209.85.217.174 as permitted sender) Received: from [209.85.217.174] (HELO mail-lb0-f174.google.com) (209.85.217.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 13:10:22 +0000 Received: by lbbgm6 with SMTP id gm6so6018349lbb.33 for ; Tue, 08 May 2012 06:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=latZZzsUpq0Jd1VC5ebFGUqf4uJ1w7QxFA+bU9QIkXY=; b=rRoe5Ojp5Z8P7DCqAQ39o34GBmYUeimaIOfCZ3u09YL+4LoEKLgJ24ddCvYHgiJHH/ 3HoAEYUVjxT559N5PmvF7SAU+8KQY1vM1S9Xm0PCzjEDcnPzidv1POXlPTcBrzQ1s1ot s8jE7JYUaRmeLzgw/dR3Sd38qR8xA5srMx/6fYCLvkvuQi/gg3t8BpvgR1a2Xl2Ye44g tgMmJYxm8As1Pkdg31+dE+qQ8ma4lg0K0aZ6RxslaAloEi4e73uXv+Qrj8PdjRdGNho3 mfstl47smy1fPR56QmpzfJkCl/QKSz2WgVQn9i/opJtXM6amAcVJgZz8jVXEB+3ipU+F cs9g== MIME-Version: 1.0 Received: by 10.152.105.173 with SMTP id gn13mr3730476lab.20.1336482599426; Tue, 08 May 2012 06:09:59 -0700 (PDT) Received: by 10.112.65.18 with HTTP; Tue, 8 May 2012 06:09:59 -0700 (PDT) In-Reply-To: References: Date: Tue, 8 May 2012 08:09:59 -0500 Message-ID: Subject: Re: Stress tests and configuration From: Rick Curtis To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=f46d040714c5965a3304bf861a06 X-Virus-Checked: Checked by ClamAV on apache.org --f46d040714c5965a3304bf861a06 Content-Type: text/plain; charset=ISO-8859-1 Daniel - Yes, I'd be interested in seeing the full exception. That being said, you're probably safe just turning off the DynamicDataStructs . In our performance testing, we never observed an improvement when that property is enabled. Since we're on the topic of properties, I'd also recommend getting rid of the openjpa.Multithreaded property. Sharing EntityManagers / Entities across multiple threads isn't something that OpenJPA was designed to do. openjpa.Multithreaded was supposed to address that concern, but it did so poorly. There are a number of outstanding JIRAs that document some of the issues... I can dig them up if you'd like? Thanks, Rick On Tue, May 8, 2012 at 1:43 AM, Daniel Persson wrote: > Hi Rick. > > These are the actual stacktraces that you get with log level WARN. I > changed to TRACE and got more information that actually lead me to beleave > that the DynamicDataStructs where the problem. For some reason it could not > handle special types of data. Without DynamicDataStructs it seems to work > at the moment. > > Didn't save the stacktrace but I'm sure I got the null pointer exception on > > 365: BCMethod method = bc.declareMethod(name, type, new Class[]{ int.class > }); > > in DynamicStorageGenerator.java > > It didn't recognize the type supplied. If your interested I could turn the > feature on and get a trace for you. > > Best regards > > Daniel > > On Mon, May 7, 2012 at 3:59 PM, Rick Curtis wrote: > > > 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 > >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. > > > > > > > > > org.apache.openjpa.persistence.RollbackException: null > > > at > > > > > > > > > org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:593) > > > > > > Caused by: > > > 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 > > > > > > > > > xmlns:xsi=" > > > http://www.w3.org/2001/XMLSchema-instance" version="1.0"> > > > > > transaction-type="RESOURCE_LOCAL"> > > > > > java:comp/env/jdbc/userDb > > > > > > ...... > > > > > > > > > > > > > > > > > > > > > > > > > > value="QuotedNumbersInQueries=true,CopyOnDetach=true,cascadeWithDetach=true,superclassDiscriminatorStrategyByDefault=false" > > > /> > > > value="true(CacheSize=1000, > > > SoftReferenceSize=0)"/> > > > > > > > > > > > > > > > > > value="fetch-groups(DetachedStateField=true)"/> > > > > > > > > > > > value="parallel" /> > > > > > > > > > > > > > > > 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* > > > -- *Rick Curtis* --f46d040714c5965a3304bf861a06--