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 Marco Tedone <mt...@jemos.org> on 2003/10/12 22:09:22 UTC

Usual encoding problem + size limit.

Noel, just to let you know that I'm still receiving the following exception
also with 2.2.0a13 sometime:

java.io.IOException: Error in encoded stream, got 1
        at
com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java
:148)
        at
com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:5
3)
        at
com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:7
8)
        at java.io.FilterInputStream.read(FilterInputStream.java:90)
        at
org.apache.james.core.MimeMessageWrapper.copyStream(MimeMessageWrappe
r.java:798)
        at
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.j
ava:414)
        at
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.j
ava:311)
        at
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepo
sitory.java:761)
        at org.apache.james.James.storeMail(James.java:860)

<!-- BLA.....BLA   -->

Time ago I also sent an email related to a problem with my email size. For
email larger that circa 1M I obtained an error which stated that the email
was larger than 1048756, even if I specified no size limit in the
configuration file. I asked if this was a problem related to MySQL (maybe
the driver) or to James, but I didn't receive any answer. Could you please
illuminate me on this?

Good night,

Marco




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


Re: Usual encoding problem + size limit.

Posted by Marco Tedone <mt...@jemos.org>.
As I said, Serge, thanks to Noel I solved the problem. I had to set the
max-allowed-packet variable in the .ini file.

Thanks,

Marco
----- Original Message ----- 
From: "Serge Knystautas" <se...@lokitech.com>
To: "James Users List" <se...@james.apache.org>
Sent: Tuesday, October 14, 2003 12:30 AM
Subject: Re: Usual encoding problem + size limit.


> Marco Tedone wrote:
> > Serge, thank you for your reply. I deleted the specification of the
maximum
> > packet allowed, I also upgraded the jdbc connector for MySQL to
3.0.6-stable
> > but I get the following exception:
> >
> > java.sql.SQLException: Communication link failure:
> > com.mysql.jdbc.PacketTooBigEx
> > ception
> >         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:882)
> >         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
> >         at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
> >         at
> > com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1276)
> >
> >         at
> > org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepo
> > sitory.java:792)
> > <!-- BLA...BLA -->
>
> Marco,
>
> You're now getting a specific MySQL JDBC driver exception, so I would
> bet it's either the driver or something in MySQL.  Unfortunately I'm not
> a MySQL expert, but maybe that community can give you some insights on
> that exception.
>
> -- 
> Serge Knystautas
> President
> Lokitech >>> software . strategy . design >> http://www.lokitech.com
> p. 301.656.5501
> e. sergek@lokitech.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>




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


Re: Usual encoding problem + size limit.

Posted by Serge Knystautas <se...@lokitech.com>.
Marco Tedone wrote:
> Serge, thank you for your reply. I deleted the specification of the maximum
> packet allowed, I also upgraded the jdbc connector for MySQL to 3.0.6-stable
> but I get the following exception:
> 
> java.sql.SQLException: Communication link failure:
> com.mysql.jdbc.PacketTooBigEx
> ception
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:882)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
>         at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
>         at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1276)
> 
>         at
> org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepo
> sitory.java:792)
> <!-- BLA...BLA -->

Marco,

You're now getting a specific MySQL JDBC driver exception, so I would 
bet it's either the driver or something in MySQL.  Unfortunately I'm not 
a MySQL expert, but maybe that community can give you some insights on 
that exception.

-- 
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com


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


Re: Usual encoding problem + size limit.

Posted by Marco Tedone <mt...@jemos.org>.
Thank you Noel, I solved the problem.

Marco
----- Original Message ----- 
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <se...@james.apache.org>
Sent: Tuesday, October 14, 2003 7:18 AM
Subject: RE: Usual encoding problem + size limit.


> > I get the following exception:
> > java.sql.SQLException: Communication link failure:
> > com.mysql.jdbc.PacketTooBigException
>
> This has to do with how you configure the database server.
>
> See: http://james.apache.org/FAQ.html#16.  See also the MySQL
documentation
> for max_allowed_packet.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>




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


RE: Usual encoding problem + size limit.

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I get the following exception:
> java.sql.SQLException: Communication link failure:
> com.mysql.jdbc.PacketTooBigException

This has to do with how you configure the database server.

See: http://james.apache.org/FAQ.html#16.  See also the MySQL documentation
for max_allowed_packet.

	--- Noel


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


Re: Usual encoding problem + size limit.

Posted by Marco Tedone <mt...@jemos.org>.
Serge, thank you for your reply. I deleted the specification of the maximum
packet allowed, I also upgraded the jdbc connector for MySQL to 3.0.6-stable
but I get the following exception:

java.sql.SQLException: Communication link failure:
com.mysql.jdbc.PacketTooBigEx
ception
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:882)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
        at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1276)

        at
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepo
sitory.java:792)
<!-- BLA...BLA -->

Here follows the piece of config.xml related to the <smtpserver> element:

<!--  This sets the maximum allowed message size (in kilobytes) for this -->
         <!--  SMTP service. If unspecified, the value defaults to 0, which
means no limit. -->
         <maxmessagesize></maxmessagesize>

I experienced the same problem also with 0, or big numbers (i.e.
9999999999), but I obtained nothing. If you think this is a MySQL problem,
please let me know, and I'll search the reply somewhere else.

Thanks,

Marco
----- Original Message ----- 
From: "Serge Knystautas" <se...@lokitech.com>
To: "James Users List" <se...@james.apache.org>
Sent: Sunday, October 12, 2003 9:31 PM
Subject: Re: Usual encoding problem + size limit.


> Marco Tedone wrote:
> > Noel, just to let you know that I'm still receiving the following
exception
> > also with 2.2.0a13 sometime:
> >
> > java.io.IOException: Error in encoded stream, got 1
> >         at
> > com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java
> > :148)
> >         at
> > <!-- BLA.....BLA   -->
> >
> > Time ago I also sent an email related to a problem with my email size.
For
> > email larger that circa 1M I obtained an error which stated that the
email
> > was larger than 1048756, even if I specified no size limit in the
> > configuration file. I asked if this was a problem related to MySQL
(maybe
> > the driver) or to James, but I didn't receive any answer. Could you
please
> > illuminate me on this?
>
> The exception looks most like a bad mime message.  A brief bit of info
> on the MySQL limitation is here: http://james.apache.org/FAQ.html#16.
> If you are getting an error message stating the email was larger than
> the 1 meg limit, double check you are editing the right limit in the
> conf file.  Maybe try setting it to a different limit as it might be
> interpretting your "no size limit" as invalid and using a 1 meg default.
>
> -- 
> Serge Knystautas
> President
> Lokitech >>> software . strategy . design >> http://www.lokitech.com
> p. 301.656.5501
> e. sergek@lokitech.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>




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


Re: Usual encoding problem + size limit.

Posted by Serge Knystautas <se...@lokitech.com>.
Marco Tedone wrote:
> Noel, just to let you know that I'm still receiving the following exception
> also with 2.2.0a13 sometime:
> 
> java.io.IOException: Error in encoded stream, got 1
>         at
> com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java
> :148)
>         at
> <!-- BLA.....BLA   -->
> 
> Time ago I also sent an email related to a problem with my email size. For
> email larger that circa 1M I obtained an error which stated that the email
> was larger than 1048756, even if I specified no size limit in the
> configuration file. I asked if this was a problem related to MySQL (maybe
> the driver) or to James, but I didn't receive any answer. Could you please
> illuminate me on this?

The exception looks most like a bad mime message.  A brief bit of info 
on the MySQL limitation is here: http://james.apache.org/FAQ.html#16. 
If you are getting an error message stating the email was larger than 
the 1 meg limit, double check you are editing the right limit in the 
conf file.  Maybe try setting it to a different limit as it might be 
interpretting your "no size limit" as invalid and using a 1 meg default.

-- 
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com


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


RE: Usual encoding problem + size limit.

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

As Serge said, the exception appears to be an encoding problem.  I would
have liked to have seen the <!-- BLA....BLA -->, since you chopped off the
part that (hopefully) would have told us who was calling storeMail.

One thing that we still need to do is audit where we are allowing JavaMail
to parse messages.  We need to do that in some situations, which could
result in an exception; in other situations, we'd really be better off
preserving the blind nature of the stream.

> For email larger that circa 1M I obtained an error which stated that the
email
> was larger than 1048756, even if I specified no size limit in the
> configuration file.

As Serge said, you probably need to configure the database.

	--- Noel


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