The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NullPointerException with ftp and attachments.

SOLVED
Go to solution
Highlighted
Victor_161
Acclaimed Contributor

java.lang.NullPointerException with ftp and attachments.

Hi guys!

We have an OP SD 4.7 with SP 20 running in our company and lately we have found that some Service Calls introduced via e-mail aren't being recorded by the system.

I've dug a little bit and found what i think is an error while archiving the e-mail attachments on the FTP server.

The thing is that nearly all the e-mails received have their attachments with the html of the e-mail body, etc., but the problem doesn't reproduce too often.

I've checked the ftp properties on service desk and their're ok, the ftp communication works.

Here is a bit of the logserver file:
_______________________________________
mié, 11/02/2009 12:23:00 ReturnPath : xxx@mycompany.es
mié, 11/02/2009 12:23:00 Importance : high
mié, 11/02/2009 12:23:00 java.lang.NullPointerException
at com.hp.ftpclient.FtpResponseFactory.supposed_to_be_multi_line(Unknown Source)
at com.hp.ftpclient.FtpResponseFactory.get_response(Unknown Source)
at com.hp.ftpclient.FtpClient.(Unknown Source)
at com.hp.ifc.attachments.ftp.FTP$AttachmentServerFTP.(Unknown Source)
at com.hp.ifc.attachments.ftp.FTP.openAttachmentServer(Unknown Source)
at com.hp.ifc.attachments.AttachmentServer.openAttachmentServer(Unknown Source)
at com.hp.idk.rep.AttachedItem.openAttachmentServer(Unknown Source)
at com.hp.idk.rep.AttachedItem.putFileToAttachmentServer(Unknown Source)
at com.hp.idk.rep.AttachedItem.beforeInsert(Unknown Source)
at com.hp.ifc.wf.AppEntity.saveEdit(Unknown Source)
at com.hp.ifc.wf.AppEntitySet.saveChanges(Unknown Source)
at com.hp.ifc.wf.AppEntity.saveEdit(Unknown Source)
at com.hp.ifc.wf.AppEntity.saveEdit(Unknown Source)
at com.hp.itsm.srv.email.EmailCommandNew.execute(Unknown Source)
at com.hp.itsm.srv.email.AbstractEmailCommand.execute(Unknown Source)
at com.hp.itsm.srv.email.EmailParser.parse(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at com.hp.ifc.net.smtp.AppSmtpRequestHandler.process(Unknown Source)
at com.hp.ifc.net.tcp.AppTcpConnection.processRequest(Unknown Source)
at com.hp.ifc.net.tcp.AppTcpThread.run(Unknown Source)

mié, 11/02/2009 12:23:00 Ended parsing duration: 125 ms
__________________________________________

Hope some of you can help me with this problem.

Thanks in advance.

Victor
4 REPLIES
The Pike
Honored Contributor

Re: java.lang.NullPointerException with ftp and attachments.

Victor,
Check the formatting of the e-mail messages. Service Desk is known to have problems handling formats different from Plain Text.
Victor_161
Acclaimed Contributor

Re: java.lang.NullPointerException with ftp and attachments.

Hi the Pike!

Your point sounds good to me.
Our Outlook 2003 clients send the e-mail as html and plain text (by default both).

Is there any way to tell SD to only process plain text mail and ignore html ones? Or even something cleaner than just throw the exception, without any warning or error message?.

Thanks!.

Víctor.
The Pike
Honored Contributor
Solution

Re: java.lang.NullPointerException with ftp and attachments.

There is no way to configure how Service Desk does inbound e-mail parsing.

"Something cleaner than just throw the exception, without any warning or error message" is a good suggestion for the developers.

As long as messages are sent in Plain Text format Service Desk will process incoming messages correctly.

To work around this, you may want to configure your mail server to relay and force Plain Text format for e-mails sent to Service Desk.
Victor_161
Acclaimed Contributor

Re: java.lang.NullPointerException with ftp and attachments.

Ok The Pike.

I'll walk through that approach and let you know if it works.

Sure that it's a good sugestion for the developers ... meanwhile I guess we only can try to fix it with our "tools".

I still have my doubts, "why doesn't it throw that exception always, instead of very seldom...?, if there's something with the code, i guess it will fail in the same situation over and over again..."

Well, just throwin' that thought out.

Thank you again The Pike.
I'll post some feedback soon.
Bye.

Victor.
//Add this to "OnDomLoad" event