You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Kenny Smith <ja...@journalscape.com> on 2003/03/05 17:55:43 UTC

What Causes: IOException: Could not find message

I'm sending a mail through my new james install (moving to a new server 
and trying to get it setup) and I'm getting this on the console where I 
started james:

java.io.IOException: Could not find message
         at 
org.apache.james.mailrepository.MimeMessageJDBCSource.getInputStream(MimeMessageJDBCSource.java:176)
         at 
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:287)
         at 
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:321)
         at 
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:311)
         at 
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepository.java:626)
         at org.apache.james.James.storeMail(James.java:848)


Any idea what causes that?

Kenny


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: What Causes: IOException: Could not find message

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Well, this is my situation... I have potentially two instances of James
> using the same tables for reading/writing.

Hello!  There is no synchronization support in James for multiple instances
against the same repositories.  James uses internal mechanisms to
synchronize consumers.  I would bet that you are seeing a situation where
both spoolers pulled the same message from the spool to process, and the
second one is generating the error.

What you should do, IMO, is configure port forwarding from the old IP to the
new IP.  That would cover both SMTP and POP3.  Two ipchains or iptables
commands, and you'd be without these problems.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: What Causes: IOException: Could not find message

Posted by Kenny Smith <ja...@journalscape.com>.
Hi Noel,

Well, this is my situation... I have potentially two instances of James 
using the same tables for reading/writing.

I'm moving ISPs right so, I've got my original James using the mysql on 
my new server, in addition to the james on my new server using those 
same tables.

I added some debug stuff already and did what you described below with 
adding the query and params to the message so I could see what's going 
on. At this point, I'm hoping the server/dns switch will only be going 
on for another 6 or 7 hours, so I have more pressing things to deal with 
until then. I'm sure it will be just fine once we are back to one James 
accessing the tables.

Thanks for your response! Helpful as always! :)
Kenny

Noel J. Bergman wrote:
> Kenny,
> 
> Never seen that message, but it is concerning that you are seeing it.  The
> IOException could be more descriptive by telling you the message name (key)
> that it was using, but basically it means that it did a query using the
> message name and repository name, and got a bad response from:
> 
>  SELECT message_body FROM ${table} WHERE message_name = ? AND
> repository_name = ?
> 
> you might want to check your database.
> 
> What appears to be happening is that James is being asked to store a message
> that is already in a JDBC store (the spool) into a user inbox.  At the
> particular point where the exception occurs, it is trying to open an input
> stream on the message headers.
> 
> 	--- Noel
> 
> -----Original Message-----
> From: Kenny Smith [mailto:jakarta-james@journalscape.com]
> Sent: Wednesday, March 05, 2003 11:56
> To: james-user@jakarta.apache.org
> Subject: What Causes: IOException: Could not find message
> 
> 
> I'm sending a mail through my new james install (moving to a new server
> and trying to get it setup) and I'm getting this on the console where I
> started james:
> 
> java.io.IOException: Could not find message
>          at
> org.apache.james.mailrepository.MimeMessageJDBCSource.getInputStream(MimeMes
> sageJDBCSource.java:176)
>          at
> org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:287
> )
>          at
> org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:321
> )
>          at
> org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:311
> )
>          at
> org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepository.
> java:626)
>          at org.apache.james.James.storeMail(James.java:848)
> 
> 
> Any idea what causes that?
> 
> Kenny
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: What Causes: IOException: Could not find message

Posted by "Noel J. Bergman" <no...@devtech.com>.
Kenny,

Never seen that message, but it is concerning that you are seeing it.  The
IOException could be more descriptive by telling you the message name (key)
that it was using, but basically it means that it did a query using the
message name and repository name, and got a bad response from:

 SELECT message_body FROM ${table} WHERE message_name = ? AND
repository_name = ?

you might want to check your database.

What appears to be happening is that James is being asked to store a message
that is already in a JDBC store (the spool) into a user inbox.  At the
particular point where the exception occurs, it is trying to open an input
stream on the message headers.

	--- Noel

-----Original Message-----
From: Kenny Smith [mailto:jakarta-james@journalscape.com]
Sent: Wednesday, March 05, 2003 11:56
To: james-user@jakarta.apache.org
Subject: What Causes: IOException: Could not find message


I'm sending a mail through my new james install (moving to a new server
and trying to get it setup) and I'm getting this on the console where I
started james:

java.io.IOException: Could not find message
         at
org.apache.james.mailrepository.MimeMessageJDBCSource.getInputStream(MimeMes
sageJDBCSource.java:176)
         at
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:287
)
         at
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:321
)
         at
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:311
)
         at
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepository.
java:626)
         at org.apache.james.James.storeMail(James.java:848)


Any idea what causes that?

Kenny


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org