[
http://issues.apache.org/jira/browse/JAMES-466?page=comments#action_12373783 ]
Norman Maurer commented on JAMES-466:
-------------------------------------
im using mysql 4.1 and db for all repositories. Im not can reproduce it .. its
really strange. I also get this error on a message that was generated by jira:
Return-Path: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 17883 invoked by uid 89); 9 Apr 2006 15:10:46 -0000
Received: from localhost (HELO mail.guden.ath.cx) (127.0.0.1) by guden.ath.cx
with SMTP; 9 Apr 2006 15:10:46 -0000
Return-Path: null
Message-ID: <[EMAIL PROTECTED]>
Von: [EMAIL PROTECTED]
An: [EMAIL PROTECTED]
Betreff: Re:svn commit: r392749 -
/james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java
In-Reply-To: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_4_29805992.1144595411786"
Datum: Sun, 09 Apr 2006 15:06:35 -0000 (17:06 CEST)
X-EXCUBATOR-User: [EMAIL PROTECTED]
X-EXCUBATOR-Domain: spam-box.de
X-EXCUBATOR-Infected: false
X-EXCUBATOR-Processed: Sun Apr 9 17 10 46 2006
X-EXCUBATOR-Signature: 2,443923f6178662854118679
X-EXCUBATOR-Improbability: 1 in 230 chance of being spam
X-EXCUBATOR-Result: Innocent
X-EXCUBATOR-Probability: 0.0000
X-EXCUBATOR-Confidence: 0.6963
X-Evolution-Source: imap://[EMAIL PROTECTED]/
We were unable to deliver the attached message because of an error in the mail
server.
Error message below:
Exception caught while storing mail Container: ;
nested exception is:
java.sql.SQLException: Error while reading binary stream:
java.io.IOException: Pipe not connected
Message details:
Subject: svn commit: r392749 -
/james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java
Sent date: Sun Apr 09 17:06:35 CEST 2006
MAIL FROM: [EMAIL PROTECTED]
RCPT TO: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Size (in bytes): 4821
E-Mail-Nachricht-Anlage (svn commit: r392749 -
/james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java)
Return-Path: null
Received: from hiphopcorner.de ([62.75.159.71]) by mail.guden.ath.cx (JAMES
SMTP Server 2.3-dev) with SMTP ID 469 for <[EMAIL PROTECTED]>; Sun, 9 Apr 2006
17:10:10 +0200 (CEST)
Received: (qmail 20225 invoked from network); 9 Apr 2006 15:06:58 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by
mail.spam-box.de with SMTP; 9 Apr 2006 15:06:58 -0000
Received: (qmail 44124 invoked by uid 500); 9 Apr 2006 15:06:57 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[email protected]>
List-Id: "James Developers List" <server-dev.james.apache.org>
Antwort an: James Developers List <[email protected]>
Delivered-To: mailing list [email protected]
Received: (qmail 44106 invoked by uid 500); 9 Apr 2006 15:06:57 -0000
Received: (qmail 44099 invoked by uid 99); 9 Apr 2006 15:06:57 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by
apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Apr 2006 08:06:57 -0700
X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194)
by apache.org (qpsmtpd/0.29) with SMTP; Sun, 09 Apr 2006 08:06:56 -0700
Received: (qmail 86675 invoked by uid 65534); 9 Apr 2006 15:06:36 -0000
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Betreff: svn commit: r392749 -
/james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java
Datum: Sun, 09 Apr 2006 15:06:35 -0000 (17:06 CEST)
An: [EMAIL PROTECTED]
Von: [EMAIL PROTECTED]
X-Mailer: svnmailer-1.0.7
X-Virus-Checked: Checked by ClamAV on apache.org
X-EXCUBATOR-User: [EMAIL PROTECTED]
X-EXCUBATOR-Domain: spam-box.de
X-EXCUBATOR-Infected: false
X-EXCUBATOR-Processed: Sun Apr 9 17 10 11 2006
X-EXCUBATOR-Signature: 2,443923d3177981439073897
X-EXCUBATOR-Improbability: 1 in 231 chance of being spam
X-EXCUBATOR-Result: Whitelisted
X-EXCUBATOR-Probability: 0.0000
X-EXCUBATOR-Confidence: 0.6966
einfaches Textdokument-Anlage (svn commit:
r392749 -
/james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java)
Author: bago
Date: Sun Apr 9 08:06:34 2006
New Revision: 392749
URL: http://svn.apache.org/viewcvs?rev=392749&view=rev
Log:
Added conservative synchronization to MimeMessageWrapper (JAMES-474)
Hint by Martijn Brinkers
Modified:
james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java
Modified:
james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java
URL:
http://svn.apache.org/viewcvs/james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java?rev=392749&r1=392748&r2=392749&view=diff
==============================================================================
---
james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java
(original)
+++
james/server/trunk/src/java/org/apache/james/core/MimeMessageWrapper.java Sun
Apr 9 08:06:34 2006
@@ -147,8 +147,8 @@
* with data.
* @see MimeMessageSource
*/
- public String getSourceId() {
- return source.getSourceId();
+ public synchronized String getSourceId() {
+ return source != null ? source.getSourceId() : null;
}
/**
@@ -161,16 +161,19 @@
if (headers != null) {
//Another thread has already loaded these headers
return;
- }
- try {
- InputStream in = source.getInputStream();
+ } else if (source != null) {
try {
- headers = createInternetHeaders(in);
- } finally {
- IOUtil.shutdownStream(in);
+ InputStream in = source.getInputStream();
+ try {
+ headers = createInternetHeaders(in);
+ } finally {
+ IOUtil.shutdownStream(in);
+ }
+ } catch (IOException ioe) {
+ throw new MessagingException("Unable to parse headers
from stream: " + ioe.getMessage(), ioe);
}
- } catch (IOException ioe) {
- throw new MessagingException("Unable to parse headers from
stream: " + ioe.getMessage(), ioe);
+ } else {
+ throw new MessagingException("loadHeaders called for a
message with no source, contentStream or stream");
}
}
@@ -205,14 +208,14 @@
*
* @return whether the message has been modified
*/
- public boolean isModified() {
+ public synchronized boolean isModified() {
return headersModified || bodyModified || modified;
}
/**
* Rewritten for optimization purposes
*/
- public void writeTo(OutputStream os) throws IOException,
MessagingException {
+ public synchronized void writeTo(OutputStream os) throws
IOException, MessagingException {
if (!isModified()) {
// We do not want to instantiate the message... just read
from source
// and write to this outputstream
@@ -241,7 +244,7 @@
writeTo(headerOs, bodyOs, new String[0]);
}
- public void writeTo(OutputStream headerOs, OutputStream bodyOs,
String[] ignoreList) throws IOException, MessagingException {
+ public synchronized void writeTo(OutputStream headerOs,
OutputStream bodyOs, String[] ignoreList) throws IOException,
MessagingException {
if (!isModified()) {
//We do not want to instantiate the message... just read
from source
// and write to this outputstream
@@ -391,7 +394,7 @@
}
- private void checkModifyHeaders() throws MessagingException {
+ private synchronized void checkModifyHeaders() throws
MessagingException {
if (headers == null) {
loadHeaders();
}
@@ -442,10 +445,9 @@
}
/**
- * TODO fixme
* @see javax.mail.internet.MimeMessage#parse(java.io.InputStream)
*/
- protected void parse(InputStream is) throws MessagingException {
+ protected synchronized void parse(InputStream is) throws
MessagingException {
// the super implementation calls
// headers = createInternetHeaders(is);
super.parse(is);
@@ -458,7 +460,7 @@
*
* @see
javax.mail.internet.MimeMessage#createInternetHeaders(java.io.InputStream)
*/
- protected InternetHeaders createInternetHeaders(InputStream is)
throws MessagingException {
+ protected synchronized InternetHeaders
createInternetHeaders(InputStream is) throws MessagingException {
// Keep this: skip the headers from the stream
// we could put that code in the else and simple write an
"header" skipping
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> java.sql.SQLException: Error reading from InputStream java.io.IOException in
> current trunk
> ------------------------------------------------------------------------------------------
>
> Key: JAMES-466
> URL: http://issues.apache.org/jira/browse/JAMES-466
> Project: James
> Type: Bug
> Environment: java 1.5, mysql-connector-java-3.0.17-ga-bin.jar
> Reporter: Norman Maurer
> Assignee: Stefano Bagnara
>
> After upgrading to latest trunk i notice this exception about 8 times today:
> 01/04/06 21:52:53 ERROR spoolmanager: Exception in processor <transport>
> javax.mail.MessagingException: Exception caught while storing mail Container:
> ;
> nested exception is:
> java.sql.SQLException: Error reading from InputStream
> java.io.IOException
> at
> org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepository.java:755)
> at
> org.apache.james.mailrepository.JDBCSpoolRepository.store(JDBCSpoolRepository.java:236)
> at
> org.apache.james.transport.mailets.RemoteDelivery.service(RemoteDelivery.java:1001)
> at
> org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:414)
> at
> org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:397)
> at
> org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:306)
> at java.lang.Thread.run(Thread.java:595)
> 01/04/06 21:52:53 ERROR spoolmanager: An error occurred processing
> Mail1143921172623-45 through transport
> 01/04/06 21:52:53 ERROR spoolmanager: Result was error
> Whats the Problem ? Should i upgrade the mysql-connector ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]