0

I am trying to submit Excel with million of data,I have following jars in my classpath

poi-3.9.jar
poi-ooxml-3.9.jar
poi-ooxml-schemas-3.9.jar
xmlbeans-2.3.0.jar
dom4j-1.6.1.jar 

It is working fine in my local machine. But when I try to run it on linux and it published in weblogic it gives me the following error:

java.lang.NoClassDefFoundError: java.xml.namespace.QName

when try it again it gives me the following error:

java.lang.NoClassDefFoundError: Could not initialize class org.apache.xmlbeans.XmlBeans

coder
  • 8,346
  • 16
  • 39
  • 53
s.done
  • 1
  • 1

1 Answers1

0

Are you publishing a .war or similar in your local machine or running it from your IDE?

You could be getting the NoClassDefFoundError because you are not including your libraries in your .war. Check this

Jorge.V
  • 1,329
  • 1
  • 13
  • 19
  • I use OSGI it has more than 100 bundles,I don't know why the first error is'java.lang.NoClassDefFoundError: java.xml.namespace.QName' After that is “java.lang.NoClassDefFoundError: Could not initialize class org.apache.xmlbeans.XmlBeans” – s.done May 08 '18 at 01:58
  • if I pulishing it in my local machine it will be very troublesome . – s.done May 08 '18 at 02:31
  • Just make sure you are including j2ee.jar (or any other jar that includes the class you are missing) in your .war. Check this jar is either in your WebContent folder or if it is an external lib, you are exporting it. – Jorge.V May 08 '18 at 06:05
  • think you very much – s.done May 08 '18 at 07:02