0

I'm creating a new OSGi plugin and I need to use the current user's session. The code in the plugin is called from a xe:customRestService in 'doGet'. Now I was not able to 'just' pass the session over, so I used ExtLibUtil.getCurrentSession(); Now all compiles correctly and I can debug the code, but whenever I 'use' this session to get, for example, the current servername, it throws:

java.lang.NoClassDefFoundError: lotus/domino/Session

What dependency is my project missing or is there another possibility?

Ferry Kranenburg
  • 2,625
  • 1
  • 17
  • 23
  • Maybe this can help: http://stackoverflow.com/questions/14771700/i-want-my-domino-servlet-to-get-an-authenticated-user-session) or use the metho – Mark Leusink Sep 16 '14 at 07:34

1 Answers1

0

When I use ExtLibUtil.getCurrentSession() the session becomes invalid somehow, I don't know why but after a lot of testing this combination works. The 'getUserSession()' call somehow fixed the problem....

Session session = com.ibm.domino.osgi.core.context.ContextInfo.getUserSession();
session = ExtLibUtil.getCurrentSession();

I still don't understand why this works andSession session = ExtLibUtil.getCurrentSession(); does not.

Ferry Kranenburg
  • 2,625
  • 1
  • 17
  • 23