Spring Restlet not working

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Spring Restlet not working

javaxmlsoapdev
<servlet> 
     <servlet-name>techRestApi</servlet-name> 
         <servlet-class>com.noelios.restlet.ext.spring.SpringServerServlet</servlet-class> 
      <init-param> 
                         <param-name>org.restlet.component</param-name> 
                         <param-value>restletComponent</param-value> 
          </init-param> 
        </servlet> 
        <servlet-mapping> 
         <servlet-name>techRestApi</servlet-name> 
         <url-pattern>/techIssueRestResource/*</url-pattern> 
        </servlet-mapping> 
    <servlet> 
      <servlet-name>RestletServlet</servlet-name> 
      <servlet-class> 
         com.noelios.restlet.ext.servlet.ServerServlet  
      </servlet-class> 
   </servlet> 

And in spring bean xml file
component is declared as follow

<bean id="restletComponent" class="org.restlet.ext.spring.SpringComponent"> 
                                <property name="defaultTarget" ref="techRestletApplication" /> 
     </bean>

It keeps throwing
SEVERE: techriskRestApi: [Noelios Restlet Engine] - The ServerServlet couldn't find the target class. Please check that your classpath includes restletComponent
java.lang.ClassNotFoundException: restletComponent
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)

For some reason it's not able to lookup this "restletComponent" bean from spring context.

Any idea?

Thanks,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Spring Restlet not working

jlouvel
Administrator
Hi there,

Were you able to solve this issue? If not, please provide a reproducible
test project and enter a defect report.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : javaxmlsoapdev [mailto:[hidden email]]
Envoyé : mercredi 3 mars 2010 04:09
À : [hidden email]
Objet : Spring Restlet not working

<servlet>  
     <servlet-name>techRestApi</servlet-name>  
       
<servlet-class>com.noelios.restlet.ext.spring.SpringServerServlet</servlet-c
lass>  
      <init-param>  
                         <param-name>org.restlet.component</param-name>  
                         <param-value>restletComponent</param-value>  
          </init-param>  
        </servlet>  
        <servlet-mapping>  
         <servlet-name>techRestApi</servlet-name>  
         <url-pattern>/techIssueRestResource/*</url-pattern>  
        </servlet-mapping>
    <servlet>  
      <servlet-name>RestletServlet</servlet-name>  
      <servlet-class>  
         com.noelios.restlet.ext.servlet.ServerServlet  
      </servlet-class>  
   </servlet>

And in spring bean xml file
component is declared as follow

<bean id="restletComponent" class="org.restlet.ext.spring.SpringComponent">

                                <property name="defaultTarget"
ref="techRestletApplication" />  
     </bean>

It keeps throwing
SEVERE: techriskRestApi: [Noelios Restlet Engine] - The ServerServlet
couldn't find the target class. Please check that your classpath includes
restletComponent
java.lang.ClassNotFoundException: restletComponent
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1358)

For some reason it's not able to lookup this "restletComponent" bean from
spring context.

Any idea?

Thanks,
--
View this message in context:
http://n2.nabble.com/Spring-Restlet-not-working-tp4665282p4665282.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24542
23

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2464884
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Spring Restlet not working

tushmish
This post has NOT been accepted by the mailing list yet.
faced the same problem. played around with it. Here's why it happened.

As described in Using the Restlet servlet within a webapp


<servlet>
  <servlet-name>RestletServlet</servlet-name>
  <servlet-class>org.restlet.ext.spring.SpringServerServlet</servlet-class>
  <init-param>
    <param-name>org.restlet.component</param-name>
    <param-value>RestletComponent</param-value>
  </init-param>
</servlet>


<bean id="RestletComponent" class="org.restlet.Component" />
<bean id="RestletComponentService" class="org.apache.camel.component.restlet.RestletComponent">
  <constructor-arg index="0">
    <ref bean="RestletComponent" />
  </constructor-arg>
</bean>

The problem occurs due to mismatch in the name (RestletComponent) defined in Restlet Servlet and camel context.
Loading...