首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

java.lang.NoClassDefFoundError-axis问题,编译成功,在JBuilder里面也可以运行,但是export出来.exe,单独运行时

2014-01-26 
Exception in thread main java.lang.ExceptionInInitializerErrorat org.apache.axis.client.Service.ge

  Exception in thread "main" java.lang.ExceptionInInitializerError
  at org.apache.axis.client.Service.getAxisClient(Service.java:103)
  at org.apache.axis.client.Service.<init>(Service.java:112)
  at QFWebService_pkg.QFWebServiceLocator.<init>(QFWebServiceLocator.java:19)
  at QFWSTest.main(QFWSTest.java:46)
  Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.comm
  ons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by
  java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfig
  urationException: java.lang.NullPointerException (Caused by java.lang.NullPointe
  rException))
  at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
  Impl.java:543)
  at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
  Impl.java:235)
  at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
  at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:3
  7)
  at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
  ... 4 more
  Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullP
  ointerException (Caused by java.lang.NullPointerException)
  at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
  actoryImpl.java:397)
  at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
  Impl.java:529)
  ... 8 more
  Caused by: java.lang.NullPointerException
  at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
  actoryImpl.java:374)
  ... 9 more
 
  C:\Documents and Settings\Administrator\jbproject\QFWSTest>java QFWSTest.exe
  Exception in thread "main" java.lang.NoClassDefFoundError: QFWSTest/exe
 
  C:\Documents and Settings\Administrator\jbproject\QFWSTest>java QFWSTest.jar
  Exception in thread "main" java.lang.NoClassDefFoundError: QFWSTest/jar

------解决方法--------------------------------------------------------
少了编译时需要的相关包,要把这些包都打进去
------解决方法--------------------------------------------------------
指定 -cp 设置axis库的路径

        

热点排行