2016-11-30 2 views
1

WAS 8 콘솔에 배포 된 응용 프로그램을 시작하려고했습니다. 나는 비슷한 질문을 보았지만 어떤 솔루션을 구현해야하는지 이해할 수 없었습니다. 이걸 도와주세요. 나는 오랫동안 붙어있다.중첩 예외가있는 BeanCreationException IBM websphere 8.0의 java.lang.LinkageError

서버 특정 클래스 로더 정책 : 여러 서버 특정 클래스 로딩 모드 : 첫번째 부모

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/[email protected]" of class "org/springframework/remoting/jaxws/LocalJaxWsServiceFactory" and loader "com/ibm/oti/vm/[email protected]" 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

LinkageError는 대개 클래스가 두 클래스의 다른 버전에 대한 가시성을 가지고 있음을 나타냅니다. 하나는 직접 (자체 클래스 로더를 통해) 하나는 간접적으로 (다른 일부 로더를 통해) 나타납니다. 이것은 일반적으로 "부모 마지막"스타일 로딩에서만 가능하므로 필요하지 않은 경우 클래스 로딩 모드를 전환하면 트릭을 수행 할 수 있습니다. 일반적으로 "parent last"를 사용할 특별한 이유가 없다면 기본 Java 클래스 로딩 비헤이비어가 엉망이고 이와 같은 문제가 발생할 수 있으므로 피해야합니다.

오류 메시지에 따르면 중복 가시성 클래스가 javax.xml.namespace.QName 클래스라고 생각합니다. 애플리케이션에 XML API를 패키징하는 이유가 있습니까? WAS에는 JDK에 패키지 된 Xerces 사본이 있으므로 XML 공급자와 관련하여 특별한 점이 없으면 실제로 수행해야 할 것 같지 않습니다. "parent last"가 필요한 경우 XML API가 포함 된 jar를 제거하면 문제가 해결 될 수도 있습니다.

관련 문제