[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Aerogear-dev] resteasy-html provider error



Hi,

 

Just I created a jaxrsactivator, no web.xml.

 

import javax.ws.rs.ApplicationPath;

import javax.ws.rs.core.Application;

 

/**

* A class extending { link Application} and annotated with @ApplicationPath is the Java EE 6

* "no XML" approach to activating JAX-RS.

*

 * <p>

* Resources are served relative to the servlet path specified in the { link ApplicationPath}

* annotation.

* </p>

*/

@ApplicationPath("/rest")

public class JaxRsActivator extends Application{

   /* class body intentionally left blank */

}

 

 

De: Holmquist, Lucas [mailto:LHolmquist mlmic com]
Enviado el: martes, 08 de mayo de 2012 14:19
Para: Juan Luis De Amaya Robles; aerogear-dev redhat com
Asunto: RE: resteasy-html provider error

 

Hi,

Did you add the servlet mapping to your web.xml to activate the REST service.

 

-Luke

 

From: aerogear-dev-bounces redhat com [mailto:aerogear-dev-bounces redhat com] On Behalf Of Juan Luis De Amaya Robles
Sent: Tuesday, May 08, 2012 3:55 AM
To: aerogear-dev redhat com
Subject: [Aerogear-dev] resteasy-html provider error

 

Hi everybody,

 

I’m trying to use the resteasy-html provider in the jboss quickstart html5 example.

 

I just configured a rest service as follows in memberservice.java to test html provider:

 

   @GET

   @Path("/pagejsp")

   @Produces(MediaType.TEXT_HTML)

   public View getPage() {

       Member m = new Member();

       m.setId(1L);

       m.setName("Xxxx");

       View v = new View("/index.jsp",m,"member");      

       return v;

   }

 

And I’ve included pom.xml to include resteasy-html dependency (2.3.2 version, same included jax-rs in jboss 7.1.1)

 

But when I want to test it, the following error occurs:

 

excepción

javax.servlet.ServletException: Servlet.init() para servlet org.jboss.tools.example.html5.rest.JaxRsActivator lanzó excepción

        org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

        org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

        org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

        java.lang.Thread.run(Thread.java:619)

causa raíz

java.lang.RuntimeException: Unable to find a public constructor for class org.jboss.resteasy.core.AsynchronousDispatcher

        org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:35)

        org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:121)

        org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:107)

        org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:84)

        org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:73)

        org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:367)

        org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225)

        org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67)

        org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)

        org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

        org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

        org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

        java.lang.Thread.run(Thread.java:619)

nota La traza completa de la causa de este error se encuentra en los archivos de diario de JBoss Web/7.0.13.Final.

 

Why occurs that? What’s the problem?

 

Thank so much!

 

Juan Luis de Amaya Robles

R&D engineer

jluis deamaya concatel com


Descripción: Descripción: cvteam_sii.jpg


Síguenos en:
Descripción: cid:image001.gif@01CCFAC0.3BB934C0  Descripción: cid:image002.gif@01CCFAC0.3BB934C0  Descripción: cid:image003.gif@01CCFAC0.3BB934C0

Ciutat de la Justícia de Barcelona

Av. Carrilet, 3 - Edificio D, Pl. 10

08902 L’Hospitalet de Llobregat (Barcelona)

Tel.: (+34) 93 567 97 10   
Móvil: (+34) 000 00 00 00 

http://www.concatel.com

http://www.vanture.net

http://www.groupe-sii.com/

 

 


CONFIDENTIALITY NOTICE: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


No se encontraron virus en este mensaje.
Comprobado por AVG - www.avg.com
Versión: 2012.0.1913 / Base de datos de virus: 2425/4984 - Fecha de publicación: 05/07/12


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]