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 Danny Angus <da...@thought.co.uk> on 2001/11/29 18:25:39 UTC

Bug.. or bad configuration..

I dont know why this has started happening, but POP3 is playing up, I cant
RETR I get this..

Thu Nov 29 17:23:55 GMT 2001 [INFO   ] (pop3server): Command received: list
Thu Nov 29 17:23:58 GMT 2001 [INFO   ] (pop3server): Command received: retr
4
Thu Nov 29 17:23:58 GMT 2001 [ERROR  ] (pop3server): Exception during
connection from dexter.killerbees.co.uk (192.168.0.2) : null
java.lang.NullPointerException
	at
org.apache.james.util.SchedulerNotifyOutputStream.write(SchedulerNotifyOutpu
tStream.java:38)
	at
org.apache.james.core.MimeMessageWrapper.writeTo(MimeMessageWrapper.java:150
)
	at org.apache.james.core.MailImpl.writeMessageTo(MailImpl.java:202)
	at org.apache.james.pop3server.POP3Handler.doRETR(POP3Handler.java:407)
	at
org.apache.james.pop3server.POP3Handler.parseCommand(POP3Handler.java:212)
	at
org.apache.james.pop3server.POP3Handler.handleConnection(POP3Handler.java:13
6)
	at
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(Connect
ion.java:163)



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Bug.. or bad configuration..

Posted by Danny Angus <da...@thought.co.uk>.
Yes it does, once I actually managed to get it out of cvs (grr...)

d.

> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: Thursday, November 29, 2001 8:12 PM
> To: James Developers List
> Subject: Re: Bug.. or bad configuration..
>
>
> Alright, it is a mundane detail (and a good reason to not do this.field =
> field).  The constructor passes an OutputStream, but named it
> 'in'.  Then in
> the constructor it does this.out = out, which of course is legitimate
> (although pointless).  I committed the fix to the typo... hopefully should
> work for you now.
>
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Danny Angus" <da...@thought.co.uk>
> To: "James Developers List" <ja...@jakarta.apache.org>
> Sent: Thursday, November 29, 2001 1:42 PM
> Subject: RE: Bug.. or bad configuration..
>
>
> >
> >
> > > -----Original Message-----
> > > From: Serge Knystautas [mailto:sergek@lokitech.com]
> > > Sent: Thursday, November 29, 2001 6:21 PM
> > > To: James Developers List
> > > Subject: Re: Bug.. or bad configuration..
> > >
> > >
> > > I added this a few nights ago so users can download large
> emails.  This
> > > output stream will notify the scheduler every time 20k has been sent.
> For
> > > instance, say you have a user who's on a 28.8kbps line downloading a
> large
> > > message... without this the POP3 handler will time them out
> > > before it could
> > > be received and the next POP3 command sent.
> > >
> > > I thought it was working for me but I guess I only tested it
> on the SMTP
> > > handler side.  Probably some mundane detail. Sorry about this.  :(
> >
> > I saw you'd added it, and the SMTP bit works, I'll look at it seeing I'm
> > there already.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Bug.. or bad configuration..

Posted by Serge Knystautas <se...@lokitech.com>.
Alright, it is a mundane detail (and a good reason to not do this.field =
field).  The constructor passes an OutputStream, but named it 'in'.  Then in
the constructor it does this.out = out, which of course is legitimate
(although pointless).  I committed the fix to the typo... hopefully should
work for you now.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Danny Angus" <da...@thought.co.uk>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Thursday, November 29, 2001 1:42 PM
Subject: RE: Bug.. or bad configuration..


>
>
> > -----Original Message-----
> > From: Serge Knystautas [mailto:sergek@lokitech.com]
> > Sent: Thursday, November 29, 2001 6:21 PM
> > To: James Developers List
> > Subject: Re: Bug.. or bad configuration..
> >
> >
> > I added this a few nights ago so users can download large emails.  This
> > output stream will notify the scheduler every time 20k has been sent.
For
> > instance, say you have a user who's on a 28.8kbps line downloading a
large
> > message... without this the POP3 handler will time them out
> > before it could
> > be received and the next POP3 command sent.
> >
> > I thought it was working for me but I guess I only tested it on the SMTP
> > handler side.  Probably some mundane detail. Sorry about this.  :(
>
> I saw you'd added it, and the SMTP bit works, I'll look at it seeing I'm
> there already.
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Bug.. or bad configuration..

Posted by Danny Angus <da...@thought.co.uk>.

> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: Thursday, November 29, 2001 6:21 PM
> To: James Developers List
> Subject: Re: Bug.. or bad configuration..
>
>
> I added this a few nights ago so users can download large emails.  This
> output stream will notify the scheduler every time 20k has been sent.  For
> instance, say you have a user who's on a 28.8kbps line downloading a large
> message... without this the POP3 handler will time them out
> before it could
> be received and the next POP3 command sent.
>
> I thought it was working for me but I guess I only tested it on the SMTP
> handler side.  Probably some mundane detail. Sorry about this.  :(

I saw you'd added it, and the SMTP bit works, I'll look at it seeing I'm
there already.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Bug.. or bad configuration..

Posted by Serge Knystautas <se...@lokitech.com>.
I added this a few nights ago so users can download large emails.  This
output stream will notify the scheduler every time 20k has been sent.  For
instance, say you have a user who's on a 28.8kbps line downloading a large
message... without this the POP3 handler will time them out before it could
be received and the next POP3 command sent.

I thought it was working for me but I guess I only tested it on the SMTP
handler side.  Probably some mundane detail. Sorry about this.  :(

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Danny Angus" <da...@thought.co.uk>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Thursday, November 29, 2001 12:33 PM
Subject: RE: Bug.. or bad configuration..


> Found it this diff show the code I commented out to "fix" it
> I'm not really sure what SchedulerNotifyOutputStream does .. (yet)
>
>
> cvs -z9 diff -u POP3Handler.java
> Index: POP3Handler.java
> ===================================================================
> RCS file:
>
/home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.jav
> a,v
> retrieving revision 1.2
> diff -u -r1.2 POP3Handler.java
> --- POP3Handler.java 2001/11/26 03:27:29 1.2
> +++ POP3Handler.java 2001/11/29 17:11:38
> @@ -401,10 +401,11 @@
>                  MailImpl mc = (MailImpl) userMailbox.elementAt(num);
>                  if (mc != DELETED) {
>                      out.println(OK_RESPONSE + " Message follows");
> -                    SchedulerNotifyOutputStream nouts =
> -                            new SchedulerNotifyOutputStream(outs,
> scheduler,
> -                            this.toString(), lengthReset);
> -                    mc.writeMessageTo(nouts);
> +//                    SchedulerNotifyOutputStream nouts =
> +//                            new SchedulerNotifyOutputStream(outs,
> scheduler,
> +//                            this.toString(), lengthReset);
> +//                    mc.writeMessageTo(nouts);
> +                    mc.writeMessageTo(outs);
>                      out.println();
>                      out.println(".");
>                  } else {



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Bug.. or bad configuration..

Posted by Danny Angus <da...@thought.co.uk>.
Found it this diff show the code I commented out to "fix" it
I'm not really sure what SchedulerNotifyOutputStream does .. (yet)


cvs -z9 diff -u POP3Handler.java
Index: POP3Handler.java
===================================================================
RCS file:
/home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.jav
a,v
retrieving revision 1.2
diff -u -r1.2 POP3Handler.java
--- POP3Handler.java	2001/11/26 03:27:29	1.2
+++ POP3Handler.java	2001/11/29 17:11:38
@@ -401,10 +401,11 @@
                 MailImpl mc = (MailImpl) userMailbox.elementAt(num);
                 if (mc != DELETED) {
                     out.println(OK_RESPONSE + " Message follows");
-                    SchedulerNotifyOutputStream nouts =
-                            new SchedulerNotifyOutputStream(outs,
scheduler,
-                            this.toString(), lengthReset);
-                    mc.writeMessageTo(nouts);
+//                    SchedulerNotifyOutputStream nouts =
+//                            new SchedulerNotifyOutputStream(outs,
scheduler,
+//                            this.toString(), lengthReset);
+//                    mc.writeMessageTo(nouts);
+                    mc.writeMessageTo(outs);
                     out.println();
                     out.println(".");
                 } else {


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>