Unespected runtime Error when try to send document

三世轮回 提交于 2019-12-24 09:17:08

问题


I have new Lotus Domino Server 8.5.3 FP1 UP1 (Windows 2008 64bit).

I have created an xpages sample copied from help that send mail.

var doc:NotesDocument = database.createDocument();
doc.replaceItemValue("form", "Memo");
doc.replaceItemValue("sendTo", "daniel.recio@slug.es");
doc.replaceItemValue("subject", "hi there!");
doc.replaceItemValue("body", "content here");
doc.send();

But i have Unespected runtime Error

Error while executing JavaScript action expression Script interpreter error, line=6, col=5: [TypeError] Exception occurred calling method NotesDocument.send() null

▼ Stack Trace javax.faces.FacesException: Error while executing JavaScript action expression com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:102) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96) com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250)

I have full uninstalled this server, and reinstall with same error.

In other testing server works, but in this server my lotus designer was 8.5.2 + Ext Lib and now is 8.5.3 FP1 UP1.

can you help me??

Thanks for all


回答1:


The error is likely because the server is unable to actually send the message. Server side, when the server can not route the message, it causes an exception. Make sure your server can successfully route mail messages on its own, then your error will likely go away.




回答2:


Check the ACL and make sure that you (or anonymous if you are testing as anonymous) have access to create documents. My guess is that this is what causes NotesDocument to be null.

Also, have a look at the /domino/workspace/logs/error-log-0.xml file located in the Domino data directory for additional explanation of the error.




回答3:


I would remove the type cast on the first line and try it again. I've seen issues before where the cast causes problems. So, your code should look like this:

 var doc = database.createDocument();
 doc.replaceItemValue("form", "Memo");
 doc.replaceItemValue("sendTo", "daniel.recio@slug.es");
 doc.replaceItemValue("subject", "hi there!");
 doc.replaceItemValue("body", "content here");
 doc.send();



回答4:


I have the exact same code running in my app except I used appendItemValue instead of replaceItemValue and it works fine. I am on 8.5.3 FP1 UP1 also. Not sure what the difference internally would be but it is something to try.




回答5:


Is the code is working ob your local machine (if you open a local replica in your browser)?

Perhaps the server document is corrupted: Try recreate it. This fixed the same issue for one of my customers. Another idea is to recreate the default view in the Database.

EDIT:
And could you please check the Stacktrace? The last block contains perhaps more informations. There should be some lines like these:

    lotus.domino.local.Document.Nsend(Native Method)
    lotus.domino.local.Document.send(Unknown Source)

Please post the NotesException above these lines.



来源:https://stackoverflow.com/questions/10930351/unespected-runtime-error-when-try-to-send-document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!