{"action":"created","issue":{"url":"https://api.github.com/repos/OpenNTF/org.openntf.domino/issues/162","repository_url":"https://api.github.com/repos/OpenNTF/org.openntf.domino","labels_url":"https://api.github.com/repos/OpenNTF/org.openntf.domino/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/OpenNTF/org.openntf.domino/issues/162/comments","events_url":"https://api.github.com/repos/OpenNTF/org.openntf.domino/issues/162/events","html_url":"https://github.com/OpenNTF/org.openntf.domino/issues/162","id":244001321,"number":162,"title":"Openntf added to ibm domino agent but getting illegalstateexception","user":{"login":"nensing","id":27213031,"avatar_url":"https://avatars3.githubusercontent.com/u/27213031?v=4","gravatar_id":"","url":"https://api.github.com/users/nensing","html_url":"https://github.com/nensing","followers_url":"https://api.github.com/users/nensing/followers","following_url":"https://api.github.com/users/nensing/following{/other_user}","gists_url":"https://api.github.com/users/nensing/gists{/gist_id}","starred_url":"https://api.github.com/users/nensing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nensing/subscriptions","organizations_url":"https://api.github.com/users/nensing/orgs","repos_url":"https://api.github.com/users/nensing/repos","events_url":"https://api.github.com/users/nensing/events{/privacy}","received_events_url":"https://api.github.com/users/nensing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-07-19T10:56:23Z","updated_at":"2017-07-19T12:53:23Z","closed_at":null,"body":"Hello,\r\n I have these files: https://github.com/OpenNTF/org.openntf.domino \r\nI created a java agent in lotus domino designer.\r\n I added the jar: org.openntf.domino to the java agent.\r\nThis is the code in the java agent:\r\n\r\n`import org.openntf.domino.*; \r\npublic class JavaAgent extends AgentBase {      \r\npublic void NotesMain() {       \r\n try {           \r\nSession session = getSession();          \r\n AgentContext agentContext = session.getAgentContext();           \r\nSystem.out.println(\"test\");           // (Your code goes here)       \r\n } \r\ncatch(Exception e) {         \r\n  e.printStackTrace();       \r\n }    } }`\r\n\r\nAnd when I run it I get this error:\r\n`java.lang.IllegalStateException: org.openntf.domino.utils.Factory is not initialized for this thread!     at org.openntf.domino.utils.Factory.getThreadVariables(Factory.java:345)     at org.openntf.domino.utils.Factory.getWrapperFactory(Factory.java:627)     at org.openntf.domino.AgentBase.getSession(AgentBase.java:25)     at JavaAgent.NotesMain(Unknown Source)     at lotus.domino.AgentBase.runNotes(Unknown Source)     at lotus.domino.NotesThread.run(Unknown Source)    Factory.getSession(); does not work`\r\n\r\nWhat am I doing wrong here?\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/OpenNTF/org.openntf.domino/issues/comments/316376288","html_url":"https://github.com/OpenNTF/org.openntf.domino/issues/162#issuecomment-316376288","issue_url":"https://api.github.com/repos/OpenNTF/org.openntf.domino/issues/162","id":316376288,"user":{"login":"jesse-gallagher","id":935700,"avatar_url":"https://avatars2.githubusercontent.com/u/935700?v=4","gravatar_id":"","url":"https://api.github.com/users/jesse-gallagher","html_url":"https://github.com/jesse-gallagher","followers_url":"https://api.github.com/users/jesse-gallagher/followers","following_url":"https://api.github.com/users/jesse-gallagher/following{/other_user}","gists_url":"https://api.github.com/users/jesse-gallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/jesse-gallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesse-gallagher/subscriptions","organizations_url":"https://api.github.com/users/jesse-gallagher/orgs","repos_url":"https://api.github.com/users/jesse-gallagher/repos","events_url":"https://api.github.com/users/jesse-gallagher/events{/privacy}","received_events_url":"https://api.github.com/users/jesse-gallagher/received_events","type":"User","site_admin":false},"created_at":"2017-07-19T12:53:23Z","updated_at":"2017-07-19T12:53:23Z","body":"I was afraid of something like that. There are a few options, both with tradeoffs:\r\n\r\n- Alter the Java policy by adding a file named `java.pol` in `jvm/lib/security` containing `grant { permission java.security.AllPermission; };`. This would have the down side of having to make this filesystem-side change on each Notes/Domino instance running the agent\r\n- Put the ODA jar in `jvm/lib/ext`. This would have the same problem as above but would also likely make it so that you'd run into problems with using ODA in XPages. If you use the same version in both cases, it MAY work, but you may also run into ClassLoader-related issues even if the versions match."}}
{"actor":{"display_login":"jesse-gallagher"}}