I have Domino Server (9.0.1 FP2 HF384) with ExtLib (9.0.1.v00_12_20150311-1316) and OpenNTF Domino API (2.0.0.201510032142) running as OSGI plugins. I try a simple code:
Database db = Factory.getSession().getCurrentDatabase();
System.out.println(db.getApiPath());
for (View view : db.getViews()) {
System.out.println(view.getName());
}
When code runs for the first time (after HTTP task started) i'm getting an error stack (lower) and correct result:
HTTP JVM: java.security.PrivilegedActionException: NotesException: Cannot create a session from an agent
HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:331)
HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob.run(Factory.java:63)
HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
HTTP JVM: Caused by:
HTTP JVM: NotesException: Cannot create a session from an agent
HTTP JVM: at lotus.domino.local.Session.checkSecurityManagerExtender(Unknown Source)
HTTP JVM: at lotus.domino.local.Session.createSession(Unknown Source)
HTTP JVM: at lotus.domino.NotesFactory.createSession(Unknown Source)
HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob$1.run(Factory.java:66)
HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:327)
HTTP JVM: ... 2 more
HTTP JVM: java.security.PrivilegedActionException: java.io.FileNotFoundException: C:\Lotus\Domino\null\IBM_TECHNICAL_SUPPORT\org.openntf.0.0.log.lck (The system cannot find the path specified.)
HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:331)
HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob.run(Factory.java:79)
HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
HTTP JVM: Caused by:
HTTP JVM: java.io.FileNotFoundException: C:\Lotus\Domino\null\IBM_TECHNICAL_SUPPORT\org.openntf.0.0.log.lck (The system cannot find the path specified.)
HTTP JVM: at java.io.FileOutputStream.<init>(FileOutputStream.java:204)
HTTP JVM: at java.io.FileOutputStream.<init>(FileOutputStream.java:94)
HTTP JVM: at java.util.logging.FileHandler.initOutputFiles(FileHandler.java:225)
HTTP JVM: at java.util.logging.FileHandler.init(FileHandler.java:195)
HTTP JVM: at java.util.logging.FileHandler.<init>(FileHandler.java:517)
HTTP JVM: at org.openntf.domino.logging.DefaultFileHandler.<init>(DefaultFileHandler.java:98)
HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob$2.run(Factory.java:86)
HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:327)
But, when I run this code again on line
for (View view : db.getViews()) {
I'm getting:
[ODA::WARNING] null
[ODA::WARNING] (source:org.openntf.domino.utils.DominoUtils$4.run - See IBM_TECHNICAL_SUPPORT\org.openntf.log.X.Y.txt for full stack trace.)
[ODA::WARNING] null
[ODA::WARNING] (source:org.openntf.domino.utils.DominoUtils$4.run - See IBM_TECHNICAL_SUPPORT\org.openntf.log.X.Y.txt for full stack trace.)
HTTP JVM: javax.faces.el.EvaluationException: java.lang.NullPointerException
HTTP JVM: at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:142)
HTTP JVM: at com.ibm.xsp.component.UIViewRootEx.initAfterContents(UIViewRootEx.java:1690)
HTTP JVM: at com.ibm.xsp.page.compiled.AbstractCompiledPage.initComponent(AbstractCompiledPage.java:335)
HTTP JVM: at com.ibm.xsp.page.compiled.AbstractCompiledPage.createTree(AbstractCompiledPage.java:256)
HTTP JVM: at com.ibm.xsp.page.compiled.AbstractCompiledPage.createViewRoot(AbstractCompiledPage.java:167)
HTTP JVM: at com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(ViewHandlerExImpl.java:521)
HTTP JVM: at com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(ViewHandlerExImpl.java:567)
HTTP JVM: at com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(ViewHandlerExImpl.java:142)
HTTP JVM: at com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:90)
HTTP JVM: at frostillicus.controller.ControllingViewHandler.createView(ControllingViewHandler.java:70)
HTTP JVM: at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:251)
HTTP JVM: at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
HTTP JVM: at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
HTTP JVM: at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
HTTP JVM: at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
HTTP JVM: at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
HTTP JVM: at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
HTTP JVM: at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)
HTTP JVM: at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
HTTP JVM: at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
HTTP JVM: at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)
HTTP JVM: at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
HTTP JVM: at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
HTTP JVM: at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)
HTTP JVM: at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)
HTTP JVM: at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
HTTP JVM: Caused by:
HTTP JVM: java.lang.NullPointerException
That's what in org.openntf.x.y.txt:
lotus.domino.local.NotesBase.CheckObject - null
NotesException: Object has been removed or recycled
at lotus.domino.local.NotesBase.CheckObject(Unknown Source)
at lotus.domino.local.Session.getDatabase(Unknown Source)
at org.openntf.domino.impl.Database.resurrect(Database.java:2648)
at org.openntf.domino.impl.Database.getDelegate(Database.java:2638)
at org.openntf.domino.impl.Database.getViews(Database.java:1642)
What's wrong? I have another (similar Domino Server, version and plugins) where everything runs perfectly!
UPDATED On HTTP task start I'm getting:
[ODA] Starting the OpenNTF Domino API... Using notes.ini: C:\Lotus\Domino\notes.ini
[ODA] OpenNTF API Version 2.0.0.201510032142 started
HTTP JVM: Logging.logCfgFilePrecheck: File 'E:\Lotus\Domino\data/IBM_TECHNICAL_SUPPORT/org.openntf.domino.logging.logconfig.properties' not found
HTTP JVM: Logging: Couldn't initialize from PropertyFile; activating fallback ...
[ODA] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[ODA] Operation of BackendBridge.getViewEntryByKeyWithOptions FAILED
[ODA] Please read the comments in org.openntf.domino.xsp.ODAPlatform
[ODA] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[ODA::Xots] Starting XPages OSGi Tasklet Service with 10 core threads.
[ODA::XOTS] Registering tasklet org.openntf.domino.xsp.xots.XotsNsfScanner@4c904c9
XSP Command Manager initialized
HTTP Server: Restarted