我的 web.xml
文件如下:
<web-app >
<servlet>
<servlet-name>InventoryApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>InventoryApplication</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
</web-app>
端点是什么?
@Component
@Path("/hello")
public class HelloResource {
@GET
public void hello() {
System.out.println("REQUEST RECEIVED");
}
}
当我使用cargo进行部署,命令为
mvn:cargo:run
时,我看到了以下错误:[INFO] [talledLocalContainer] May 03, 2014 5:09:59 PM org.apache.catalina.core.StandardWrapperValve invoke
[INFO] [talledLocalContainer] SEVERE: Allocate exception for servlet com.yahoo.pryme_services.inventory.services.InventoryApplication
[INFO] [talledLocalContainer] java.lang.NoSuchMethodError: org.glassfish.jersey.server.ServerProperties.getValue(Ljava/util/Map;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
[INFO] [talledLocalContainer] at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:315)
[INFO] [talledLocalContainer] at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:169)
[INFO] [talledLocalContainer] at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:359)
[INFO] [talledLocalContainer] at javax.servlet.GenericServlet.init(GenericServlet.java:158)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
[INFO] [talledLocalContainer] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
[INFO] [talledLocalContainer] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
[INFO] [talledLocalContainer] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
[INFO] [talledLocalContainer] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
[INFO] [talledLocalContainer] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
[INFO] [talledLocalContainer] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer]
这是关于什么的?