You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Jorge de Lucas y Cadenas <jd...@ctv.es> on 2001/10/27 16:54:11 UTC

Re: 2.0a1

Hi, Christopher, and everyone,

I also had similar problems with the pop server, even
before even trying mysql or sapdb (the former
is the RDBMS I intend to use with James).
It seems that commands "stat" or "list"
provoke a java.lang.ClassCastException: java.lang.String
I posted the following message to james-user:

----------------------------------
Hello,

I am using Linux jdk1.3.1 as my JVM, and the latest
official release of james.
When user mailboxes are  empty, I can succesfully
telnet to port 110, and use the stat and list commands.
But when I have one or two messages in any mailbox, any stat or list
command provokes a java.lang.ClassCastException: java.lang.String
Any help?
Thanks a lot.

Here are the logs from pop3server.log:



ri Oct 26 20:36:53 EDT 2001 [INFO   ] (pop3server): Command received: STAT
Fri Oct 26 20:36:53 EDT 2001 [ERROR  ] (pop3server): Exception during 
connection from localhost.redexterior.com (127.0.0.1) : java.lang.String
java.lang.ClassCastException: java.lang.String
     at org.apache.james.core.MailImpl.getSize(MailImpl.java:141)
     at org.apache.james.pop3server.POP3Handler.doSTAT(POP3Handler.java:247)
     at 
org.apache.james.pop3server.POP3Handler.parseCommand(POP3Handler.java:190)
     at 
org.apache.james.pop3server.POP3Handler.handleConnection(POP3Handler.java:126)
     at 
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(Connection.java:163)
     at 
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:47)
     at 
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:80)
Fri Oct 26 20:38:53 EDT 2001 [ERROR  ] (pop3server): Connection timeout 
on socket
Fri Oct 26 20:39:21 EDT 2001 [INFO   ] (pop3server): Hello Name is: 
athlon.redexterior.com
Fri Oct 26 20:39:21 EDT 2001 [INFO   ] (pop3server): Connection from 
dell (10.1.1.1)
Fri Oct 26 20:39:26 EDT 2001 [INFO   ] (pop3server): Command received: 
user jdeluca
Fri Oct 26 20:39:29 EDT 2001 [INFO   ] (pop3server): Command received: 
pass xxxxxx
Fri Oct 26 20:39:30 EDT 2001 [INFO   ] (pop3server): Command received: list
Fri Oct 26 20:39:30 EDT 2001 [ERROR  ] (pop3server): Exception during 
connection from dell (10.1.1.1) : java.lang.String
java.lang.ClassCastException: java.lang.String
     at org.apache.james.core.MailImpl.getSize(MailImpl.java:141)
     at org.apache.james.pop3server.POP3Handler.doLIST(POP3Handler.java:268)
     at 
org.apache.james.pop3server.POP3Handler.parseCommand(POP3Handler.java:192)
     at 
org.apache.james.pop3server.POP3Handler.handleConnection(POP3Handler.java:126)
     at 
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(Connection.java:163)
     at 
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:47)
     at 
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:80)
Fri Oct 26 20:41:18 EDT 2001 [INFO   ] (pop3server): Hello Name is: 
athlon.redexterior.com
Fri Oct 26 20:41:18 EDT 2001 [INFO   ] (pop3server): Connection from 
localhost.redexterior.com (127.0.0.1)
Fri Oct 26 20:41:18 EDT 2001 [INFO   ] (pop3server): Command received: 
USER jdeluca
Fri Oct 26 20:41:18 EDT 2001 [INFO   ] (pop3server): Command received: 
PASS xxxxx
Fri Oct 26 20:41:19 EDT 2001 [INFO   ] (pop3server): Command received: STAT
Fri Oct 26 20:41:19 EDT 2001 [ERROR  ] (pop3server): Exception during 
connection from localhost.redexterior.com (127.0.0.1) : java.lang.String
java.lang.ClassCastException: java.lang.String
     at org.apache.james.core.MailImpl.getSize(MailImpl.java:141)
     at org.apache.james.pop3server.POP3Handler.doSTAT(POP3Handler.java:247)
     at 
org.apache.james.pop3server.POP3Handler.parseCommand(POP3Handler.java:190)
     at 
org.apache.james.pop3server.POP3Handler.handleConnection(POP3Handler.java:126)
     at 
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(Connection.java:163)
     at 
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:47)
     at 
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:80)
Fri Oct 26 20:41:29 EDT 2001 [ERROR  ] (pop3server): Connection timeout 
on socket








Christopher Burkey wrote:

> Hi Everyone,
> 
>     Trying to use the new version here with mysql. It almost worked 
> except I got this:
> 
> ...
> Started NNTP Server plain:119
> Exception: JVM_recv in socket input stream read (code=10004)
> java.net.SocketException: JVM_recv in socket input stream read (code=10004)
>         at java.net.SocketInputStream.socketRead(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:86)
>         at java.net.SocketInputStream.read(SocketInputStream.java:67)
>         at java.io.InputStreamReader.fill(InputStreamReader.java:173)
>         at java.io.InputStreamReader.read(InputStreamReader.java:249)
>         at java.io.BufferedReader.fill(BufferedReader.java:139)
>         at java.io.BufferedReader.readLine(BufferedReader.java:299)
>         at java.io.BufferedReader.readLine(BufferedReader.java:362)
>         at 
> org.apache.james.remotemanager.RemoteManagerHandler.handleConnection(
> RemoteManagerHandler.java:144)
>         at 
> org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
> Connection.java:163)
>         at 
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
> ecutableRunnable.java:47)
>         at 
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
> .java:80)
> 
>     
> Here is what I did to reproduce this:
> 
> 1. Installed 2.0a1 from the tar file.
> 2. Started it up with run.bat
> 3. Changed the config file to use a mysql database for the inboxes. (see 
> attached)
> 4. Telnet to 4555 and added a user cburkey with a password.
> 5. Sent an email to cburkey@localhost. It accepted the email. I looked 
> in the mysql database and my email is in there. So far so good.
> 7. Tried to check my mail via pop3 and Eudora tells me:
> "Error reading from the network    Cause: Connection closed by foreign 
> host. (0)
> There has been an error transferring your mail: I said:      STAT    and 
> the POP server (cburkey@localhost) said: ERR Error closing connection"   
> 8. So I then tried to use Outlook Express to check the mail. There was 
> no error reported but it also did not download my mail for me.
> 9. So I sent another email into the SMTP server and that is when I got 
> the stack trace pasted above.
> 
> 
> Looks like there is something wrong with the pop3 server. I did not see 
> anything good in the log files. Can someone who has this working send me 
> their config files?
> 
> 
> 
> ________________________________________________
> Christopher Burkey        cburkey@einnovation.com   
> President             513-542-3401
> eInnovation Inc.         http://einnovation.com
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
> 
> config.xml
> 
> Content-Type:
> 
> application/xml
> 
> 
> ------------------------------------------------------------------------
> Part 1.3
> 
> Content-Type:
> 
> text/plain
> 
> 
> ------------------------------------------------------------------------
> Part 1.4
> 
> Content-Type:
> 
> text/plain
> 
> 



-- 

Jorge de Lucas y Cadenas <jd...@attglobal.net>
FreeBSD 4.4-STABLE

PGP Key Fingerprint20 = A21E AD4D C928 50F4 6F33  0D40 2AFD CFC3 5C57 AC03
Diffie-Hellman:
PGP Key Fingerprint20 = 4A7C 54BE 8264 428C 026F  784F 4FE6 3403 C4B1 55AA
GPG Key fingerprint = 65FE 47C3 8C5A 3045 6818  F6B3 111F D35D 33CD 66BB



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


RE: 2.0a1

Posted by Danny Angus <da...@thought.co.uk>.
The bug is fixed in CVS,(as far as I can tell)
the only affected file is /src/java/org/apache/james/core/MailImpl.java

> -----Original Message-----
> From: Jorge de Lucas y Cadenas [mailto:jdelucas@ctv.es]
> Sent: Saturday, October 27, 2001 3:54 PM
> To: james-dev@jakarta.apache.org
> Subject: Re: 2.0a1
> 
> 
> Hi, Christopher, and everyone,
> 
> I also had similar problems with the pop server, even
> before even trying mysql or sapdb (the former
> is the RDBMS I intend to use with James).
> It seems that commands "stat" or "list"
> provoke a java.lang.ClassCastException: java.lang.String
> I posted the following message to james-user:
> 
> ----------------------------------
> Hello,
> 
> I am using Linux jdk1.3.1 as my JVM, and the latest
> official release of james.
> When user mailboxes a <snip>

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