我试图启动在WAS 8控制台中部署的应用程序。我见过类似这样的问题,但无法理解我必须实施的解决方案。请帮我解决一下这个。我坚持不懈。
服务器特定的类加载器策略:多个 服务器特定的类加载模式:父级第一
EAR / WAR类加载器策略:多个 EAR / WAR类加载模式:父级最后
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'soapFinsService' defined in class path resource [springcontext/api_third_party_beans.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loading constraint violation when resolving method "javax/xml/ws/Service.create(Ljava/net/URL;Ljavax/xml/namespace/QName;)Ljavax/xml/ws/Service;" : loader "com/ibm/ws/classloader/CompoundClassLoader@197001c" of class "org/springframework/remoting/jaxws/LocalJaxWsServiceFactory" and loader "com/ibm/oti/vm/BootstrapClassLoader@753492c" of class "javax/xml/ws/Service" have different types for the method signature
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.jboss.resteasy.plugins.spring.SpringContextLoaderListener.contextInitialized(SpringContextLoaderListener.java:48)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1649)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:410)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:748)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:633)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1134)
答案 0 :(得分:0)
LinkageError通常表示一个类可以看到某个类的两个不同版本,一个直接(通过它自己的类加载器)和一个间接(通过一些其他加载器)。这通常只能通过父母最后一次加载来实现,所以如果您不需要,那么切换类加载模式可能会有所帮助。一般来说,如果你没有特定的理由使用&#34; parent last&#34;,那么应该避免它,因为它与默认的Java类加载行为混淆并且可能导致像这样的问题。< / p>
根据错误消息,我猜测duplicate-visibility类是javax.xml.namespace.QName类。您是否有理由在应用程序中打包XML API? WAS有一个在其JDK中打包的Xerces副本,因此除非您对XML提供程序有一些特殊性,否则您实际上不太可能需要这样做。如果您确实需要&#34; parent last&#34;,删除包含XML API的jar也可能解决问题。