Quantcast

java.lang.NullPointerException on JavaMail-Bridge send attempt

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

java.lang.NullPointerException on JavaMail-Bridge send attempt

TheQL
Hello,

I have multiple messages that reproducably generate such an error, mostly all from the same time frame, that end up in javamail-outbound-error.

2016-07-01 19:59:30.773/xt$javamail/ERROR/com.swiftmq.extension.javamail.outbound.c@354692b1/run, send failed, exception=java.lang.NullPointerException

I have enabled the trace swiftlet but don't see any more useful information about the error.

2016-07-04 15:47:14.625/swiftlet/xt$javamail/com.swiftmq.extension.javamail.outbound.c@33dc874e/run, msg=[ObjectMessageImpl com.swiftmq.jms.ObjectMessageImpl@38bebee
messageIndex = null
.
.
.
2016-07-04 15:47:14.626/swiftlet/xt$javamail/OutboundBridge, name=mail/HeaderTranslations/setHeaders done
2016-07-04 15:47:14.626/swiftlet/xt$javamail/com.swiftmq.extension.javamail.outbound.c@33dc874e/run, mail=javax.mail.internet.MimeMessage@3526a6d8
2016-07-04 15:47:14.626/swiftlet/xt$javamail/com.swiftmq.extension.javamail.outbound.c@33dc874e/run, transport=smtp://swiftmq@localhost
2016-07-04 15:47:15.385/swiftlet/xt$javamail/com.swiftmq.extension.javamail.outbound.c@33dc874e/run, send failed, exception=java.lang.NullPointerException
2016-07-04 15:47:15.385/swiftlet/xt$javamail/OutboundBridge, name=mail/ErrorForwarder, queue=javamail-outbound-error/forward, text=java.lang.NullPointerException, msg=[ObjectMessageImpl com.swiftmq.jms.ObjectMessageImpl@38bebee
messageIndex = null

Is there anything else I can enable to get a more conclusive log of the exception or a stacktrace?

The bridge usually works fine and I am unsure what went wrong with these messages, maybe they are malformed, but the producer builds them all the same way and before and after this incident all messages get sent. As I said, I can reproduce the error with all the message by moving them back to the origin queue or importing them from the filesystem, as I have exported them to analyze them further but without success.

Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NullPointerException on JavaMail-Bridge send attempt

IIT Software
Administrator
Seems to be the content of the ObjectMessage. Can you view it with Explorer? It must contain an ArrayList.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NullPointerException on JavaMail-Bridge send attempt

TheQL
This is how it looks in explorer:
[body text, {content=[B@654e7a8e, content-type=application/octet-stream, filename=statement_2016-06-30.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001025.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001026.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001027.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001028.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001029.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001030.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001031.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001032.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001039.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001049.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001050.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001057.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001058.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001059.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001060.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001061.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001062.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001063.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001064.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001065.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001066.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001067.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001079.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001080.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001081.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001082.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001083.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001084.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001085.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001086.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001093.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001094.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001103.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001104.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001105.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001106.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001117.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001118.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001122.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001180.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001181.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001182.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001183.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001184.pdf}, {content=null, content-type=application/octet-stream, filename=invoice_001185.pdf}, {content=[B@3503498, content-type=application/octet-stream, filename=invoice_001217.pdf}, {content=[B@6ace8db, content-type=application/octet-stream, filename=invoice_001218.pdf}, {content=[B@41eb8549, content-type=application/octet-stream, filename=invoice_001219.pdf}, {content=[B@4d7b9d6e, content-type=application/octet-stream, filename=invoice_001220.pdf}, {content=[B@6e9cc87f, content-type=application/octet-stream, filename=invoice_001223.pdf}, {content=[B@772f4294, content-type=application/octet-stream, filename=invoice_001224.pdf}, {content=[B@3fbc3fad, content-type=application/octet-stream, filename=invoice_001225.pdf}, {content=[B@5ff8978b, content-type=application/octet-stream, filename=invoice_001226.pdf}, {content=[B@39a557e6, content-type=application/octet-stream, filename=invoice_001227.pdf}, {content=[B@162dda9b, content-type=application/octet-stream, filename=invoice_001228.pdf}, {content=[B@1c6b017d, content-type=application/octet-stream, filename=invoice_001229.pdf}, {content=[B@352ec41e, content-type=application/octet-stream, filename=invoice_001230.pdf}, {content=[B@114da8d9, content-type=application/octet-stream, filename=invoice_001231.pdf}, {content=[B@188476f, content-type=application/octet-stream, filename=invoice_001232.pdf}, {content=[B@1a09c932, content-type=application/octet-stream, filename=invoice_001233.pdf}, {content=[B@7877fef8, content-type=application/octet-stream, filename=invoice_001234.pdf}, {content=[B@e048992, content-type=application/octet-stream, filename=invoice_001235.pdf}, {content=[B@4be3d76e, content-type=application/octet-stream, filename=invoice_001236.pdf}, {content=[B@5b549dae, content-type=application/octet-stream, filename=invoice_001237.pdf}, {content=[B@103c395a, content-type=application/octet-stream, filename=invoice_001238.pdf}]

And this is the XML dump of the message:

<?xml version="1.0" encoding="UTF-8"?>

<com.swiftmq.jms.ObjectMessageImpl>
  <readOnly>false</readOnly>
  <messageId>
    <s>ID:/10.12.10.8/-1871826544002654898/5285/0</s>
    <utfLength>0</utfLength>
  </messageId>
  <timeStamp>1467299005378</timeStamp>
  <destination class="com.swiftmq.jms.QueueImpl">
    <queueName>
      <s>export</s>
      <utfLength>0</utfLength>
    </queueName>
  </destination>
  <deliveryMode>2</deliveryMode>
  <redelivered>false</redelivered>
  <expiration>0</expiration>
  <priority>4</priority>
  <deliveryCount>0</deliveryCount>
  <props>
    <map class="tree-map">
      <entry>
        <string>JMS_SWIFTMQ_JAVAMAIL_BRIDGE_NAME</string>
        <com.swiftmq.jms.primitives.__String>
          <value>OutboundBridge, name=queue</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>JMS_SWIFTMQ_JAVAMAIL_ERROR_TEXT</string>
        <com.swiftmq.jms.primitives.__String>
          <value>java.lang.NullPointerException</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>bcc</string>
        <com.swiftmq.jms.primitives.__String>
          <value>mail@example.com</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>from</string>
        <com.swiftmq.jms.primitives.__String>
          <value>Name &lt;mail@example.com&gt;</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>msg_id</string>
        <com.swiftmq.jms.primitives.__String>
          <value>&lt;1a192270-8508-4475-802e-e0a335a2de7a@example.com&gt;</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>subject</string>
        <com.swiftmq.jms.primitives.__String>
          <value>Some subject</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>to</string>
        <com.swiftmq.jms.primitives.__String>
          <value>mail2@example.com,mail3@example.com</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
      <entry>
        <string>x_email_oid</string>
        <com.swiftmq.jms.primitives.__String>
          <value>1a192270-8508-4475-802e-e0a335a2de7a</value>
        </com.swiftmq.jms.primitives.__String>
      </entry>
    </map>
  </props>
  <destQueue>
    <s>export</s>
    <utfLength>0</utfLength>
  </destQueue>
  <bodyReadOnly>false</bodyReadOnly>
  <array>lotsofdata</array>
  <cnt>852258</cnt>
  <useThreadContextCL>false</useThreadContextCL>
</com.swiftmq.jms.ObjectMessageImpl>

I did notice there were a lot of "null" references, but this is only one example, I have >200 with a different number of attachments or even without, all cause the same error. They were produced roughly at the same time by many different producers, hard to imagine they all failed in an identical way for a short period, as they are not running the same version of the software. If there is something wrong with the messages, there must have been another influencing factor at that time.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NullPointerException on JavaMail-Bridge send attempt

IIT Software
Administrator
It's the content=null stuff. That must be a byte array containing the file like this:

{content=[B@3503498, content-type=application/octet-stream, filename=invoice_001217.pdf}

So this is an application error.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NullPointerException on JavaMail-Bridge send attempt

TheQL
I assumed you would say that, but after inspecting times and dates more intensively I have indeed found an application based error that could have caused this. Thanks for your help!
Loading...