Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1138

OpenJPA InvalidStateException when using MySQL with openjpa.streaming=true

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0-M1, 3.0-M2, 3.0-beta3
    • Fix Version/s: 3.0.0
    • Labels:
      None
    • Environment:
      Ubuntu 8.04, MysQL 5.0.51a-3ubuntu5.8, Apache James 3.0 M2, Java(TM) SE Runtime Environment (build 1.6.0_22-b04), mysql-connector-java-5.0.8-bin.jar

      Description

      I configured James 3.0 on Ubuntu 8.04, using MySQL as storage, with virtual hosts enabled. Sending mail works fine, but whenever I receive a mail, I get the following exception:
      <openjpa-2.0.1-r422266:989424 nonfatal user error>
      org.apache.openjpa.persistence.InvalidStateException

      The error only happends with openjpa.streaming=true in database.properties.

      The full stacktrace:
      jvm 1 | INFO 12:30:17,610 | james.smtpserver | Successfully
      spooled mail Mail1290425417523-1 from *****@googlemail.com on
      209.85.214.43 for [raju@kamijs.com]
      jvm 1 | 53026 James INFO [Camel Thread 7 - Split]
      openjpa.Runtime - Though you are using optimistic transactions,
      OpenJPA is now beginning a datastore transaction because you have
      requested a lock on some data.
      jvm 1 | INFO 12:30:18,204 | james.mailetcontext | Error while storing mail.
      jvm 1 | <openjpa-2.0.1-r422266:989424 nonfatal user error>
      org.apache.openjpa.persistence.InvalidStateException: This operation
      cannot be performed while a Transaction is active.
      jvm 1 | at org.apache.openjpa.kernel.BrokerImpl.close(BrokerImpl.java:4275)
      jvm 1 | at org.apache.openjpa.kernel.DelegatingBroker.close(DelegatingBroker.java:1346)
      jvm 1 | at org.apache.openjpa.persistence.EntityManagerImpl.close(EntityManagerImpl.java:1282)
      jvm 1 | at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
      jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      jvm 1 | at java.lang.reflect.Method.invoke(Method.java:597)
      jvm 1 | at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
      jvm 1 | at $Proxy51.close(Unknown Source)
      jvm 1 | at org.apache.james.mailbox.jpa.JPATransactionalMapper.endRequest(JPATransactionalMapper.java:95)
      jvm 1 | at org.apache.james.mailbox.store.MailboxSessionMapperFactory.endProcessingRequest(MailboxSessionMapperFactory.java:123)
      jvm 1 | at org.apache.james.mailbox.store.StoreMailboxManager.endProcessingRequest(StoreMailboxManager.java:433)
      jvm 1 | at org.apache.james.transport.mailets.SieveMailet.post(SieveMailet.java:155)
      jvm 1 | at org.apache.jsieve.mailet.SieveMailboxMailet.storeMessageInbox(SieveMailboxMailet.java:369)
      jvm 1 | at org.apache.jsieve.mailet.SieveMailboxMailet.sieveMessage(SieveMailboxMailet.java:363)
      jvm 1 | at org.apache.jsieve.mailet.SieveMailboxMailet.storeMail(SieveMailboxMailet.java:330)
      jvm 1 | at org.apache.jsieve.mailet.SieveMailboxMailet.service(SieveMailboxMailet.java:263)
      jvm 1 | at org.apache.james.transport.mailets.LocalDelivery.service(LocalDelivery.java:103)
      jvm 1 | at org.apache.james.mailetcontainer.lib.MailetManagement.service(MailetManagement.java:94)
      jvm 1 | at org.apache.james.mailetcontainer.camel.MailetProcessor.process(MailetProcessor.java:60)
      jvm 1 | at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
      jvm 1 | at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)
      jvm 1 | at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
      jvm 1 | at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      jvm 1 | at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:80)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
      jvm 1 | at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      jvm 1 | at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
      jvm 1 | at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)
      jvm 1 | at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
      jvm 1 | at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.Pipeline.process(Pipeline.java:143)
      jvm 1 | at org.apache.camel.processor.Pipeline.process(Pipeline.java:78)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
      jvm 1 | at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)
      jvm 1 | at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
      jvm 1 | at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
      jvm 1 | at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)
      jvm 1 | at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:515)
      jvm 1 | at org.apache.camel.processor.MulticastProcessor.access$100(MulticastProcessor.java:73)
      jvm 1 | at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:239)
      jvm 1 | at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:231)
      jvm 1 | at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      jvm 1 | at java.lang.Thread.run(Thread.java:662)
      jvm 1 | INFO 12:30:18,209 | james.mailetcontext | Storing mail
      Mail1290425418206-2 in db://maildb/mail/error

        Attachments

          Activity

            People

            • Assignee:
              norman Norman Maurer
              Reporter:
              raju.bitter Raju Bitter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: