Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factory.getSession(); #85

Closed
ghost opened this issue Nov 9, 2013 · 3 comments
Closed

Factory.getSession(); #85

ghost opened this issue Nov 9, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 9, 2013

I have a problem creating a new Session object like this.
Session session = Factory.getSession();

I do this from a managed bean in Domino 9.0. Even if it produces errors on the console I still get the session object and can use it.

What could be the problem?

Here is the output from the domino console.

2013-11-09 15:38:26 HTTP JVM: java.security.PrivilegedActionException: NotesException: Cannot create a session from an agent
2013-11-09 15:38:26 HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:281)
2013-11-09 15:38:26 HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob.run(Factory.java:63)
2013-11-09 15:38:26 HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
2013-11-09 15:38:26 HTTP JVM: Caused by:
2013-11-09 15:38:26 HTTP JVM: NotesException: Cannot create a session from an agent
2013-11-09 15:38:26 HTTP JVM: at lotus.domino.local.Session.checkSecurityManagerExtender(Unknown Source)
2013-11-09 15:38:26 HTTP JVM: at lotus.domino.local.Session.createSession(Unknown Source)
2013-11-09 15:38:26 HTTP JVM: at lotus.domino.NotesFactory.createSession(Unknown Source)
2013-11-09 15:38:26 HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob$1.run(Factory.java:66)
2013-11-09 15:38:26 HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:277)
2013-11-09 15:38:26 HTTP JVM: ... 2 more
2013-11-09 15:38:26 HTTP JVM: java.security.PrivilegedActionException: java.io.FileNotFoundException: C:\Program Files (x86)\IBM\Lotus\Domino\null\IBM_TECHNICAL_SUPPORT\org.openntf.0.0.log.lck (The system cannot find the path specified.)
2013-11-09 15:38:26 HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:281)
2013-11-09 15:38:26 HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob.run(Factory.java:79)
2013-11-09 15:38:26 HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
2013-11-09 15:38:26 HTTP JVM: Caused by:
2013-11-09 15:38:26 HTTP JVM: java.io.FileNotFoundException: C:\Program Files (x86)\IBM\Lotus\Domino\null\IBM_TECHNICAL_SUPPORT\org.openntf.0.0.log.lck (The system cannot find the path specified.)
2013-11-09 15:38:26 HTTP JVM: at java.io.FileOutputStream.open(Native Method)
2013-11-09 15:38:26 HTTP JVM: at java.io.FileOutputStream.(FileOutputStream.java:191)
2013-11-09 15:38:26 HTTP JVM: at java.io.FileOutputStream.(FileOutputStream.java:82)
2013-11-09 15:38:26 HTTP JVM: at java.util.logging.FileHandler.initOutputFiles(FileHandler.java:225)
2013-11-09 15:38:26 HTTP JVM: at java.util.logging.FileHandler.init(FileHandler.java:195)
2013-11-09 15:38:26 HTTP JVM: at java.util.logging.FileHandler.(FileHandler.java:517)
2013-11-09 15:38:26 HTTP JVM: at org.openntf.domino.logging.DefaultFileHandler.(DefaultFileHandler.java:98)
2013-11-09 15:38:26 HTTP JVM: at org.openntf.domino.utils.Factory$SetupJob$2.run(Factory.java:86)
2013-11-09 15:38:26 HTTP JVM: at java.security.AccessController.doPrivileged(AccessController.java:277)
2013-11-09 15:38:26 HTTP JVM: ... 2 more

@rPraml
Copy link
Contributor

rPraml commented Nov 25, 2013

I think the problem is the path to the DATA directory. In your stacktrace you see a "null" in this path:
C:\Program Files (x86)\IBM\Lotus\Domino\null\IBM_TECHNICAL_SUPPORT\org.openntf.0.0.log.lck
and the path seems to be the PROGRAM directory.

Can you check the "Directory" entry in your notes.ini? What does "Factory.getDataPath()" return?

Best regards
Roland

@paulswithers
Copy link
Contributor

Which release are you using? There was a problem with getting the path on Linux, but I believe that's now fixed. There was previously a requirement to have the jar on the server to get a session in a managed bean, but again that's no longer required.

@ghost
Copy link
Author

ghost commented Dec 16, 2013

The problem disappeared when I upgraded to the latest version.

@ghost ghost closed this as completed Dec 16, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants