0

나는 weblogic 서버에 배포 된 두 개의 웹 응용 프로그램 (ear 파일)을 가지고 있습니다. 그 중 하나는 웹 서비스 응용 프로그램이고 다른 하나는 웹 서비스 클라이언트입니다.weblogic 10.3.5에서 메트로 웹 서비스를 호출하는 방법은 무엇입니까?

웹 서비스에는 METRO가 사용됩니다. 웹 서비스 응용 프로그램이 제대로 실행되고 있습니다.

웹 서비스 클라이언트 응용 프로그램을 배포하려고하면 다음 오류가 발생합니다.

<Dec 14, 2011 9:51:25 AM GMT+05:30> <Error> <WLSS.Setup> <BEA-331210> <Skip SIP related logic, because error occurs when parsing sip related annotatio 
ns of "DIMeX2" 
com.bea.wcp.sip.engine.server.setup.SipAnnotationParsingException: 
    at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.<init>(SipAnnotationData.java:146) 
    at com.bea.wcp.sip.util.DeploymentUtil.getOrCreateAnnotationData(DeploymentUtil.java:70) 
    at com.bea.wcp.sip.util.DeploymentUtil.isSipModule(DeploymentUtil.java:96) 
    at com.bea.wcp.sip.engine.server.SipServerTailModule$1.visit(SipServerTailModule.java:127) 
    at com.bea.wcp.sip.engine.server.SipServerTailModule.visitAllContexts(SipServerTailModule.java:112) 
    Truncated. see log file for complete stacktrace 
Caused By: java.lang.IncompatibleClassChangeError: class com.sun.codemodel.writer.FilterCodeWriter has interface com.sun.codemodel.CodeWriter as super 
class 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClassCond(Unknown Source) 
    at java.lang.ClassLoader.defineClass(Unknown Source) 
    at java.security.SecureClassLoader.defineClass(Unknown Source) 
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343) 
    Truncated. see log file for complete stacktrace 
> 
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). 
log4j:WARN Please initialize the log4j system properly. 
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 
<Dec 14, 2011 9:51:26 AM GMT+05:30> <Error> <HTTP> <BEA-101216> <Servlet: "dimex" failed to preload on startup in Web application: "/DIMeX2". 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotati 
onHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean w 
ith name 'auditLogController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException 
: Could not autowire field: com.dimex.services.UserService com.dimex.controllers.AuditLogController.userService; nested exception is org.springframewo 
rk.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is or 
g.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dimex.services.client.UserServiceWS_Service]: Constructor th 
rew exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not 
be instantiated: java.lang.ExceptionInInitializerError 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) 
    Truncated. see log file for complete stacktrace 
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditLogController': Injection of autowired depende 
ncies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.dimex.services.UserService co 
m.dimex.controllers.AuditLogController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean w 
ith name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not 
instantiate bean class [com.dimex.services.client.UserServiceWS_Service]: Constructor threw exception; nested exception is java.util.ServiceConfigura 
tionError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.lang.ExceptionInInitializerError 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProc 
essor.java:285) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) 
    Truncated. see log file for complete stacktrace 
Caused By: org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.dimex.services.UserService com.dimex.controllers.Aud 
itLogController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': 
Injection of resource dependencies failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class 
[com.dimex.services.client.UserServiceWS_Service]: Constructor threw exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws 
.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.lang.ExceptionInInitializerError 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostP 
rocessor.java:502) 
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84) 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProc 
essor.java:282) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) 
    Truncated. see log file for complete stacktrace 
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies fa 
iled; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dimex.services.client.UserServic 
eWS_Service]: Constructor threw exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws 
.spi.ProviderImpl could not be instantiated: java.lang.ExceptionInInitializerError 
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:3 
00) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) 
    Truncated. see log file for complete stacktrace 
Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dimex.services.client.UserServiceWS_Service]: C 
onstructor threw exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderIm 
pl could not be instantiated: java.lang.ExceptionInInitializerError 
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141) 
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104) 
    at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$WebServiceRefElement.getResourceToInject(CommonAnnotationBeanPostP 
rocessor.java:627) 
    at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147) 
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84) 
    Truncated. see log file for complete stacktrace 
Caused By: java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.la 
ng.ExceptionInInitializerError 
    at java.util.ServiceLoader.fail(Unknown Source) 
    at java.util.ServiceLoader.access$100(Unknown Source) 
    at java.util.ServiceLoader$LazyIterator.next(Unknown Source) 
    at java.util.ServiceLoader$1.next(Unknown Source) 
    at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146) 
    Truncated. see log file for complete stacktrace 
Caused By: java.lang.ExceptionInInitializerError 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Unknown Source) 
    at java.util.ServiceLoader$LazyIterator.next(Unknown Source) 
    at java.util.ServiceLoader$1.next(Unknown Source) 
    at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146) 
    Truncated. see log file for complete stacktrace 
Caused By: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference. 
    at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:261) 
    at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:257) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:256) 
    at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:90) 
    Truncated. see log file for complete stacktrace 
Caused By: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions 
Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them. 
    this problem is related to the following location: 
     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address 
     at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReferenc 
e.addr 
     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference 
    this problem is related to the following location: 
     at javax.xml.ws.wsaddressing.W3CEndpointReference$Address 
     at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address 
     at javax.xml.ws.wsaddressing.W3CEndpointReference 
Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.namespace to assign different names to them. 
    this problem is related to the following location: 
     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements 
     at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReferen 
ce.referenceProperties 
     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference 
    this problem is related to the following location: 
     at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements 
     at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters 
     at javax.xml.ws.wsaddressing.W3CEndpointReference 

    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102) 
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472) 
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302) 
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140) 
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154) 
    Truncated. see log file for complete stacktrace 
> 

내가 제대로 메트로와 웹 서비스 응용 프로그램을 실행할 수 있어요 특히 내가 뭘 잘못 파악하지 못할.

나는 해결책이없는 날을 같이 보내왔다.

도와주세요. 모든

+0

아직 코멘트가 없습니다 : ( – ashishjmeshram

+0

메트로의 버전이 무엇입니까? – Vadzim

+0

메트로의 @Vadzim 버전은 메트로 2.1입니다. – ashishjmeshram

답변

0

먼저 당신은 당신이 클래스 경로에 동일한 라이브러리의 여러 버전을 가지고있는 것처럼이 보인다

Caused By: java.lang.IncompatibleClassChangeError: class com.sun.codemodel.writer.FilterCodeWriter has interface com.sun.codemodel.CodeWriter as super class

있습니다.

com.sun.codemodel은 JAXB에 속합니다. JAXB API와 구현 jar의 버전이 일치하는지 확인하십시오. 쓸모없는 double을 제거하십시오 (WebLogic에 번들 된 JAXB 포함). 또한 모든 jaxb, jax-ws 및 wsit jars가 latest metro release의 버전과 일치하는지 확인하십시오.

이렇게하면 다음 예외도 해결할 수 있습니다. 그렇지 않은 경우 계속하십시오. 이것은 어떻게 든 두 클래스 W3CEndpointReferenceMemberSubmissionEndpointReference가 같은 공간에서 같은 JAXBContext에의 창조에 참여하는 것을 의미한다

Caused By: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference. at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:261) Caused By: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them. this problem is related to the following location: at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr at com.sun.xml.ws.developer.MemberSubmissionEndpointReference this problem is related to the following location: at javax.xml.ws.wsaddressing.W3CEndpointReference$Address at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address at javax.xml.ws.wsaddressing.W3CEndpointReference

:

는 두 번째로이 관련 인용 양식의 스택 트레이스 있습니다. 실제로이 클래스들은 위의 링크의 끝 부분에서 볼 수있는 코드에서 다른 NSes를 가지고 있습니다. 클라이언트의 wsdl이 xmlns:samens="http://schemas.xmlsoap.org/ws/2004/08/addressing"xmlns:samens="http://www.w3.org/2005/08/addressing" 인 경우이를 검사하십시오. "http://schemas.xmlsoap.org/ws/2004/08/addressing"의 개념을 삭제하는 실험.

아무 도움이되지 않으면 메트로 소스로 디버깅 할 수 있습니다. jaxb 나 metro의 버그 일 수도 있습니다.

하지만 원인은 클래스 경로에 몰래 들어간 JAXB의 이전 네임 스페이스 인식 버전에 있습니다.

관련 문제