Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 16565 invoked from network); 7 Oct 2010 17:21:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Oct 2010 17:21:09 -0000 Received: (qmail 38261 invoked by uid 500); 7 Oct 2010 17:21:08 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 38200 invoked by uid 500); 7 Oct 2010 17:21:08 -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 38192 invoked by uid 99); 7 Oct 2010 17:21:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 17:21:08 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kwsutter@gmail.com designates 209.85.214.46 as permitted sender) Received: from [209.85.214.46] (HELO mail-bw0-f46.google.com) (209.85.214.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 17:20:59 +0000 Received: by bwz11 with SMTP id 11so96191bwz.33 for ; Thu, 07 Oct 2010 10:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=0oMCxPlIi11KQcywXgO2zBCFF6N9NyuIpIjZf4jKjcU=; b=puBgUwZ4BWph+1pkrldONuVMBEVieSpCjx0dhm/aa7JUa/UuMq5ol6EhFM6Z25eB/T tgWquC6RI3bsDEzTgeY+tnL5TFSUG2ZYSbiDZgI8T2JhVsU/40dAf/PxnUCjFIldl1+S Hkr7Ifa4f39RIrTlynJMddggVJj+xj8qAhf3c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=eie0AvyG85fyZ31KyDuyHZtvw50cC+S22CMDajvoxc3FRhRVvPTkZKZbcHXpBUwPIS fV075z0gfgHAN0NGT+/SC9hyB87UAPTWlpNS+TAB9H0gIp/zvPD2u6vO0CfkglGtvktn +O3Mje1acS2xm/s+LMd7eH5bI54mW6+bSQsr8= Received: by 10.204.56.197 with SMTP id z5mr888294bkg.89.1286472039005; Thu, 07 Oct 2010 10:20:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.49.132 with HTTP; Thu, 7 Oct 2010 10:20:18 -0700 (PDT) In-Reply-To: <4CAD5C60.2070601@apache.org> References: <4CAD5C60.2070601@apache.org> From: Kevin Sutter Date: Thu, 7 Oct 2010 12:20:18 -0500 Message-ID: Subject: Re: ClassCastException / org.apache.openjpa.persistence.ArgumentException on heavy processing To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=001636c5b994e5ff1304920a1c80 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5b994e5ff1304920a1c80 Content-Type: text/plain; charset=ISO-8859-1 Yes, please open a JIRA. Thanks much for your testing. At least you have a workaround... But, it can affect your overall performance until this gets resolved... Thanks, Kevin On Thu, Oct 7, 2010 at 12:36 AM, Norman wrote: > Hi Kevin, > > you guess was right. I disabled the cache in persistence.xml via : > > > > After this the problems were gone. After that I changed it to "true" again > (just to double-checked) and was able to reproduce the problem again. > > So smells like a bug. Should I open the jira issue ? > > Bye, > Norman > > > Am 06.10.2010 19:57, schrieb Norman Maurer: > >> Hi Kevin, >> >> I will test it tomorrow when I have access to the server where I saw >> the problem. >> >> I will keep you updated as soon as I have some more info. >> >> Thx, >> Norman >> >> >> 2010/10/6 Kevin Sutter: >> >>> I'm grabbing at straws here, but my first guess is that our caching of >>> prepared SQL queries is hitting a hiccup... To verify this, could you >>> temporarily turn off this cache (it's on by default) via the most >>> convenient >>> method as documented here: >>> >>> >>> http://openjpa.apache.org/builds/2.0.1/apache-openjpa-2.0.1/docs/manual/manual.html#ref_guide_cache_querysql >>> >>> Thanks! >>> Kevin >>> >>> On Wed, Oct 6, 2010 at 7:10 AM, Norman Maurer wrote: >>> >>> Hi there, >>>> >>>> we at JAMES use openjpa 2.0.1 as JPA Provider. Sometimes I see the >>>> following Exception on "heavy processing": >>>> >>>> RROR 13:59:10,182 | james.virtualusertable-store | Failed to get >>>> mapping for te@localhost >>>> >>>> org.apache.openjpa.persistence.ArgumentException: Failed to execute >>>> query "SELECT vut FROM JamesVirtualUserTable vut WHERE (vut.user LIKE >>>> :user OR vut.user='*') and (vut.domain like :domain or vut.domain='*') >>>> ORDER BY vut.domain DESC". Check the query syntax for correctness. See >>>> nested exception for details. >>>> at >>>> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:870) >>>> at >>>> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792) >>>> at >>>> >>>> org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542) >>>> at >>>> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:288) >>>> at >>>> >>>> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302) >>>> at >>>> >>>> org.apache.james.vut.JPAVirtualUserTable.mapAddressInternal(JPAVirtualUserTable.java:83) >>>> at >>>> >>>> org.apache.james.impl.vut.AbstractVirtualUserTable.mapAddress(AbstractVirtualUserTable.java:408) >>>> at >>>> >>>> org.apache.james.impl.vut.AbstractVirtualUserTable.getMappings(AbstractVirtualUserTable.java:108) >>>> at >>>> >>>> org.apache.james.impl.vut.AbstractVirtualUserTable.getMappings(AbstractVirtualUserTable.java:100) >>>> at >>>> >>>> org.apache.james.transport.mailets.VirtualUserTable.processMail(VirtualUserTable.java:89) >>>> at >>>> >>>> org.apache.james.transport.mailets.AbstractVirtualUserTableMailet.service(AbstractVirtualUserTableMailet.java:76) >>>> at >>>> >>>> org.apache.james.mailetcontainer.camel.MailetProcessor.process(MailetProcessor.java:59) >>>> at >>>> >>>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at >>>> >>>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) >>>> at >>>> >>>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) >>>> at >>>> >>>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at >>>> >>>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:290) >>>> at >>>> >>>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:202) >>>> at >>>> >>>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at >>>> >>>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) >>>> at >>>> >>>> org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:72) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at >>>> >>>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) >>>> at >>>> >>>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) >>>> at >>>> >>>> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at >>>> >>>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:290) >>>> at >>>> >>>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:202) >>>> at >>>> >>>> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at org.apache.camel.processor.Pipeline.process(Pipeline.java:143) >>>> at org.apache.camel.processor.Pipeline.process(Pipeline.java:78) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70) >>>> at >>>> >>>> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:290) >>>> at >>>> >>>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:202) >>>> at >>>> >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91) >>>> at >>>> >>>> org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:449) >>>> at >>>> >>>> org.apache.camel.processor.MulticastProcessor.access$100(MulticastProcessor.java:67) >>>> at >>>> >>>> org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:230) >>>> at >>>> >>>> org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:223) >>>> at >>>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) >>>> at java.util.concurrent.FutureTask.run(FutureTask.java:138) >>>> at >>>> >>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >>>> at >>>> >>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>>> at java.lang.Thread.run(Thread.java:619) >>>> Caused by: java.lang.ClassCastException: java.lang.String cannot be >>>> cast to java.lang.Integer >>>> at >>>> >>>> org.apache.openjpa.jdbc.kernel.PreparedSQLStoreQuery$PreparedSQLExecutor.toParameterArray(PreparedSQLStoreQuery.java:157) >>>> at >>>> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:855) >>>> ... 47 more >>>> >>>> Which does not make any sense to me. The Statement is constructed as : >>>> >>>> List virtualUsers = >>>> entityManager.createNamedQuery("selectMappings") >>>> .setParameter("user", user) >>>> .setParameter("domain", domain).getResultList(); >>>> >>>> Any idea what could be wrong ? >>>> >>>> Bye, >>>> Norman >>>> >>>> --------------------------------------------------------------------- >> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org >> For additional commands, e-mail: server-dev-help@james.apache.org >> >> > --001636c5b994e5ff1304920a1c80--