Hi,
We executed our application in Windows and Linux using similar Liberty and JDK versions, and it worked seamlessly, but we encountered a challenge specific to the z/OS environment. It manifested as a NoClassDefFoundError, accompanied by a J9VMInternals initialization failure. Any ideas?
It originated from this code
System.out.println(“Build barcode factory”);
BarcodeGenerator generator = buildGenerator(codetext, encodeType);
System.out.println(“Barcode factory built”);
private BarcodeGenerator buildGenerator(String codetext, SymbologyEncodeType encodeType) {
BarcodeGenerator generator = new BarcodeGenerator(encodeType, codetext);
return generator;
}
Here’s the server’s messages.log
[9/20/23, 3:05:50:995 GMT] 0000003e com.ibm.cics.server.Wrapper I DFHSJ1405I: WebSphere Application Server Version 22.0.0.3 Liberty - (22.0.0.3-cl220320220404-1738)
[9/20/23, 3:05:51:018 GMT] 0000003e com.ibm.ws.webcontainer.servlet I SRVE0242I: [barcodeplus] [/barcodeplus] [dcs.barcode.servlet.GenBarCode]: Initialization successful.
[9/20/23, 3:05:51:043 GMT] 0000003e SystemOut O Build barcode factory
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R LogListener.logged threw a non-fatal unchecked exception as follows:
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R java.lang.NoClassDefFoundError: com.aspose.barcode.internal.zzr.ooq (initialization failure)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at java.base/java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:156)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at com.aspose.barcode.internal.jjr.mm.toString(Unknown Source)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at java.base/java.lang.Throwable.printStackTrace(Throwable.java:544)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at java.base/java.lang.Throwable.printStackTraceHelper(Throwable.java:342)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at java.base/java.lang.Throwable.printStackTrace(Throwable.java:318)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.EquinoxLogWriter.getStackTrace(EquinoxLogWriter.java:451)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.EquinoxLogWriter.writeStack(EquinoxLogWriter.java:545)
[9/20/23, 3:05:51:102 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.EquinoxLogWriter.writeLog(EquinoxLogWriter.java:488)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.EquinoxLogWriter.log(EquinoxLogWriter.java:303)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.EquinoxLogWriter.logged(EquinoxLogWriter.java:760)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:102)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:237)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:209)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:102)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:88)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:80)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.LoggerImpl.log(LoggerImpl.java:66)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:59)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at org.eclipse.osgi.internal.log.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:47)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.log.ICICSLogger.logMessages(ICICSLogger.java:444)
[9/20/23, 3:05:51:103 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.log.ICICSLogger.logException(ICICSLogger.java:836)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.handleThrowableErrors(CICSTaskWrapper.java:1089)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.run(CICSTaskWrapper.java:467)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSHttpExecutor.execute(CICSHttpExecutor.java:233)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:448)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:412)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:327)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:167)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:75)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.ws.tcpchannel.internal.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:138)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.io.async.AbstractAsyncFuture$WorkCallback.run(AbstractAsyncFuture.java:384)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.runWork(CICSTaskWrapper.java:910)
[9/20/23, 3:05:51:104 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.run(CICSTaskWrapper.java:460)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:245)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.threading.CICSThread.run(CICSThread.java:222)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.threading.CICSPooledThreadFactory.joinAsThreadInternal(CICSPooledThreadFactory.java:428)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.threading.CICSPooledThreadFactory.joinAsThread(CICSPooledThreadFactory.java:354)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.server.internal.ThreadJoiner.main(ThreadJoiner.java:86)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.bundlepart.impl.OSGiMainMethodProxy.invoke(OSGiMainMethodProxy.java:147)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.call_main(Wrapper.java:975)
[9/20/23, 3:05:51:105 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.callOSGiClass(Wrapper.java:2932)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.invokeJvmServerOSGiClass(Wrapper.java:2797)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.jvmServerOSGiEntry(Wrapper.java:2732)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.bundlepart.impl.CICSOSGiBundlepartControllerImpl.callWrapperOSGiEntry(CICSOSGiBundlepartControllerImpl.java:1278)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.bundlepart.impl.CICSOSGiBundlepartControllerImpl.runService(CICSOSGiBundlepartControllerImpl.java:1176)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.bundlepart.impl.CICSLibertyBundlepartControllerImpl.runService(CICSLibertyBundlepartControllerImpl.java:1204)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.impl.Controller.runService(Controller.java:783)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.impl.Controller.acceptRequest(Controller.java:248)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R at com.ibm.cics.router.Router.route(Router.java:1502)
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R Caused by:
[9/20/23, 3:05:51:106 GMT] 0000003e SystemErr R java.lang.NoClassDefFoundError: com.aspose.barcode.internal.zzr.ooq (initialization failure)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at java.base/java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:156)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.aspose.barcode.internal.jjr.mm.toString(Unknown Source)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at java.base/java.lang.Throwable.printStackTrace(Throwable.java:544)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at java.base/java.lang.Throwable.printStackTraceHelper(Throwable.java:342)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at java.base/java.lang.Throwable.printStackTrace(Throwable.java:318)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.ras.CICSRASUtils.throwableToString(CICSRASUtils.java:460)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.ras.CICSRASUtils.objectToByteArray(CICSRASUtils.java:338)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.ras.CICSTraceService.logTrace(CICSTraceService.java:3097)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.ras.CICSTraceService.exception(CICSTraceService.java:2777)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.handleReturnCode(Wrapper.java:1235)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.handleThrowableErrors(CICSTaskWrapper.java:1060)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.run(CICSTaskWrapper.java:467)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSHttpExecutor.execute(CICSHttpExecutor.java:233)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:448)
[9/20/23, 3:05:51:107 GMT] 0000003e SystemErr R at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:412)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:327)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:167)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:75)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.tcpchannel.internal.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:138)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.io.async.AbstractAsyncFuture$WorkCallback.run(AbstractAsyncFuture.java:384)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.runWork(CICSTaskWrapper.java:910)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.impl.CICSTaskWrapper.run(CICSTaskWrapper.java:460)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:245)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.threading.CICSThread.run(CICSThread.java:222)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.threading.CICSPooledThreadFactory.joinAsThreadInternal(CICSPooledThreadFactory.java:428)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.threading.CICSPooledThreadFactory.joinAsThread(CICSPooledThreadFactory.java:354)
[9/20/23, 3:05:51:108 GMT] 0000003e SystemErr R at com.ibm.cics.server.internal.ThreadJoiner.main(ThreadJoiner.java:86)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.bundlepart.impl.OSGiMainMethodProxy.invoke(OSGiMainMethodProxy.java:147)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.call_main(Wrapper.java:975)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.callOSGiClass(Wrapper.java:2932)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.invokeJvmServerOSGiClass(Wrapper.java:2797)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.server.Wrapper.jvmServerOSGiEntry(Wrapper.java:2732)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.bundlepart.impl.CICSOSGiBundlepartControllerImpl.callWrapperOSGiEntry(CICSOSGiBundlepartControllerImpl.java:1278)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.bundlepart.impl.CICSOSGiBundlepartControllerImpl.runService(CICSOSGiBundlepartControllerImpl.java:1176)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.wlp.bundlepart.impl.CICSLibertyBundlepartControllerImpl.runService(CICSLibertyBundlepartControllerImpl.java:1204)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.impl.Controller.runService(Controller.java:783)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at com.ibm.cics.osgi.impl.Controller.acceptRequest(Controller.java:248)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[9/20/23, 3:05:51:109 GMT] 0000003e SystemErr R at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[9/20/23, 3:05:51:110 GMT] 0000003e SystemErr R at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[9/20/23, 3:05:51:110 GMT] 0000003e SystemErr R at com.ibm.cics.router.Router.route(Router.java:1502)
[9/20/23, 3:05:51:110 GMT] 0000003e SystemErr R Caused by: