您好我正在使用SWING作为客户端,使用HTTPInvoker在服务器端使用Java WebStart JNLP和Spring开发RIA应用程序。
当我尝试启动时,我收到以下错误消息&从JNLP运行我的应用程序。但是,如果我运行与java应用程序相同,它工作正常并与服务器通信并使用spring bean获取数据。
我的client.xml文件位于客户端软件包中,由jnlp查找。
这是我的JNLP文件:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:9080/fawsServer" href="fawsWebstart.jnlp">
<information>
<title>Force Analyst</title>
<vendor>***</vendor>
<description>Force Analyst</description>
<description kind="short">
A demo of the capabilities of JAVA WebStart.
</description>
<offline-allowed>false</offline-allowed>
</information>
<resources>
<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="fawsClient.jar" download="eager" main="true"/>
<jar href="fawsModel.jar" download="eager" main="false"/>
<jar href="fawsIcons.jar" download="eager" main="false"/>
<jar href="spring-core.jar" download="eager" main="false"/>
<jar href="commons-logging-1.0.4.jar" download="eager" main="false"/>
<jar href="spring-2.5.6.jar" download="eager" main="false"/>
</resources>
<application-desc
name="Force Analyst Application"
main-class="com.att.edge.fawsclient.main.SplashWindow"
width="710"
height="380">
</application-desc>
<update check="background"/>
</jnlp>
错误:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at com.att.edge.fawsclient.dao.factory.DAOFactory.getMessagesDAO(DAOFactory.java:110)
at com.att.edge.fawsclient.comm.messages.ReadMessagesFrame.<init>(ReadMessagesFrame.java:114)
at com.att.edge.fawsclient.comm.messages.ReadMessagesFrame.getReadMessagesFrame(ReadMessagesFrame.java:87)
at com.att.edge.fawsclient.main.ForceAnalystPalette.getMessageFrame(ForceAnalystPalette.java:306)
at com.att.edge.fawsclient.main.ForceAnalystPalette.actionPerformed(ForceAnalystPalette.java:1173)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [fawsClient-client.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
at com.att.edge.fawsclient.dao.factory.DAOFactory$BeanFactoryHolder.<clinit>(DAOFactory.java:40)
... 30 more
Caused by: java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:99)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:78)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createBeanDefinitionDocumentReader(XmlBeanDefinitionReader.java:518)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:505)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 35 more
答案 0 :(得分:1)
sping-2.5.6.jar和spring-core.jar中都存在相关的类(org.springframework.util.ReflectionUtils),我猜它会引起混淆。首先,我会删除spring-core.jar,因为它包含在大spring.jar中。