JExcel Error: ExceptionInInitializerError

258 views
Skip to first unread message

Zey55

unread,
Jan 24, 2013, 3:39:10 AM1/24/13
to jexcel...@teamdev.com
Hi again,

I'm currently trying a simple SAP WebDynpro Application that reads and displays an uploaded Excel file with JExcel. I have imported the following jar files:  comfyj-2.10, jexcel-1.6, jexcel-1.6-full, jniwrap-3.8.4, slf4j-api-1.5.8, slf4j-simple-1.5.8, and winpack-3.8.4. I have also included these jars in the META-INF and lib folders in my application. the jniwrap.dll and jniwrap64.dll are also present there.

However, i encountered these two different errors (see below). the first one was resolved by importing the slf4j-api-1.5.8 and slf4j-simple-1.5.8 jar files. but the 2nd error seems different. 

any ideas about this? 

thanks!

// *******START ERROR 1********** //
java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
at com.jniwrapper.util.Logger.<init>(SourceFile:26)
at com.jniwrapper.util.Logger.getInstance(SourceFile:21)
at com.jniwrapper.win32.jexcel.Application.<clinit>(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)
at sap.com.test.test.UploadItemsView.insertUploadJexcelData(UploadItemsView.java:257)
at sap.com.test.test.UploadItemsView.onActionUploadItems(UploadItemsView.java:325)
at sap.com.test.test.wdp.InternalUploadItemsView.wdInvokeEventHandler(InternalUploadItemsView.java:223)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:333)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1060)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(AccessController.java:219)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
------------------------- Loader Info -------------------------
ClassLoader name: [sap.com.fes.tdc/custupld]
 Parent loader name: [Frame ClassLoader]
 References:
   common:service:http;service:servlet_jsp
   service:ejb
   common:service:iiop;service:naming;service:p4;service:ts
   service:jmsconnector
   library:jsse
   library:servlet
   common:library:IAIKSecurity;library:activation;library:mail;library:tc~sec~ssl
   library:ejb20
   library:j2eeca
   library:jms
   library:opensql
   common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:signature_lib;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:tc~lm~nzdm~crrsrv;service:userstore
   interface:resourcecontext_api
   interface:webservices
   interface:cross
   interface:ejbserialization
   service:webdynpro
   service:sld
   library:tc~ddic~ddicservices
   library:com.sap.aii.proxy.framework
   library:tc~graphics~igs
   library:com.sap.mw.jco
   library:com.sap.lcr.api.cimclient
   library:sapxmltoolkit
   library:com.sap.aii.util.rb
   library:com.sap.util.monitor.jarm
   library:tc~ddic~ddicruntime
   library:com.sap.aii.util.xml
   library:com.sap.aii.util.misc
   library:tc~cmi
 Resources:
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/SX.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/META-INF/SX.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/META-INF/jxl.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/comfyj-2.10.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/winpack-3.8.4.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/META-INF/comfyj-2.10.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/META-INF/jniwrap-3.8.4.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/jxl.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/META-INF/winpack-3.8.4.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/META-INF/jexcel-1.6-full.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/jexcel-1.6-full.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/jniwrap-3.8.4.jar
   /usr/sap/IE5/JC00/j2ee/cluster/server0/apps/sap.com.test.test/custupld/webdynpro/public/lib/app.jar
 Loading model: {parent,references,local}
---------------------------------------------------------------
at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:382)
... 37 more
// *******END ERROR 1********** //


// *******START ERROR 2********** //
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:218)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:161)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:161)
at com.jniwrapper.win32.jexcel.Application.<clinit>(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)
at sap.com.test.test.UploadItemsView.insertUploadJexcelData(UploadItemsView.java:257)
at sap.com.test.test.UploadItemsView.onActionUploadItems(UploadItemsView.java:325)
at sap.com.test.test.wdp.InternalUploadItemsView.wdInvokeEventHandler(InternalUploadItemsView.java:223)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:333)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1060)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(AccessController.java:219)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find JNIWrapper native library (libjniwrap64.so)

// *******END ERROR 2********** //

Sergei Piletsky

unread,
Jan 24, 2013, 5:43:25 AM1/24/13
to Zey55, jexcel...@teamdev.com
Hi,

Yes, first Java exception "java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory" indicated that SLF4J was not included to the class path of your Java application.

The second one "Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find JNIWrapper native library (libjniwrap64.so)" is much more interesting. This exception indicates that you were trying to run JExcel on a 64-bit Linux platform, were not you? The explanation of this exception that JExcel library does not include the libjniwrap64.so library in its distribution package because JExcel does not support Linux platforms.

The list of supported platforms is available on JExcel product page: http://www.teamdev.com/jexcel/  JExcel is based on integration with Excel application via its COM layer, but both these technologies are not available for Linux.

Please let me know if you have any further questions.

Sincerely,
Serge

--
You are receiving this email because you have joined the "JExcel Forum" group or have been added by request. You may choose not to receive emails from this group or unsubscribe completely on "Edit my membership" page.
Go to http://links.teamdev.com/jexcel-forum, choose "Edit my membership" link on the right. Specify your email preferences in suggested options, or click "Unsubscribe" button.
---
You received this message because you are subscribed to the Google Groups "JExcel Forum" group.
To post to this group, send email to jexcel...@teamdev.com.
To unsubscribe from this group, send email to jexcel-forum...@teamdev.com.
Visit this group at http://groups.google.com/a/teamdev.com/group/jexcel-forum/?hl=en.
For more options, visit https://groups.google.com/a/teamdev.com/groups/opt_out.
 
 

Zey55

unread,
Jan 24, 2013, 7:24:24 PM1/24/13
to jexcel...@teamdev.com, Zey55
Hi Serge,

I'm not running the application in a 64-bit Linux platform rather I'm running it in a 64-bit Windows 7 Platform. 

Are there any issues with my deployment of a WebDynpro Application?

thanks!

Zey55

unread,
Jan 24, 2013, 7:50:34 PM1/24/13
to jexcel...@teamdev.com, Zey55
Hi again Serge,

I was just informed that the server where I'm deploying my WebDynpro application MIGHT be Linux Platform. Ate there any options for JExcel to accommodate this?

thank you very much.

Zey55

unread,
Jan 24, 2013, 10:27:19 PM1/24/13
to jexcel...@teamdev.com, Zey55
Hi,

I have downloaded the JNIWrapper for Linux x86/x64 (libjniwrap64.so) with the licenses from http://www.teamdev.com/jniwrapper/ and included it in the lib and META-INF folders. I encountered a new error:

java.lang.RuntimeException: JNIWrapper license check failed: No valid license found.

Any ideas?

thanks!

On Thursday, 24 January 2013 18:43:25 UTC+8, Sergei Piletsky wrote:

Sergei Piletsky

unread,
Jan 25, 2013, 5:56:12 AM1/25/13
to Zey55, jexcel...@teamdev.com
Hi,

That's quite interesting, because such exception "Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find JNIWrapper native library (libjniwrap64.so)" clearly indicates that JNIWrapper has recognized a running platform as a Linux and thus it tried to load a Linux version of native JNIWrapper library (libjniwrap64.so). There are no known platform detection issues in JNIWrapper. I suspect that WebDynpro could modify a Java run-time environment somehow and that could cause the issue. Could you please run the following code:  System.out.println(System.getProperties()); in the very beginning of your Java application and send me the output for investigation?

Also, could you please run JExcel Demo application on your 64-bit Window 7 platform and let me know how it works on it? To run the demo you can start the <JExcel>\demo\JExcelDemo.bat file. Additionally, can you please also specify what JDK do you use?

I your first message you mentioned that you "included these jars in the META-INF and lib folders in my application. the jniwrap.dll and jniwrap64.dll are also present there." — I do not think that those JAR files should be included to META-INF folder of another JAR file. In fact the jniwrap.dll and jniwrap64.dll should be just included to the root folder of your application JAR file, and the JExcel license files (jexcel.lic, jniwrap.lic, comfyj.lic) should be placed to the \META-INF\ folder.

Please try these suggestions and let me know the results.

Thanks,
Serge


To unsubscribe from this group and stop receiving emails from it, send an email to jexcel-forum...@teamdev.com.

To post to this group, send email to jexcel...@teamdev.com.

Zey55

unread,
Jan 28, 2013, 2:13:07 AM1/28/13
to jexcel...@teamdev.com, Zey55

Hi Sergei,

I tried doing the System.getProperties() in my application and it returned a null pointer with these information:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Server 
Web Dynpro Runtime Vendor: SAP, build ID: 7.0207.20110131144549.0000 (release=NW702_07_REL, buildtime=2011-02-24:05:01:48[UTC], changelist=103266, host=pwdfm319), build date: Tue Apr 12 06:17:35 CEST 2011 

J2EE Engine 7.02 PatchLevel 103250. 

Java VM IBM J9 VM, version:2.3, vendor: IBM Corporation 

Operating system Linux, version: 2.6.18-238.5.1.el5, architecture: amd64 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Moreover, i tried the running the JExcelDemo.bat while connected on the deployment server. it runs properly.

I also arranged the jar files in their respective folders in my SAP WebDynpro application.

BIN Folder: NO JAR Files, LIC files, SO files, SH files & application extensions 

LIB FOLDER contains: 
  • jniwrap64.dll
  • jniwrap.dll
  • antlr
  • comfyj-2.10
  • jexcel-1.6-full
  • jniwrap-3.8.4
  • jniwrap-generator-3.8.4
  • slf4j-api-1.5.8
  • winpack-3.8.4
  • comfyj.lic
  • jexcel.lic
  • jniwrap.lic
  • Codegen-linux.sh
  • libjniwrap64.so
  • libjniwrap.so
META-INF FOLDER contains:
  • comfyj-2.10
  • comfyj.lic
  • jexcel-1.6-full
  • jexcel.lic
  • jniwrap64.dll
  • jniwrap.dll
  • jniwrap-3.8.4
  • jniwrap.lic
  • slf4j-api-1.5.8
  • slf4j-simple-1.5.8
  • winpack-3.8.4

As I mentioned before, I downloaded the JNIWrapper native library (libjniwrap64.so) and included it in the folders. It seems ok but there was an error:

java.lang.RuntimeException: JNIWrapper license check failed: No valid license found


Thank you very much!

Sergei Piletsky

unread,
Jan 28, 2013, 8:24:43 AM1/28/13
to Zey55, jexcel...@teamdev.com
Hi

The new information that you provided confirms once more that you were trying to use JExcel library in a Java application that runs on a Linux platform using IBM J9 JVM.

In the previous message I already explained why JExcel won't run on such configuration. Moreover, JNIWrapper and JExcel products support only Sun/Oracle JVMs.

That fact that you were able to run JExcel Demo application (while connected on the deployment server) simply means that JExcel was started on your local Windows system, but not on a remote server.

Please let me know if you have another questions.

Sincerely,
Serge

Reply all
Reply to author
Forward
0 new messages