Java6,JBoss5,Jersey2.6,Servlet-Container2.5 - >接口org.glassfish.jersey.internal.spi.AutoDiscoverable无法实例化:null

时间:2015-09-15 12:50:46

标签: java web-services jersey-2.0 jboss5.x

我将EAR从一个JBoss 5.1服务器移动到另一个,我之前复制了服务器。旧的一切都很好,现在我收到了这个错误,我不明白,它试图告诉我的是什么:

  

[[/ KD-Dokumente]] StandardWrapper.Throwable   org.glassfish.jersey.internal.ServiceConfigurationError:   org.glassfish.jersey.internal.spi.AutoDiscoverable:该类   org.glassfish.jersey.server.internal.monitoring.MonitoringAutodiscoverable   实现提供者接口   org.glassfish.jersey.internal.spi.AutoDiscoverable不可能   实例化:null at   org.glassfish.jersey.internal.ServiceFinder.fail(ServiceFinder.java:397)     在   org.glassfish.jersey.internal.ServiceFinder.access $ 700(ServiceFinder.java:153)     在   org.glassfish.jersey.internal.ServiceFinder $ LazyObjectIterator.hasNext(ServiceFinder.java:711)     在   org.glassfish.jersey.internal.ServiceFinderBinder.configure(ServiceFinderBinder.java:68)     在   org.glassfish.hk2.utilities.binding.AbstractBinder.bind(AbstractBinder.java:171)     在   org.glassfish.hk2.utilities.binding.AbstractBinder.install(AbstractBinder.java:315)     在   org.glassfish.jersey.server.ServerBinder.configure(ServerBinder.java:109)     在   org.glassfish.hk2.utilities.binding.AbstractBinder.bind(AbstractBinder.java:171)     在   org.glassfish.jersey.internal.inject.Injections.bind(Injections.java:157)     在   org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:147)     在   org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:137)     在   org.glassfish.jersey.server.ApplicationHandler。(ApplicationHandler.java:265)     在   org.glassfish.jersey.servlet.WebComponent。(WebComponent.java:262)     在   org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)     在   org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)     在javax.servlet.GenericServlet.init(GenericServlet.java:244)at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)     在   org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)     在   org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)     在   org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)     在   org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)     在   org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     在   org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)     在   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)     在   org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:598)     在   org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:447)     在java.lang.Thread.run(Thread.java:662)引起:   java.lang.Class.cast中的java.lang.ClassCastException(Class.java:2999)     在   org.glassfish.jersey.internal.ServiceFinder $ LazyObjectIterator.hasNext(ServiceFinder.java:654)     ... 30更多14:29:59,214错误[[KD-Dokumente]]分配异常   for servlet KD-Dokumente java.lang.ClassCastException at   java.lang.Class.cast(Class.java:2999)at   org.glassfish.jersey.internal.ServiceFinder $ LazyObjectIterator.hasNext(ServiceFinder.java:654)     在   org.glassfish.jersey.internal.ServiceFinderBinder.configure(ServiceFinderBinder.java:68)     在   org.glassfish.hk2.utilities.binding.AbstractBinder.bind(AbstractBinder.java:171)     在   org.glassfish.hk2.utilities.binding.AbstractBinder.install(AbstractBinder.java:315)     在   org.glassfish.jersey.server.ServerBinder.configure(ServerBinder.java:109)     在   org.glassfish.hk2.utilities.binding.AbstractBinder.bind(AbstractBinder.java:171)     在   org.glassfish.jersey.internal.inject.Injections.bind(Injections.java:157)     在   org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:147)     在   org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:137)     在   org.glassfish.jersey.server.ApplicationHandler。(ApplicationHandler.java:265)     在   org.glassfish.jersey.servlet.WebComponent。(WebComponent.java:262)     在   org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)     在   org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)     在javax.servlet.GenericServlet.init(GenericServlet.java:244)at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)     在   org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)     在   org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)     在   org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)     在   org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)     在   org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     在   org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)     在   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)     在   org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:598)     在   org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:447)     在java.lang.Thread.run(Thread.java:662)

如果有人能翻译它,我会很高兴,我可以想象缺少一个依赖,因为它说'提供者接口org.glassfish.jersey.internal.spi.Auto Discoverable无法实例化:null&#39 ;,所以如果某些东西是空的,它就不存在。

我的web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
    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_2_5.xsd">
    <display-name>KD-Dokumente</display-name>
    <servlet>
        <servlet-name>KD-Dokumente</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>de.pax.kd.webservice.REST</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>KD-Dokumente</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app>

和我的申请类:

public class REST extends Application {

    private TimerTask cloudWatchService = new CloudWatchService();
    private Timer timer = new Timer();
    private final static int oneSecond = 1000;
    private final static int oneMinute = oneSecond * 60;

    public REST() {
        timer.schedule(cloudWatchService, oneSecond * 3, oneMinute);
    }

    @Override
    public Set<Class<?>> getClasses() {
        final Set<Class<?>> resources = new HashSet<Class<?>>();

        // Add your resources.
        resources.add(Versand.class);

        return resources;
    }
}

谢谢。

0 个答案:

没有答案