Re: Please advise re NullPointerException help

Matt Pryor <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <CABpRBaahpwEJEY7x30dUWfW40=uyhMOpTqhKycXn8v8sxEe6KQ@mail.gmail.com>
Hi Benoit

Thought I'd better let you know that I resolved it. I had copied across the
old (3.01) version of log4j.properties - the logging didn't seem right so I
restored the shipped version and edited it and this NullPointerException
went away.

Thanks for your help.
Matt




On Fri, 10 Jan 2020 at 10:11, Tellier Benoit <[email protected]> wrote:

> Hi Matt,
>
> Can you open a JIRA ticket for this?
>
> Providing your SMTP configuration, as well as the mail triggering this
> issue, along with more smtp logs (and a capture of the SMTP session) can
> help diagnose what is happening.
>
> Regards,
>
> Benoit
>
> On 10/01/2020 00:17, Matt Pryor wrote:
> > Hi again
> >
> > The error I initial reported is still occurring on 3.4:
> >
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | ERROR 17:07:27,705 |
> > org.apache.james.protocols.netty.BasicChannelUpstreamHandler | Unable to
> > process request
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | java.lang.NullPointerException
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.smtpserver.DataLineJamesMessageHookHandler.onLine(DataLineJamesMessageHookHandler.java:141)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:101)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:88)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.SeparatingDataLineFilter.onBodyLine(SeparatingDataLineFilter.java:108)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.SeparatingDataLineFilter.onLine(SeparatingDataLineFilter.java:66)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:101)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:88)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension.onLine(MailSizeEsmtpExtension.java:187)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:101)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:88)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.apache.james.protocols.netty.LineHandlerUpstreamHandler.messageReceived(LineHandlerUpstreamHandler.java:50)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.messageReceived(SimpleChannelUpstreamHandler.java:124)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> > INFO   | jvm 1    | 2020/01/09 17:07:27 | at
> >
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> >
> > Let me know if there's any more information I can provide.
> >
> > Thanks and regards
> > Matt
> >
> >
> > On Thu, 9 Jan 2020 at 12:46, Matt Pryor <
> [email protected]>
> > wrote:
> >
> >> I have solved this problem by removing
> geronimo-javamail_1.4_mail-1.6.jar
> >> from the lib folder.
> >>
> >> Emails sending successfully so far, next issue is I'm seeing this in the
> >> logs:
> >>
> >> Unable to delete blob message file for mail
> >> Mail1578573612314-cf43ae11-0f93-4145-a812-0c5338aee764-to-gmail.com
> >>
> >> Any ideas?
> >>
> >> Thanks
> >> Matt
> >>
> >>
> >> On Thu, 9 Jan 2020 at 12:29, Matt Pryor <
> [email protected]>
> >> wrote:
> >>
> >>> FYI here is the full stack trace of this particular error:
> >>>
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | java.lang.ClassCastException:
> >>> class org.apache.geronimo.javamail.transport.smtp.SMTPTransport cannot
> be
> >>> cast to class com.sun.mail.smtp.SMTPTransport
> >>> (org.apache.geronimo.javamail.transport.smtp.SMTPTransport and
> >>> com.sun.mail.smtp.SMTPTransport are in unnamed module of loader 'app')
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.MailDelivrerToHost.tryDeliveryToHost(MailDelivrerToHost.java:66)
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.MailDelivrer.doDeliver(MailDelivrer.java:126)
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.MailDelivrer.tryDeliver(MailDelivrer.java:108)
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.MailDelivrer.deliver(MailDelivrer.java:77)
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.attemptDelivery(DeliveryRunnable.java:126)
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.processMail(DeliveryRunnable.java:109)
> >>> INFO   | jvm 1    | 2020/01/09 11:48:34 | at
> >>>
> org.apache.james.transport.mailets.remote.delivery.DeliveryRunnable.runStep(DeliveryRunnable.java:96)
> >>>
> >>> Thanks
> >>> Matt
> >>>
> >>>
> >>> On Thu, 9 Jan 2020 at 11:39, Matt Pryor <
> [email protected]>
> >>> wrote:
> >>>
> >>>> Hi Benoit
> >>>>
> >>>> I have upgraded to 3.4 (App / spring version) and now getting the same
> >>>> error and lots of other errors. I have also upgraded the JRE to 11.
> >>>>
> >>>> This one seems to be the most pressing
> >>>>
> >>>> java.lang.ClassCastException: class
> >>>> org.apache.geronimo.javamail.transport.smtp.SMTPTransport cannot be
> cast to
> >>>> class com.sun.mail.smtp.SMTPTransport
> >>>> (org.apache.geronimo.javamail.transport.smtp.SMTPTransport and
> >>>> com.sun.mail.smtp.SMTPTransport are in unnamed module of loader 'app')
> >>>>
> >>>> Looking on github it seems there is a class conflict and I've tried
> >>>> renaming the geronimo jar but no luck:
> >>>>
> >>>> <exclusions>
> >>>> <exclusion>
> >>>> <groupId>org.apache.geronimo.javamail</groupId>
> >>>> <artifactId>geronimo-javamail_1.4_mail</artifactId>
> >>>> </exclusion>
> >>>> </exclusions>
> >>>>
> >>>> Any idea?
> >>>>
> >>>> Thanks
> >>>> Matt
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Thu, 9 Jan 2020 at 10:38, Matt Pryor <
> >>>> [email protected]> wrote:
> >>>>
> >>>>> Hi Benoit, thanks for the reply.
> >>>>>
> >>>>> I am in the process of upgrading to 3.4 and will let you know.
> >>>>> Presumably using the app version and going from 3.01 to 3.4 I can
> just
> >>>>> copy the config files across, recreate mailboxes, and should be good
> to go?
> >>>>>
> >>>>> Thanks
> >>>>> Matt
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Thu, 9 Jan 2020 at 10:08, Tellier Benoit <[email protected]>
> >>>>> wrote:
> >>>>>
> >>>>>> Hello Matt,
> >>>>>>
> >>>>>> Do you still encounter this issue with newer james versions?
> >>>>>>
> >>>>>> Regards,
> >>>>>>
> >>>>>> Benoit
> >>>>>>
> >>>>>> On 09/01/2020 16:59, Matt Pryor wrote:
> >>>>>>> Hi there
> >>>>>>>
> >>>>>>> This is being repeated many times in the logs when attempted to
> >>>>>> deliver
> >>>>>>> email, can anyone suggest anything? We are on James 3.0.1
> >>>>>>>
> >>>>>>> DEBUG 09:54:59,768 | james.smtpserver | Id='152723796' User=''
> >>>>>> Unable to
> >>>>>>> process request
> >>>>>>> java.lang.NullPointerException
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.smtpserver.DataLineJamesMessageHookHandler.onLine(DataLineJamesMessageHookHandler.java:145)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:100)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:83)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.SeparatingDataLineFilter.onBodyLine(SeparatingDataLineFilter.java:111)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.SeparatingDataLineFilter.onLine(SeparatingDataLineFilter.java:69)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:100)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:83)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension.onLine(MailSizeEsmtpExtension.java:191)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:100)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.smtp.core.DataCmdHandler$DataLineFilterWrapper.onLine(DataCmdHandler.java:83)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.apache.james.protocols.netty.LineHandlerUpstreamHandler.messageReceived(LineHandlerUpstreamHandler.java:50)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.messageReceived(SimpleChannelUpstreamHandler.java:124)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
> >>>>>>> at
> >>>>>>>
> >>>>>>
> org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
> >>>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
> Source)
> >>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
> >>>>>>> at java.lang.Thread.run(Unknown Source)
> >>>>>>>
> >>>>>>> Many thanks
> >>>>>>> Matt
> >>>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: [email protected]
> >>>>>> For additional commands, e-mail: [email protected]
> >>>>>>
> >>>>>>
> >>>>>
> >>>>> --
> >>>>> Matt Pryor
> >>>>> Software Developer
> >>>>>
> >>>>> The International Presence Group of Companies
> >>>>> EMAIL: [email protected]
> >>>>> URL: www.International-presence.com
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> Matt Pryor
> >>>> Software Developer
> >>>>
> >>>> The International Presence Group of Companies
> >>>> EMAIL: [email protected]
> >>>> URL: www.International-presence.com
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> Matt Pryor
> >>> Software Developer
> >>>
> >>> The International Presence Group of Companies
> >>> EMAIL: [email protected]
> >>> URL: www.International-presence.com
> >>>
> >>>
> >>>
> >>
> >> --
> >> Matt Pryor
> >> Software Developer
> >>
> >> The International Presence Group of Companies
> >> EMAIL: [email protected]
> >> URL: www.International-presence.com
> >>
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

-- 
Matt Pryor
Software Developer

The International Presence Group of Companies
EMAIL: [email protected]
URL: www.International-presence.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.