I'm having a problem similar to the one found in
http://sourceforge.net/mailarchive/forum.php?thread_name=1342028968.4904.YahooMailRC%40web83404.mail.sp1.yahoo.com&forum_name=resteasy-users.

I'm running off of a patched 7.1.1 (meaning that RestEasy 2.3.4.Final has
been installed.)

My web.xml is pretty simple:

<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
         version="3.0">

    <resource-ref>
        <res-ref-name>sensorData</res-ref-name>
        <res-type>org.infinispan.manager.CacheContainer</res-type>
    </resource-ref>

</web-app>

"sensorData" is resolved via jboss-web.xml.

My Application class:

package com.redhat.osas.sensor.web;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/provider")
public class MyApplication extends Application {
}

My service:

package com.redhat.osas.sensor.web.external;

import com.redhat.osas.sensor.data.DataPoint;
import org.infinispan.Cache;
import org.infinispan.manager.CacheContainer;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.ArrayList;
import java.util.List;

@Produces(MediaType.APPLICATION_JSON)
public class Provider {
    //@Resource(lookup = "java:comp/env/sensorData")
    private CacheContainer container;

    <K, V> Cache<K, V> getCache(String name) {
        return container.getCache(name);
    }

    @SuppressWarnings("UnusedDeclaration")
    @Path("/data")
    @GET
    public List<DataPoint> getData() {
        List<DataPoint> dataPoints = new ArrayList<>();
        Cache<String, DataPoint> cache = getCache("sensorData");

        // we do this to mangle the device ids for security.
        for (DataPoint oldValue : cache.values()) {
            String newDeviceId =
Integer.toString(oldValue.getDeviceId().hashCode() % 10000);
            DataPoint value = new DataPoint(newDeviceId,
                    oldValue.getLatitude(), oldValue.getLongitude(),
                    oldValue.getLevel(), oldValue.getMaxLevel(),
oldValue.getTimestamp());
            dataPoints.add(value);
        }

        return dataPoints;
    }
}

There's a lot of dreck in these to work through, in the end, but what I'm
trying to do should be pretty simple.

On deployment, this is what I get:

13:05:10,588 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sensor-web]]
(http--127.0.0.1-8080-1) StandardWrapper.Throwable:
java.lang.RuntimeException: Unable to find a public constructor for class
org.jboss.resteasy.core.AsynchronousDispatcher
at
org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:35)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:120)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:106)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:83)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:72)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:367)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
[resteasy-jaxrs-2.3.4.Final.jar:]
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06-icedtea]

I'm... a little lost as to why it's not even deploying.

-- 
Joseph B. Ottinger
http://enigmastation.com
Ça en vaut la peine.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to