11 Replies Latest reply on Jul 11, 2006 4:07 PM by gohip

    Mail Store Error

    sappenin

      So, I have a jbms M5_pre1 running (mostly) fine. I'm using mysql for jbms mail storage, as well as for jms (I know that's not preferable...). I have the correct alias's set in the alias table, and my jms users/roles are correct (I have calendaruser and adminuser roles setup appropriately).

      I can send/receive messages via thunderbird 1.5.0.2, and I can send/receive from the webmail client. However, ONLY if the message contents are either text or some kind of zip file, OR if the binary file is less than 64K.

      If I send, for example, a 70k jpeg image file, the message sends without issue. However, when I try to read the message via pop3, I get this error:

      09:53:15,578 WARN [CmdUSER] pop username set to guest
      09:53:17,609 ERROR [POP3ProtocolInstance] org.jboss.mail.MailException: java.util.zip.ZipException: invalid stored block lengths
      09:53:17,609 ERROR [POP3ProtocolInstance] Handle IO Error
      09:53:17,609 ERROR [STDERR] java.lang.NullPointerException
      09:53:17,609 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:206)
      09:53:17,609 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:97)
      09:53:17,609 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
      09:53:17,609 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      09:53:17,718 INFO [ConnectionHandler] ConnectionHandler finished

      When I try to read the message via the webmail client, the message shows up fine in my inbox, but if I click on the message to view its contents, I get the following error below. Note that if I send a large zip file (binary), or a large text file, I don't have this issue. If I send a small image file (less than 64k), I don't have this issue. In addition, if I save my "large jpeg image" email to a file (.eml), and then paste the textual contents of this .eml file into the webmail client, I can send the message, but it gives the same error below when I try to view the message.

      09:54:11,421 INFO [STDOUT] op = 'getEmailInFolder'
      09:54:11,421 INFO [STDOUT] folder = INBOX
      09:54:11,671 INFO [STDOUT] op = 'getEmailBody'
      09:54:11,671 INFO [STDOUT] id = 7
      09:54:11,671 INFO [STDOUT] op = 'getEmailBody'
      09:54:11,671 INFO [STDOUT] id = 7
      09:54:18,125 INFO [STDOUT] op = 'getEmailBody'
      09:54:18,125 INFO [STDOUT] id = 8
      09:54:19,359 ERROR [STDERR] java.util.zip.ZipException: invalid stored block lengths
      09:54:19,359 ERROR [STDERR] at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140)
      09:54:19,359 ERROR [STDERR] at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      09:54:19,359 ERROR [STDERR] at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
      09:54:19,359 ERROR [STDERR] at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
      09:54:19,406 ERROR [STDERR] at java.io.FilterInputStream.read(FilterInputStream.java:90)
      09:54:19,406 ERROR [STDERR] at org.jboss.mail.util.io.SimpleCopier.copy(SimpleCopier.java:50)
      09:54:19,406 ERROR [STDERR] at org.jboss.mail.userapi.MailSenderImpl.org$jboss$mail$userapi$MailSenderImpl$getMailBody$aop(MailSenderImpl.java:144)
      09:54:19,406 ERROR [STDERR] at org.jboss.mail.userapi.MailSenderImpl$getMailBody_N1063027204338369520.invokeNext(MailSenderImpl$getMailBody_N1063027204338369520.java)
      09:54:19,406 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      09:54:19,406 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
      09:54:19,406 ERROR [STDERR] at org.jboss.mail.userapi.MailSenderImpl$getMailBody_N1063027204338369520.invokeNext(MailSenderImpl$getMailBody_N1063027204338369520.java)
      09:54:19,406 ERROR [STDERR] at org.jboss.mail.userapi.MailSenderImpl.getMailBody(MailSenderImpl.java)
      09:54:19,406 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      09:54:19,406 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      09:54:19,406 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      09:54:19,406 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      09:54:19,406 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      09:54:19,406 ERROR [STDERR] at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
      09:54:19,406 ERROR [STDERR] at $Proxy151.getMailBody(Unknown Source)
      09:54:19,406 ERROR [STDERR] at org.jboss.mail.webmail.WebmailRPCServlet.doPost(WebmailRPCServlet.java:228)
      09:54:19,406 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      09:54:19,406 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:54:19,406 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      09:54:19,406 ERROR [STDERR] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      09:54:19,406 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      09:54:19,406 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      09:54:19,406 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      09:54:19,421 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      09:54:19,421 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      09:54:19,421 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      09:54:19,421 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      09:54:19,421 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      09:54:19,421 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      09:54:19,421 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      09:54:19,421 ERROR [[WebmailRPC]] Servlet.service() for servlet WebmailRPC threw exception
      javax.management.RuntimeMBeanException
      at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
      at $Proxy151.getMailBody(Unknown Source)
      at org.jboss.mail.webmail.WebmailRPCServlet.doPost(WebmailRPCServlet.java:228)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.RuntimeException: java.util.zip.ZipException: invalid stored block lengths
      at org.jboss.mail.userapi.MailSenderImpl.org$jboss$mail$userapi$MailSenderImpl$getMailBody$aop(MailSenderImpl.java:150)
      at org.jboss.mail.userapi.MailSenderImpl$getMailBody_N1063027204338369520.invokeNext(MailSenderImpl$getMailBody_N1063027204338369520.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
      at org.jboss.mail.userapi.MailSenderImpl$getMailBody_N1063027204338369520.invokeNext(MailSenderImpl$getMailBody_N1063027204338369520.java)
      at org.jboss.mail.userapi.MailSenderImpl.getMailBody(MailSenderImpl.java)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      ... 32 more
      Caused by: java.util.zip.ZipException: invalid stored block lengths
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
      at java.io.FilterInputStream.read(FilterInputStream.java:90)
      at org.jboss.mail.util.io.SimpleCopier.copy(SimpleCopier.java:50)
      at org.jboss.mail.userapi.MailSenderImpl.org$jboss$mail$userapi$MailSenderImpl$getMailBody$aop(MailSenderImpl.java:144)
      ... 42 more

        • 1. Re: Mail Store Error
          acoliver

          oh wow. Can you try turning off compression and see what happens?

          • 2. Re: Mail Store Error
            sappenin

            OK,

            Several issues to report once PagedStore compression is turned off.

            1.) Send small (< 64K) Text Message via Thunderbird ==> Send OK. POP3 retreival OK (still get the FLAG mySql error discussed in other posts, but the messages make it through otherwise).

            2.) Send Large (> 64k) Text Message (actually 82k) via Thunderbird ==> Send OK. POP3 retreival Times out with no error given in the console, except:

            17:39:21,812 WARN [CmdUSER] pop username set to guest
            17:39:54,250 WARN [FromElementType] Using non-qualified column reference [deleted -> ([deleted])]
            17:39:54,265 WARN [FromElementType] Using non-qualified column reference [folder -> ([folder_id])]
            17:39:54,281 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
            17:39:54,281 ERROR [JDBCExceptionReporter] Interrupted while requesting permit! Waited 0 ms; - nested throwable: (javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms)
            17:39:54,390 INFO [ConnectionHandler] ConnectionHandler finished.

            If I navigate to the webmail, after having sent this message via thunderbird, I can see the message in my inbox. However, clicking the message produces the following error (in the webmail, not in the JBMS console): Error#1091: XML Parser Failure: Unterminated CDATA section., fualtCode="Client.CouldNotDecod".

            3.) Send Large (> 64k) Binary Image/ MIME Message via Thunderbird ==> Send OK. POP3 retreival Times out with no error given in the JBMS console (same error as #2 given in the webmail gui).

            4.) If I inspect the database id's for the Messagedata table wrt the paged_mail_store tables, the blob/body ids seem to be accurate.

            Any thoughts? I'll look some more into this in the meantime.

            David

            • 3. Re: Mail Store Error
              sappenin

              Just in case it helps, I'm getting this error after about a minute for #2 and #3 above (but this could just be a remnant of my debugger).

              17:47:29,312 ERROR [STDERR] Exception in thread "Thread-32"
              17:47:29,312 ERROR [STDERR] java.lang.RuntimeException: java.net.SocketException: Socket closed
              17:47:29,312 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:222)
              17:47:29,312 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:97)
              17:47:29,312 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
              17:47:29,312 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
              17:47:29,312 ERROR [STDERR] Caused by: java.net.SocketException: Socket closed
              17:47:29,312 ERROR [STDERR] at java.net.SocketInputStream.read(SocketInputStream.java:162)
              17:47:29,312 ERROR [STDERR] at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
              17:47:29,312 ERROR [STDERR] at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
              17:47:29,312 ERROR [STDERR] at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
              17:47:29,312 ERROR [STDERR] at java.io.FilterInputStream.read(FilterInputStream.java:90)
              17:47:29,312 ERROR [STDERR] at org.jboss.mail.AbstractProtocol.readCommand(AbstractProtocol.java:269)
              17:47:29,312 ERROR [STDERR] at org.jboss.mail.pop3.POP3ProtocolInstance.parseRequest(POP3ProtocolInstance.java:171)
              17:47:29,312 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:199)
              17:47:29,312 ERROR [STDERR] ... 3 more

              • 4. Update to Mail Store Error
                sappenin

                Ok, wrt the issue in this post, I've been inspecting the PagedStore code, and one thing that doesn't quite seem right to me is the size of the Page entity's data buffer (i.e., the Page size).

                In org.jboss.mail.store.paged.PagedStore, line 167, Hibernate is used basically get a list of Page entities that are the result of the query a few lines above. If I inspect the result of the call in line 167 (the "pages" list) in my debugger, the "Pages" list contains (as expected) a single element: A Page object.

                Inspecting this Page object, I can see the correct blobId and id. However, the byte array (pointed at by the "data" variable") is only 65535 bytes large. Just to confirm, my eclipse debugger is showing index values from 0 to 65534 (which means that the size is 1 greater than the final index, or 65535 bytes).

                This seem incorrect given that the PagedStore mbean in the jboss-service.xml file specifies that my Page size should be 65536. In addition, it specifies that my CompressBufferSize should be 65536.

                Is it possible that there is a Hibernate/EJB3 Entity Mangaer bug here? I've upgrade to the latest/greatest EJB3 RC6 release, although this release does not make use of the latest EntityManager jar (RC6 still uses EM 3.1Beta7, while the latest is 3.2.0CR1 and beyond).

                Please let me know any thoughts on this issue. This (or something else) is corrupting the MailStore code for Messages that occupy > 1 Page (i.e., > 65536 bytes).

                David

                • 5. Re: Mail Store Error
                  acoliver

                  my bet is that this is a simple transaction bug.

                  • 6. Re: Mail Store Error
                    acoliver

                    oh wait guys... okay this is a few bugs looking like one. I think...

                    First the "life" default is too low for POP when getting large messages (see comment in jboss-service.xml for details) so the connection is closed before you're done downloading.

                    The webamail does not correctly encode XML ATM so any <> in the mail will cause that message.

                    There is a transaction bug that is showing up under load where the header processing message is sent before the blob is completely committed....However AFAICT this resolves itself on redelivery.

                    I'm going to be investigating this MySQL stuff further today. You REALLY should consider running JBMS against PGSQL as it is really better suited (no paged store mess because it has actual large objects).

                    -Andy

                    • 7. Re: Mail Store Error
                      gohip

                      I am also getting an error when trying to send an email from a non-jboss mail server to the JBoss mail server, currently just trying a 100k image attachment, it fails with this error...

                      I did set

                      set-variable = max_message_data=32MB

                      dont think it worked, so then found option for, MySqlAdmin->Startup Variables->Networking->
                      Under Data/Memory size:
                      changed Max. Packet size to 32mb from 1 mb, and Changed net buffer length to 32mb

                      i also checked the InnoDB checkmark, in jboss-service, i set...

                      10000000
                      <!-- block size for messages (should be about your average message size) -->
                      <!-- 4096 -->
                      5000000

                      under both...
                      SMTPProtocol
                      and
                      SMTPSSLProtocol

                      heres the error...

                      Note: as Sappenin stated I also tried these...
                      send text attachment of 93k, failed
                      send no attachment, but body and email is approx 93k, failed
                      send no attachment, but body and email is approx 36k, succeeded
                      send text attachment of 48k, success
                      send text attachment of 69.5k, failed

                      18:03:09,882 INFO [Mail] all headers after loading: Received: from ns1.nameserv
                      er-b.com (ns1.nameserver-b.com 205.147.247.185) by IPDMBG0358ATL2/JBossMail 1.0M
                      5-pre1 (216.122.145.177)
                       with SMTP id 1148335389882909.4752508778888; Mon, 22 May 2006 18:03:09 -
                      0400 (EDT)
                      Received: (qmail 51940 invoked from network); 22 May 2006 21:02:27 -0000
                      Received: from vdsl-130-13-112-40.phnx.qwest.net (HELO happy2kas) (130.13.112.40
                      )
                       by ureasuppliers.com with SMTP; 22 May 2006 21:02:06 -0000
                      Message-ID: <01c301c67de3$815705d0$fb45a8c0@happy2kas>
                      From: "jason glass" <gohip@ichibancomputers.com>
                      To: "jason glass" <jasong@ssl.celleport.com>
                      Subject: test 500 k attachment
                      Date: Mon, 22 May 2006 14:04:53 -0700
                      MIME-Version: 1.0
                      Content-Type: multipart/mixed;
                       boundary="----=_NextPart_000_01BF_01C67DA8.B28C3A70"
                      X-Priority: 3
                      X-MSMail-Priority: Normal
                      X-Mailer: Microsoft Outlook Express 6.00.2800.1506
                      X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
                      
                      18:03:09,898 INFO [AbstractStore] Creating store item
                      18:03:09,991 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 01004
                      18:03:09,991 ERROR [JDBCExceptionReporter] Data truncation: Data too long for co
                      lumn 'data' at row 1
                      18:03:09,991 ERROR [PagedStore] Failed to write. Id: 55 position: 0 offset 0 len
                      gth: 65536. Reason:org.hibernate.exception.GenericJDBCException: could not inser
                      t: [org.jboss.mail.store.paged.Page]
                      18:03:09,991 ERROR [BlobOutputStream] Failed to write to Store:
                      org.jboss.mail.store.StoreException: javax.persistence.PersistenceException: org
                      .hibernate.exception.GenericJDBCException: could not insert: [org.jboss.mail.sto
                      re.paged.Page]
                       at org.jboss.mail.store.paged.PagedStore.org$jboss$mail$store$paged$Page
                      dStore$write$aop(PagedStore.java:287)
                       at org.jboss.mail.store.paged.PagedStore$write_N7611023959546435916.invo
                      keNext(PagedStore$write_N7611023959546435916.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :196)
                       at org.jboss.mail.store.paged.PagedStore$write_N7611023959546435916.invo
                      keNext(PagedStore$write_N7611023959546435916.java)
                       at org.jboss.mail.store.paged.PagedStore.write(PagedStore.java)
                       at org.jboss.mail.store.BlobOutputStream.doWrite(BlobOutputStream.java:9
                      3)
                       at org.jboss.mail.store.BlobOutputStream.flush(BlobOutputStream.java:106
                      )
                       at org.jboss.mail.store.BlobOutputStream.write(BlobOutputStream.java:77)
                      
                       at org.jboss.mail.util.io.CountingOutputStream.write(CountingOutputStrea
                      m.java:57)
                       at org.jboss.mail.util.io.DotUnstuffingCopier.copy(DotUnstuffingCopier.j
                      ava:151)
                       at org.jboss.mail.message.StoredMailBody.org$jboss$mail$message$StoredMa
                      ilBody$read$aop(StoredMailBody.java:141)
                       at org.jboss.mail.message.StoredMailBody$read_8177156378582852439.invoke
                      Next(StoredMailBody$read_8177156378582852439.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :196)
                       at org.jboss.mail.message.StoredMailBody$read_8177156378582852439.invoke
                      Next(StoredMailBody$read_8177156378582852439.java)
                       at org.jboss.mail.message.StoredMailBody.read(StoredMailBody.java)
                       at org.jboss.mail.message.Mail.org$jboss$mail$message$Mail$constructMess
                      age$aop(Mail.java:364)
                       at org.jboss.mail.message.Mail$constructMessage_N1871997485449281316.inv
                      okeNext(Mail$constructMessage_N1871997485449281316.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :196)
                       at org.jboss.mail.message.Mail$constructMessage_N1871997485449281316.inv
                      okeNext(Mail$constructMessage_N1871997485449281316.java)
                       at org.jboss.mail.message.Mail.constructMessage(Mail.java)
                       at org.jboss.mail.message.Mail.<init>(Mail.java:179)
                       at org.jboss.mail.message.Mail.create(Mail.java:454)
                       at org.jboss.mail.smtp.handlers.CmdDATA.org$jboss$mail$smtp$handlers$Cmd
                      DATA$handleRequest$aop(CmdDATA.java:94)
                       at org.jboss.mail.smtp.handlers.CmdDATA$handleRequest_676946318823135186
                      3.invokeNext(CmdDATA$handleRequest_6769463188231351863.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :192)
                       at org.jboss.mail.smtp.handlers.CmdDATA$handleRequest_676946318823135186
                      3.invokeNext(CmdDATA$handleRequest_6769463188231351863.java)
                       at org.jboss.mail.smtp.handlers.CmdDATA.handleRequest(CmdDATA.java)
                       at org.jboss.mail.smtp.handlers.RequireSTARTTLSProxy.handleRequest(Requi
                      reSTARTTLSProxy.java:67)
                       at org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolIn
                      stance.java:177)
                       at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:205
                      )
                       at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:97)
                       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
                      utor.java:743)
                       at java.lang.Thread.run(Thread.java:595)
                      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.Gener
                      icJDBCException: could not insert: [org.jboss.mail.store.paged.Page]
                       at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException
                      (AbstractEntityManagerImpl.java:562)
                       at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityMan
                      agerImpl.java:193)
                       at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(Transact
                      ionScopedEntityManager.java:175)
                       at org.jboss.mail.store.paged.PagedStore.org$jboss$mail$store$paged$Page
                      dStore$write$aop(PagedStore.java:231)
                       ... 36 more
                      Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [org.
                      jboss.mail.store.paged.Page]
                       at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
                      (SQLStateConverter.java:103)
                       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
                      ava:91)
                       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
                      er.java:43)
                       at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(Abstr
                      actReturningDelegate.java:40)
                       at org.hibernate.persister.entity.AbstractEntityPersister.insert(Abstrac
                      tEntityPersister.java:2044)
                       at org.hibernate.persister.entity.AbstractEntityPersister.insert(Abstrac
                      tEntityPersister.java:2481)
                       at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentit
                      yInsertAction.java:47)
                       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
                       at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplic
                      ate(AbstractSaveEventListener.java:290)
                       at org.hibernate.event.def.AbstractSaveEventListener.performSave(Abstrac
                      tSaveEventListener.java:180)
                       at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId
                      (AbstractSaveEventListener.java:108)
                       at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient
                      (DefaultPersistEventListener.java:131)
                       at org.hibernate.event.def.DefaultPersistEventListener.onPersist(Default
                      PersistEventListener.java:87)
                       at org.hibernate.event.def.DefaultPersistEventListener.onPersist(Default
                      PersistEventListener.java:38)
                       at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:617)
                       at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:591)
                       at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:595)
                       at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityMan
                      agerImpl.java:187)
                       ... 38 more
                      Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long fo
                      r column 'data' at row 1
                       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
                       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
                       at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedSt
                      atement.java:1124)
                       at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPrepared
                      Statement.java:676)
                       at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
                      :1166)
                       at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
                      :1082)
                       at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
                      :1067)
                       at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdat
                      e(WrappedPreparedStatement.java:251)
                       at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAn
                      dExtract(IdentityGenerator.java:73)
                       at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(Abstr
                      actReturningDelegate.java:33)
                       ... 52 more
                      18:03:10,085 ERROR [Mail] org.jboss.mail.MailException: java.io.IOException: cla
                      ss org.jboss.mail.store.StoreException:javax.persistence.PersistenceException: o
                      rg.hibernate.exception.GenericJDBCException: could not insert: [org.jboss.mail.s
                      tore.paged.Page]
                      org.jboss.mail.MailException: java.io.IOException: class org.jboss.mail.store.St
                      oreException:javax.persistence.PersistenceException: org.hibernate.exception.Gen
                      ericJDBCException: could not insert: [org.jboss.mail.store.paged.Page]
                       at org.jboss.mail.message.StoredMailBody.org$jboss$mail$message$StoredMa
                      ilBody$read$aop(StoredMailBody.java:146)
                       at org.jboss.mail.message.StoredMailBody$read_8177156378582852439.invoke
                      Next(StoredMailBody$read_8177156378582852439.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :196)
                       at org.jboss.mail.message.StoredMailBody$read_8177156378582852439.invoke
                      Next(StoredMailBody$read_8177156378582852439.java)
                       at org.jboss.mail.message.StoredMailBody.read(StoredMailBody.java)
                       at org.jboss.mail.message.Mail.org$jboss$mail$message$Mail$constructMess
                      age$aop(Mail.java:364)
                       at org.jboss.mail.message.Mail$constructMessage_N1871997485449281316.inv
                      okeNext(Mail$constructMessage_N1871997485449281316.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :196)
                       at org.jboss.mail.message.Mail$constructMessage_N1871997485449281316.inv
                      okeNext(Mail$constructMessage_N1871997485449281316.java)
                       at org.jboss.mail.message.Mail.constructMessage(Mail.java)
                       at org.jboss.mail.message.Mail.<init>(Mail.java:179)
                       at org.jboss.mail.message.Mail.create(Mail.java:454)
                       at org.jboss.mail.smtp.handlers.CmdDATA.org$jboss$mail$smtp$handlers$Cmd
                      DATA$handleRequest$aop(CmdDATA.java:94)
                       at org.jboss.mail.smtp.handlers.CmdDATA$handleRequest_676946318823135186
                      3.invokeNext(CmdDATA$handleRequest_6769463188231351863.java)
                       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
                      :192)
                       at org.jboss.mail.smtp.handlers.CmdDATA$handleRequest_676946318823135186
                      3.invokeNext(CmdDATA$handleRequest_6769463188231351863.java)
                       at org.jboss.mail.smtp.handlers.CmdDATA.handleRequest(CmdDATA.java)
                       at org.jboss.mail.smtp.handlers.RequireSTARTTLSProxy.handleRequest(Requi
                      reSTARTTLSProxy.java:67)
                       at org.jboss.mail.smtp.SMTPProtocolInstance.handleRequest(SMTPProtocolIn
                      stance.java:177)
                       at org.jboss.mail.ConnectionHandler.runSocket(ConnectionHandler.java:205
                      )
                       at org.jboss.mail.ConnectionHandler.run(ConnectionHandler.java:97)
                       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
                      utor.java:743)
                       at java.lang.Thread.run(Thread.java:595)
                      Caused by: java.io.IOException: class org.jboss.mail.store.StoreException:javax.
                      persistence.PersistenceException: org.hibernate.exception.GenericJDBCException:
                      could not insert: [org.jboss.mail.store.paged.Page]
                       at org.jboss.mail.store.BlobOutputStream.doWrite(BlobOutputStream.java:9
                      8)
                       at org.jboss.mail.store.BlobOutputStream.flush(BlobOutputStream.java:106
                      )
                       at org.jboss.mail.store.BlobOutputStream.write(BlobOutputStream.java:77)
                      
                       at org.jboss.mail.util.io.CountingOutputStream.write(CountingOutputStrea
                      m.java:57)
                       at org.jboss.mail.util.io.DotUnstuffingCopier.copy(DotUnstuffingCopier.j
                      ava:151)
                       at org.jboss.mail.message.StoredMailBody.org$jboss$mail$message$StoredMa
                      ilBody$read$aop(StoredMailBody.java:141)
                       ... 25 more
                      18:03:10,132 INFO [ConnectionHandler] ConnectionHandler finished
                      18:03:10,132 ERROR [STDERR] Exception in thread "Thread-109"
                      18:03:10,132 ERROR [STDERR] java.lang.RuntimeException: Error
                      18:03:10,132 ERROR [STDERR] at org.jboss.mail.message.Mail.<init>(Mail.java:
                      185)
                      18:03:10,132 ERROR [STDERR] at org.jboss.mail.message.Mail.create(Mail.java:
                      454)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.smtp.handlers.CmdDATA.org$jbos
                      s$mail$smtp$handlers$CmdDATA$handleRequest$aop(CmdDATA.java:94)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.smtp.handlers.CmdDATA$handleRe
                      quest_6769463188231351863.invokeNext(CmdDATA$handleRequest_6769463188231351863.j
                      ava)
                      18:03:10,148 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(T
                      xPolicy.java:79)
                      18:03:10,148 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.i
                      nvoke(TxInterceptor.java:192)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.smtp.handlers.CmdDATA$handleRe
                      quest_6769463188231351863.invokeNext(CmdDATA$handleRequest_6769463188231351863.j
                      ava)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.smtp.handlers.CmdDATA.handleRe
                      quest(CmdDATA.java)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.smtp.handlers.RequireSTARTTLSP
                      roxy.handleRequest(RequireSTARTTLSProxy.java:67)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.smtp.SMTPProtocolInstance.hand
                      leRequest(SMTPProtocolInstance.java:177)
                      18:03:10,148 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.runSocket(Co
                      nnectionHandler.java:205)
                      18:03:10,163 ERROR [STDERR] at org.jboss.mail.ConnectionHandler.run(Connecti
                      onHandler.java:97)
                      18:03:10,163 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.PooledExecut
                      or$Worker.run(PooledExecutor.java:743)
                      18:03:10,163 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
                      18:03:10,163 ERROR [STDERR] Caused by: org.jboss.mail.MailException: java.io.IOE
                      xception: class org.jboss.mail.store.StoreException:javax.persistence.Persistenc
                      eException: org.hibernate.exception.GenericJDBCException: could not insert: [org
                      .jboss.mail.store.paged.Page]
                      18:03:10,163 ERROR [STDERR] at org.jboss.mail.message.StoredMailBody.org$jbo
                      ss$mail$message$StoredMailBody$read$aop(StoredMailBody.java:146)
                      18:03:10,163 ERROR [STDERR] at org.jboss.mail.message.StoredMailBody$read_81
                      77156378582852439.invokeNext(StoredMailBody$read_8177156378582852439.java)
                      18:03:10,163 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerT
                      x(TxPolicy.java:126)
                      18:03:10,163 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.i
                      nvoke(TxInterceptor.java:196)
                      18:03:10,163 ERROR [STDERR] at org.jboss.mail.message.StoredMailBody$read_81
                      77156378582852439.invokeNext(StoredMailBody$read_8177156378582852439.java)
                      18:03:10,179 ERROR [STDERR] at org.jboss.mail.message.StoredMailBody.read(St
                      oredMailBody.java)
                      18:03:10,179 ERROR [STDERR] at org.jboss.mail.message.Mail.org$jboss$mail$me
                      ssage$Mail$constructMessage$aop(Mail.java:364)
                      18:03:10,179 ERROR [STDERR] at org.jboss.mail.message.Mail$constructMessage_
                      N1871997485449281316.invokeNext(Mail$constructMessage_N1871997485449281316.java)
                      
                      18:03:10,179 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerT
                      x(TxPolicy.java:126)
                      18:03:10,179 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.i
                      nvoke(TxInterceptor.java:196)
                      18:03:10,179 ERROR [STDERR] at org.jboss.mail.message.Mail$constructMessage_
                      N1871997485449281316.invokeNext(Mail$constructMessage_N1871997485449281316.java)
                      
                      18:03:10,179 ERROR [STDERR] at org.jboss.mail.message.Mail.constructMessage(
                      Mail.java)
                      18:03:10,179 ERROR [STDERR] at org.jboss.mail.message.Mail.<init>(Mail.java:
                      179)
                      18:03:10,194 ERROR [STDERR] ... 13 more
                      18:03:10,194 ERROR [STDERR] Caused by: java.io.IOException: class org.jboss.mail
                      .store.StoreException:javax.persistence.PersistenceException: org.hibernate.exce
                      ption.GenericJDBCException: could not insert: [org.jboss.mail.store.paged.Page]
                      18:03:10,194 ERROR [STDERR] at org.jboss.mail.store.BlobOutputStream.doWrite
                      (BlobOutputStream.java:98)
                      18:03:10,194 ERROR [STDERR] at org.jboss.mail.store.BlobOutputStream.flush(B
                      lobOutputStream.java:106)
                      18:03:10,194 ERROR [STDERR] at org.jboss.mail.store.BlobOutputStream.write(B
                      lobOutputStream.java:77)
                      18:03:10,194 ERROR [STDERR] at org.jboss.mail.util.io.CountingOutputStream.w
                      rite(CountingOutputStream.java:57)
                      18:03:10,194 ERROR [STDERR] at org.jboss.mail.util.io.DotUnstuffingCopier.co
                      py(DotUnstuffingCopier.java:151)
                      18:03:10,194 ERROR [STDERR] at org.jboss.mail.message.StoredMailBody.org$jbo
                      ss$mail$message$StoredMailBody$read$aop(StoredMailBody.java:141)
                      18:03:10,194 ERROR [STDERR] ... 25 more
                      18:03:16,569 INFO [Server] Got request
                      18:03:16,569 INFO [Server] waiting for request
                      18:03:16,569 INFO [ConnectionHandler] connected: /130.13.112.40 to: /216.122.14
                      5.177 until: 1148335516569
                      18:03:16,991 WARN [CmdUSER] pop username set to houman
                      18:03:17,741 INFO [ConnectionHandler] ConnectionHandler finished
                      18:03:17,851 INFO [Server] Got request
                      18:03:17,851 INFO [Server] waiting for request
                      18:03:17,851 INFO [ConnectionHandler] connected: /130.13.112.40 to: /216.122.14
                      5.177 until: 1148335517851
                      18:03:18,194 WARN [CmdUSER] pop username set to jasong
                      18:03:19,116 INFO [ConnectionHandler] ConnectionHandler finished


                      • 8. Re: Mail Store Error
                        enazareno

                        Hi,

                        Have your tried using longblob instead of blob?

                        Regards,

                        Elmo

                        • 9. Re: Mail Store Error
                          gohip

                          no, havnt tried, but I think, and andrew, correct me if wrong, that this issue was fixed in m5?

                          • 10. Re: Mail Store Error
                            osterday

                            I'm guessing this was a bug that was fixed. I'm using HEAD from a week ago or so and have no problems with a 2 meg file - I had reported "zip" errors on the user forum with M5 from GUI install. (After that I thought I was using the latest CVS M5 code, but turns out I checked M5 out into a sub directory of the HEAD code I orginally checked out and was using HEAD! Doh!)

                            HEAD is not giving me any problems - I was able to get my older M5 mails working with HEAD by using a script to manually put the entries into the new messagedata_bodyid table. (Those were small emails.)

                            • 11. Re: Mail Store Error
                              gohip

                              thanks osterday...

                              maybe this is why, with m4, I have, and never have, info/data in blob_mail_store, was wondering why it never seemed to get populated, but we are not sending/receiving big emails, so m4, is currently working fine for us...