我们正在使用Lucee和S3,在我们的开发和测试中,我们没有遇到任何问题。我们现在已经将该代码实时上线了,并且遇到了很多错误。看起来像这样:
在OnError的application.cfc中,我有一段代码通常会向我发送一些详细信息的电子邮件
<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>
但是它正在发送此消息
我正在使用这个:
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");
尝试写入日志文件。但是即使那样我也没有任何信息。日志包含:
"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"":""""}
在对NullPointerException错误进行了大量的搜索之后,我只能发现它似乎是一种“全部捕获”错误。
在这一点上,我无法证明它与S3交互/通信有关(因为我什至无法获得发生错误的行号),我确信这是相关的。
我有人向我发送此错误:
其他人报告说他们遇到了有关cfdirectory的错误,这本来应该是:
if(!directoryExists(arguments.dirName)){
directoryCreate(arguments.dirName);
// cfdirectory(action="create", directory="#arguments.dirName#", mode="775");
}
我希望其他人已经使用了Lucee的S3功能并获得了相似的结果,并且可以为我指明正确的方向。
根据Ageax的建议,我在发件人中添加了一封收件电子邮件,但没有更多信息。