Search code examples
xpageslotus-dominoxpages-extlib

java.lang.NoClassDefFoundError: com.ibm.xsp.extlib.util.ExtLibUtil


Last week I was playing with sessionScope values being read and written from java code that was called from on beforePageLoad in an XPage. It was working when called on the server, but this week after rebooting the server it is now giving an error. The Java code still compiles.

To resolve the extlib in Designer I include the JAR "com.ibm.xsp.extlib.core_11.0.1.v00_00_20200319-1021.jar" as an external JAR.

If I run "tell http osgi ss com.ibm.xsp.extlib" on the console I get: enter image description here

The lines I am using in Java are: import com.ibm.xsp.extlib.util.ExtLibUtil;

and

Map<String, Object> sessionScope = ExtLibUtil.getSessionScope();

Am I including the wrong JAR file? I can't understand why it worked Friday, but today isn't working.


Solution

  • Including the Jar is not necessary. Under XSP Configuration, Page Generation Tab, the extended XPage controls to use checkbox for com.ibm.xsp.extlib.library needs to be checked. This resolved the issue, and removed compilation errors too. enter image description here