|
From: Frans v. N. <fra...@gm...> - 2011-03-23 18:31:34
|
This is a bit of a shot in the dark. I see your root context is /history-service but I don't see anything that indicates it being set? On 23 March 2011 15:35, Toby O'Rourke <to...@ga...> wrote: > Hi, > > I'm getting the following errors when I try and hit my resource... > > Could not find resource for relative : /history of full path: http://localhost:8064/history-service/history > > > Relevant snippets below... > > web.xml: > > <web-app> > > <context-param> > <param-name>contextConfigLocation</param-name> > <param-value>classpath:META-INF/applicationContext-web.xml</param-value> > </context-param> > > <listener> > <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> > </listener> > > <listener> > <listener-class>org.jboss.resteasy.plugins.spring.SpringContextLoaderListener</listener-class> > </listener> > > <servlet> > <servlet-name>Resteasy</servlet-name> > <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher > </servlet-class> > </servlet> > > <servlet-mapping> > <servlet-name>Resteasy</servlet-name> > <url-pattern>/*</url-pattern> > </servlet-mapping> > > </web-app> > > -------------------------------- > > applicationContext-web.xml: > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:p="http://www.springframework.org/schema/p" > xmlns:context="http://www.springframework.org/schema/context" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd > http://www.springframework.org/schema/context > http://www.springframework.org/schema/context/spring-context-3.0.xsd"> > > <bean id="RESTeasyProviderFactory" class="org.springframework.web.context.support.ServletContextAttributeFactoryBean"> > <property name="attributeName" value="org.jboss.resteasy.spi.ResteasyProviderFactory" /> > </bean> > > > <bean id="RESTeasyRegistry" class="org.springframework.web.context.support.ServletContextAttributeFactoryBean"> > <property name="attributeName" value="org.jboss.resteasy.spi.Registry" /> > </bean> > > > <bean id="RESTeasyBeanPostProcessor" class="org.jboss.resteasy.plugins.spring.SpringBeanProcessor"> > <constructor-arg ref="RESTeasyRegistry" /> > <constructor-arg ref="RESTeasyProviderFactory" /> > </bean> > > </beans> > > --------------------------------- > > pom.xml: > > ... > > <plugin> > <groupId>org.mortbay.jetty</groupId> > <artifactId>maven-jetty-plugin</artifactId> > <version>6.1.23</version> > <configuration> > <connectors> > <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> > <port>8064</port> > <maxIdleTime>60000</maxIdleTime> > </connector> > </connectors> > </configuration> > </plugin> > ... > <dependencies> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-jaxrs</artifactId> > <version>2.1.0.GA</version> > </dependency> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-jaxb-provider</artifactId> > <version>2.1.0.GA</version> > </dependency> > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-spring</artifactId> > <version>2.1.0.GA</version> > </dependency> > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring-jdbc</artifactId> > <version>3.0.5.RELEASE</version> > </dependency> > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring-web</artifactId> > <version>3.0.5.RELEASE</version> > </dependency> > </dependencies> > > ... > > ------------------------- > > HistoryResource.java: > > @Path("/history") > public interface HistoryResouce { > > @GET > String sayHello(); > } > > ---------------------------- > > HistoryResourceImpl.java: > > public class HistoryResourceImpl implements HistoryResource { > > public String sayHello() { > return String.format("Hello, World!"); > } > } > > > As you can see, this is at the hello world stage at the moment - I'm > stumped! Grateful for any help, > > Cheers, > > Toby. > > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > |