0
을 이끌 나는 reliably get client IP address in CXF JAX-WS 할 수있는 능력이 필요하고 그래서 난 내 웹 서비스에 다음 코드를 추가 수입 :PhaseInterceptorChain와 HttpServletRequest의 AbstractEndpointFactory에 ClassNotFoundException가
import javax.servlet.http.HttpServletRequest;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.PhaseInterceptorChain;
import org.apache.cxf.transport.http.AbstractHTTPDestination;
그리고에 다음 종속성을 추가 내 pom.xml
:
<dependency> <!-- PhaseInterceptorChain & Message -->
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.2.3</version>
</dependency>
<dependency> <!-- HttpServletRequest -->
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<!-- scope>provided</scope -->
</dependency>
012 (!) 나는 결과 성공적으로 빌드를 배포 할 때 3,516,
는하지만, 톰캣 (7.0.42)는 예외를 throw 전쟁 파일을로드 할 거부 ...
org.springframework.beans.factory.BeanDefinitionStoreException:
Unexpected exception parsing XML document from class path resource [beans.xml];
nested exception is org.springframework.beans.FatalBeanException:
Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxws]:
problem with handler class file or dependent class;
nested exception is java.lang.NoClassDefFoundError: org/apache/cxf/endpoint/AbstractEndpointFactory
을
Caused by: org.springframework.beans.FatalBeanException:
Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler]
for namespace [http://cxf.apache.org/jaxws]:
problem with handler class file or dependent class;
nested exception is java.lang.NoClassDefFoundError: org/apache/cxf/endpoint/AbstractEndpointFactory
... 분명히
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.endpoint.AbstractEndpointFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
가 뭔가 런타임에 필요한 모듈을 제공 내
pom.xml
에서 누락되었습니다. 내가 뭘 놓치고 있니?