S3 NullPointerException with no further error info

We are using Lucee and S3 and in our development and testing we had no problems. We have now moved this code live and are getting a lot of errors.That look like this :

In the application.cfc in OnError I have a chuck of code that will usually send me an email with some detail

<tr><td>Error message</td><td>#Exception.message#</td></tr>
								<tr valign="top"><td>Context</td><td>
										<cftry>
											line : #Exception.TagContext[1].line#<br><br>
											template : #Exception.TagContext[1].template#<br><br>
											error : #Exception.TagContext[1].codePrintHTML#<br>
											<cfcatch type="any">
												have to figure it out yourself<br>
											</cfcatch>
										</cftry>
								</td></tr>

But it is sending this
image

I am using this

savecontent variable="logEntry"{
					writeOutput(chr(13)&chr(10)&serializeJSON(arguments.Exception)&chr(13)&chr(10))
		
					writeOutput('---------------------------'&chr(13)&chr(10))
				}


				writeLog(type="Error"
				,	text=logEntry
				,	file="SystemErrors");

to try and write to a log file. but even that is geving me no information. Log contains :

"ERROR","ajp-nio-8009-exec-8","09/12/2018","13:33:15","","
{""Extended_Info"":"""",""Message"":""java.lang.NullPointerException"",""Cause"":{""Extended_Info"":"""",""Message"":""java.lang.NullPointerException"",""Detail"":"""",""additional"":{},""TagContext"":[],""ErrorCode"":""0"",""type"":""java.lang.NullPointerException"",""StackTrace"":""lucee.runtime.exp.NativeException: java.lang.NullPointerException\r\nCaused by: java.lang.NullPointerException\r\n"",""ExtendedInfo"":""""},""Detail"":"""",""additional"":{},""TagContext"":[],""ErrorCode"":""0"",""name"":""onRequest"",""type"":""java.lang.NullPointerException"",""StackTrace"":""lucee.runtime.exp.NativeException: java.lang.NullPointerException\r\nCaused by: java.lang.NullPointerException\r\n"",""rootCause"":{""Extended_Info"":"""",""Message"":""java.lang.NullPointerException"",""Detail"":"""",""additional"":{},""TagContext"":[],""ErrorCode"":""0"",""type"":""java.lang.NullPointerException"",""StackTrace"":""lucee.runtime.exp.NativeException: java.lang.NullPointerException\r\nCaused by: java.lang.NullPointerException\r\n"",""ExtendedInfo"":""""},""ExtendedInfo"":""""}

After doing a LOT of googling about the NullPointerException error, all I can find out is that it seems to be a kind of “catch all” error.

At this point I can’t prove that it is related to the S3 interaction/communication (because I can’t even get a line number for where the error is occurring) I feel pretty sure it is related.
I had someone send me this error : (BTW the directory DOES exist on S3)


And someone else report they got an error about cfdirectory which would have had to have been :

		if(!directoryExists(arguments.dirName)){
			directoryCreate(arguments.dirName);
			// cfdirectory(action="create", directory="#arguments.dirName#", mode="775");
		}

I am hoping that someone else has used Lucee’s S3 functionality and has had similar results and can point me in the right direction.

Someone on StackOverflow suggested that the connection is being dropped. What is the best way to test for that?

NOTE: I have just updated the S3 Resource Extention to 0.9.4.119 in the Lucee admin. Hopefully, that will have a positive effect.

Not to get my hopes up too high but…

After upgrading the S3 Resource extention from 0.9.04.117 snapshot (or something similar) to 0.9.4.117 the null pointer errors have gone from over 100 an hr to 0 in the last hr.

Sadly I think I spoke too soon.

Even putting an email in the catch doesn’t give me anything new.


Not much of a Stack Trace

Exactly the same issue happening to me as of today, on any buckets, in this case using fileUpload (directory already exists so directoryCreate not necessary).

I use a single function for my S3 uploads, and the code that hasn’t changed for months, during which time it’s been happily uploading to S3, then this ‘half error’!

Using latest Lucee Release (5.3.2.77) and S3 resource extension (0.9.4.119) - neither of these has been updated recently

…and a restart of Lucee seems to have fixed it?!

This may be related?
https://luceeserver.atlassian.net/browse/LDEV-2278
Upgrading to 5.3.3.60-RC has fixed this for us.