1

我想启动一个简单的 Jersey webapp。这是我在尝试访问资源时从 Tomcat 得到的错误。

type Exception report

servlet Jersey REST 服务的消息 Servlet.init() 抛出异常

描述 服务器遇到一个internal error阻止它完成这个请求的问题。

例外

javax.servlet.ServletException:Servlet Jersey REST 服务的 Servlet.init() 抛出异常 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter. java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) org.apache.tomcat.util。 net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(未知来源)

根本原因

java.lang.NullPointerException com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcXmlName(PropertyInfoImpl.java:287) com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcXmlName(PropertyInfoImpl.java :262) com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.getTypes(ElementPropertyInfoImpl.java:96) com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.getTypes(RuntimeElementPropertyInfoImpl.java:50) ) com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.size(ElementPropertyInfoImpl.java:42) java.util.AbstractList$Itr.hasNext(Unknown Source) com.sun.xml.bind.v2.model .impl.ModelBuilder.getClassInfo(ModelBuilder.java:139) com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49) com.sun.xml.bind.v2.model.impl .RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41) com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189) com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.(RegistryInfoImpl.java:63) com .sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232) com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201) com.sun .xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:352) com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:350) java.security.AccessController.doPrivileged (本机方法)com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:349) com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:215) com.sun .xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76) com.sun.xml.bind.v2.ContextFactory。createContext(ContextFactory.java:55) com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(未知来源) sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源) java.lang.reflect.Method.invoke(未知来源) javax.xml.bind.ContextFinder.newInstance(未知来源) javax.xml.bind.ContextFinder.find(未知来源) javax.xml.bind.JAXBContext.newInstance(Unknown Source) javax.xml.bind.JAXBContext.newInstance(Unknown Source) com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.(WadlApplicationContextImpl.java:95) com.sun .jersey.server.impl.wadl.WadlFactory.init(WadlFactory.java:96) com.sun.jersey.server.impl.application.RootResourceUriRules。initWadl(RootResourceUriRules.java:169) com.sun.jersey.server.impl.application.RootResourceUriRules.(RootResourceUriRules.java:106) com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1300 ) com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:163) com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:769) com.sun .jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:765) com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193) com.sun.jersey.server.impl。 application.WebApplicationImpl.initiate(WebApplicationImpl.java:765) com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:760) com.sun.jersey.spi.container.servlet。ServletContainer.initiate(ServletContainer.java:489) com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319) com.sun.jersey.spi.container.servlet.WebComponent.load( WebComponent.java:609) com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) org.apache.coyote.http11。Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(未知来源)

4

0 回答 0