Java AccessControlException with SAP JavaConnector and Domino

Hi Folks,

I am trying to connect to a SAP system via SAPs JavaConnector (JCo). Some calls to the methods in JCo classes are running correctly, others throw a AccessControlException:

30.08.2004 04:51:25 PM HTTP JVM: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)

30.08.2004 04:51:25 PM HTTP JVM: at java.security.AccessControlContext.checkPermission(AccessControlContext.java:286)

30.08.2004 04:51:25 PM HTTP JVM: at java.security.AccessController.checkPermission(AccessController.java:413)

30.08.2004 04:51:25 PM HTTP JVM: at java.lang.SecurityManager.checkPermission(SecurityManager.java:565)

30.08.2004 04:51:25 PM HTTP JVM: at java.lang.Thread.setContextClassLoader(Thread.java:1169)

30.08.2004 04:51:25 PM HTTP JVM: at com.sap.mw.jco.JCO$PoolManager.startTimeoutChecker(JCO.java:5143)

30.08.2004 04:51:25 PM HTTP JVM: at com.sap.mw.jco.JCO$PoolManager.(JCO.java:5131)

30.08.2004 04:51:25 PM HTTP JVM: at com.sap.mw.jco.JCO$PoolManager.createPoolManager(JCO.java:5167)

30.08.2004 04:51:25 PM HTTP JVM: at com.sap.mw.jco.JCO$PoolManager.singleton(JCO.java:5160)

30.08.2004 04:51:25 PM HTTP JVM: at com.sap.mw.jco.JCO.getClientPoolManager(JCO.java:7287)

30.08.2004 04:51:25 PM HTTP JVM: at notesSAPConnection.notesSAPConnection.(notesSAPConnection.java:34)

30.08.2004 04:51:25 PM HTTP JVM: at JavaAgent.NotesMain(JavaAgent.java:56)

30.08.2004 04:51:25 PM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)

30.08.2004 04:51:25 PM HTTP JVM: at lotus.domino.NotesThread.run(NotesThread.java:215)

30.08.2004 04:51:25 PM HTTP JVM: Error cleaning up agent threads

My environment:

Domino 6.5.2 on SuSE Linux 9.1 Prof. or Domino 6.5.2 on AIX 5.2

Accessing my database with an action in a HTML page, which calls a LotusScript agent. The LS agent again calls a Java agent with calls to the SAP JCo Java lib.

SAP JCo lib is in Dominoroot/jvm/lib/ext which has “AllPermissions” in Dominoroot/jvm/bin/lib/security/java.policy.

Any suggestions?

Subject: Java AccessControlException with SAP JavaConnector and Domino

Hi Johann-Michael Weiler,

Did you get your SAP connector works?..I constanstly getting this error message

java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ‘com.sap.mw.jco.rfc.MiddlewareRFC’

null

at 



at JavaAgent.NotesMain(JavaAgent.java:15)



at lotus.domino.AgentBase.runNotes(AgentBase.java:169)



at lotus.domino.NotesThread.run(NotesThread.java:204)

Thanks for yourt help

Subject: Java AccessControlException with SAP JavaConnector and Domino

Johann,

You may just need to change the agent properties security (key) tab to # 3 – “Allow restricted operations with full administration rights.”

Ken