?? 今天遇到一个非常棘手的问题,事关公司项目的进度,望javaeye中高手不吝赐教。
问题如下:
? 公司项目中有一个业务功能用到了applet。我把要用的class类都放入了applet.jar中,用签名工具进行了签名。我把这块功能放置在公司内部开发和测试两台服务器上部署,进行测试都没有问题。但是我部署到客户现场的测试系统就有问题。applet.jar包和签名文件都是直接copy过去的(文件一定是一致的)。
环境配置:web服务器采用了webSphere 4.*
???????? JDK 采用jdk1.4.2
applet.jar编译采用jdk1.5
每次运行applet.jar包程序报:
Java Plug-in 1.5.0_10
使用 JRE 版本 1.5.0_10 Java HotSpot(TM) Client VM
用户主目录 = C:\Documents and Settings\Administrator
----------------------------------------------------
c:?? 清除控制台窗口
f:?? 终结在结束队列上的对象
g:?? 垃圾收集
h:?? 显示此帮助消息
l:?? 转储类载入程序列表
m:?? 打印内存使用
o:?? 触发日志记录
p:?? 重新载入代理配置
q:?? 隐藏控制台
r:?? 重新载入策略配置
s:?? 转储系统和部署属性
t:?? 转储线程列表
v:?? 转储线程堆栈
x:?? 清除类载入程序高速缓存
0-5: 设置跟踪级别为<n>
----------------------------------------------------
log4j:ERROR Parsing error on line 3 and column 7
log4j:ERROR Document root element "html", must match DOCTYPE root "null".
log4j:ERROR Parsing error on line 3 and column 7
log4j:ERROR Document is invalid: no grammar found.
log4j:ERROR Parsing error on line 5 and column 10
log4j:ERROR Invalid byte 1 of 1-byte UTF-8 sequence.
log4j:ERROR Could not parse input source [org.xml.sax.InputSource@84cc09].
org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:665)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
at org.apache.log4j.Logger.getLogger(Logger.java:85)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:37)
at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at cn.enrising.materialFlow.client.SearchProductCommandServiceLocator.<init>(SearchProductCommandServiceLocator.java:12)
at cn.enrising.materialFlow.appletClient.ScanerApplet.initMaterialNamesList(ScanerApplet.java:638)
at cn.enrising.materialFlow.appletClient.ScanerApplet.init(ScanerApplet.java:293)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
java.util.MissingResourceException: Can't find resource for bundle org.apache.axis.i18n.ProjectResourceBundle, key engineFactory
at java.util.ResourceBundle.getObject(Unknown Source)
at java.util.ResourceBundle.getObject(Unknown Source)
at java.util.ResourceBundle.getString(Unknown Source)
at org.apache.axis.i18n.MessageBundle.getMessage(MessageBundle.java:193)
at org.apache.axis.i18n.MessageBundle.getMessage(MessageBundle.java:101)
at org.apache.axis.utils.Messages.getMessage(Messages.java:80)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:141)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at cn.enrising.materialFlow.client.SearchProductCommandServiceLocator.<init>(SearchProductCommandServiceLocator.java:12)
at cn.enrising.materialFlow.appletClient.ScanerApplet.initMaterialNamesList(ScanerApplet.java:638)
at cn.enrising.materialFlow.appletClient.ScanerApplet.init(ScanerApplet.java:293)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.util.MissingResourceException: Can't find resource for bundle org.apache.axis.i18n.ProjectResourceBundle, key engineFactory
at java.util.ResourceBundle.getObject(Unknown Source)
at java.util.ResourceBundle.getObject(Unknown Source)
at java.util.ResourceBundle.getString(Unknown Source)
at org.apache.axis.i18n.MessageBundle.getMessage(MessageBundle.java:193)
at org.apache.axis.i18n.MessageBundle.getMessage(MessageBundle.java:101)
at org.apache.axis.utils.Messages.getMessage(Messages.java:80)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:141)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at cn.enrising.materialFlow.client.SearchProductCommandServiceLocator.<init>(SearchProductCommandServiceLocator.java:12)
at cn.enrising.materialFlow.appletClient.ScanerApplet.initMaterialNamesList(ScanerApplet.java:638)
at cn.enrising.materialFlow.appletClient.ScanerApplet.init(ScanerApplet.java:293)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
还望高手指点,在线等待!!!也期待直接QQ联系:405629073? 谢谢!
?
我也感觉很奇怪,在不同的机器上都去调用这段程序,提示的错误也不一样,我换一台机器结果又报了另一个异常:
Java Plug-in 1.5.0
使用 JRE 版本 1.5.0 Java HotSpot(TM) Client VM
用户主目录 = C:\Documents and Settings\Administrator
----------------------------------------------------
c: 清除控制台窗口
f: 终结在结束队列上的对象
g: 垃圾收集
h: 显示此帮助消息
l: 转储类载入程序列表
m: 打印内存使用
o: 触发日志记录
p: 重新载入代理配置
q: 隐藏控制台
r: 重新载入策略配置
s: 转储系统和部署属性
t: 转储线程列表
v: 转储线程堆栈
x: 清除类载入程序高速缓存
0-5: 设置跟踪级别为<n>
----------------------------------------------------
java.lang.ClassFormatError: Incompatible magic value 218762506 in class file <html>
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.commons.discovery.ResourceClass$1.run(ResourceClass.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.commons.discovery.ResourceClass.loadClass(ResourceClass.java:115)
at org.apache.commons.discovery.tools.DiscoverClass.find(DiscoverClass.java:397)
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at cn.enrising.materialFlow.client.SearchProductCommandServiceLocator.<init>(SearchProductCommandServiceLocator.java:12)
at cn.enrising.materialFlow.appletClient.ScanerApplet.initMaterialNamesList(ScanerApplet.java:638)
at cn.enrising.materialFlow.appletClient.ScanerApplet.init(ScanerApplet.java:293)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
浏览器运行applet时,会把applet的jar包下载下来,谁知道浏览器把这个jar存储在什么位置不?