Resolving JAR file and class loading errors
If a class loading error occurs while the CaseEventEmitter.war file is running, configure library sharing in the WebSphere® Application Server administration console.
About this task
- JAR files not found in the class path
- If you observe that events are not emitted and the following exception is thrown in the trace,
see Postinstallation steps.
javax.json.JsonException: org.apache.johnzon.core.JsonProviderImpl not found at com.ibm.oi.icm.event.emitter.IcmConfigurationProvider.reloadConfigurationIfModified(IcmConfigurationProvider.java:89) at com.ibm.oi.icm.event.emitter.IcmConfigurationProvider.<init>(IcmConfigurationProvider.java:60) at com.ibm.oi.icm.event.emitter.IcmOiEmitter.getIcmConfig(IcmOiEmitter.java:47) at com.ibm.oi.icm.event.emitter.IcmOiEmitter.run(IcmOiEmitter.java:78) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:319) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:191) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.lang.Thread.run(Thread.java:812) Caused by: javax.json.JsonException: org.apache.johnzon.core.JsonProviderImpl not found at javax.json.spi.JsonProvider.doLoadProvider(JsonProvider.java:132) at javax.json.spi.JsonProvider.provider(JsonProvider.java:64) at javax.json.Json.createReader(Json.java:68) at com.ibm.dba.bai.events.icm.IcmBusinessEventUtil.parseObjectFromJsonString(IcmBusinessEventUtil.java:229) at com.ibm.oi.icm.event.emitter.IcmConfigurationProvider.reloadConfigurationIfModified(IcmConfigurationProvider.java:82) ... 10 more Caused by: java.lang.ClassCastException: Cannot cast class org.apache.johnzon.core.JsonProviderImpl to class javax.json.spi.JsonProvider at java.lang.Class.cast(Class.java:2622) at javax.json.spi.JsonProvider.doLoadProvider(JsonProvider.java:130) ... 14 more
- Class loading errors
- Errors of type
java.lang.NoSuchMethodError
indicate class loading errors. Such errors are usually caused by the classes of a JAR file inside the emitter conflicting with the classes used by the application server, as shown in the following trace sample. In this case, go through the next steps.SRVE0283E: Exception caught while initializing context: java.lang.NoSuchMethodError: javax.json.Json.createPointer(Ljava/lang/String;)Ljavax/json/JsonPointer; at com.ibm.dba.oi.events.SimpleJsonPath.toJsonPointer(SimpleJsonPath.java:237) at com.ibm.dba.oi.events.BusinessEvent.get(BusinessEvent.java:92) at com.ibm.dba.oi.events.BusinessEvent.getAsString(BusinessEvent.java:123) at com.ibm.dba.oi.events.BusinessEvent.getAsStringNotNull(BusinessEvent.java:151) at com.ibm.dba.oi.events.icm.IcmEvent.getIcmSolutionName(IcmEvent.java:29) at com.ibm.oi.icm.event.emitter.IcmOiEmitter.recordLatestEvents(IcmOiEmitter.java:542) at com.ibm.oi.icm.event.emitter.IcmOiEmitter.run(IcmOiEmitter.java:296) ..