axis问题,编译成功,在JBuilder里面也可以运行,但是export出来.exe,单独运行时候会有以下异常

lcp 2006-09-02 06:33:38
必高分酬谢!

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
...全文
515 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lcp 2006-09-04
  • 打赏
  • 举报
回复
另外,我在JBuilder导出.exe文件时,已经把所有的axis包放进.jar文档里了。
lcp 2006-09-04
  • 打赏
  • 举报
回复
现在运行时,会出现下述错误:

C:\QFWSTest>java QFWSTest
Exception in thread "main" java.lang.SecurityException: no manifiest section for
signature file entry javax/mail/internet/AsciiOutputStream.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)

at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
lcp 2006-09-04
  • 打赏
  • 举报
回复
谢谢各位!
这个是小弟试写的通过证书联结web service的程序,请帮忙看看下面设置证书以及密码的部分是否有明显错误呢?(证书本身与密码都是正确的,.cer可以直接打开,然后通过 keytool导入trustStore.jks文件,客户端证书是“c:\\ALO_1.pfx”),另外,此程序用jbuilder写的,在 JBuilder里面运行,不会出现上述异常,而在console直接运行导出的.exe,会出现上述异常。

public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub

// Set system properties to point to the keystores
// First the trustStore (keystore of trusted certificates)
System.setProperty("javax.net.ssl.trustStore","c:\\trustStore.jks");
System.setProperty("javax.net.ssl.trustStorePassword","Password");


// Now the keystore. We will just use the certificate itself

System.setProperty("javax.net.ssl.keyStore","c:\\ALO_1.pfx");
System.setProperty("javax.net.ssl.keyStorePassword","Password");
System.setProperty("javax.net.ssl.keyStoreType","PKCS12");
......


}
fengfangfang 2006-09-04
  • 打赏
  • 举报
回复
指定 -cp 设置axis库的路径
YuLimin 2006-09-02
  • 打赏
  • 举报
回复
少了编译时需要的相关包,要把这些包都打进去
gefengxztg 2006-09-02
  • 打赏
  • 举报
回复
学习

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧