本文介绍了java.lang.ClassNotFoundException:org.codehaus.jackson.map.JsonSerializableWithType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在构建路径中获得了Jackson 2.2.3,但仍然出现此错误。有谁知道为什么?
com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider:提供程序类com.sun.jersey.json.impl.provider .entity.JSONWithPaddingProvider无法实例化。处理将继续,但不会使用该类
java.lang.SecurityException:无法获取com.sun.jersey.json.impl.provider.entity.JSONWithPaddingProvider
的com.google成员。 appengine.runtime.Request.process-244548b7ddf4520b(Request.java)维持在com.sun.jersey.core.reflection.MethodList java.lang.Class.getDeclaredMethods(Class.java:256)
。 getAllDeclaredMethods(MethodList.java:70)
at com.sun.jersey.core.reflection.MethodList。< init>(MethodList.java:64)
at com.sun.jersey.core.spi .component.ComponentConstructor.getPostConstructMethods(ComponentConstructor.java:131)
at com.sun.jersey.core.spi.component.ComponentConstructor。< init>(ComponentConstructor.java:123)
at com。 sun.jersey.core.spi.component.ProviderFactory .__ getComponentProvider(ProviderFactory.java:165)
在com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
在com.sun.je rsey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:256)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:160)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initWriters(MessageBodyFactory.java:207)
在com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:163)
at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1277)
at com.sun.jersey.server.impl.application.WebApplicationImpl.access $ 700(WebApplicationImpl。 java:169)
at com.sun.jersey.server.impl.application.WebApplicationImpl $ 13.f(WebApplicationImpl.java:775)
at com.sun.jersey.server.impl.application.WebApplicationImpl $ 13.f(WebApplicationImpl.java:771)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.server.impl。 application.WebApplicationImpl.initiate(WebApplicationImpl.java:771)在com.sun.jersey.server.impl.application.WebApplicationImpl.initiate
(WebApplicationImpl.java:766)在com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer
。的java:在com.sun.jersey.spi.container.servlet在com.sun.jersey.spi.container.servlet.ServletContainer $ InternalWebComponent.initiate 488)
(ServletContainer.java:318)
。 WebComponent.load(WebComponent.java:609)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
at com.sun.jersey.spi。 container.servlet.ServletContainer.init(ServletContainer.java:373)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
at javax.servlet。 GenericServlet.init(GenericServlet.java:212)
在org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
在org.mortbay.jetty.servlet.ServletHolder.doStart( ServletHolder.java:263)在org.mortbay.component.AbstractLifeCy上
cle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext( Context.java:140)
在org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
在org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
在在com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:442)
$ com.google.tracing.TraceContext TraceContextRunnable.runInContext(TraceContext.java:435)
。在COM。 google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
在com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
。在com.google.tracing.TraceContext $ Abstra ctTraceContextCallback.runInInheritedContext(TraceContext.java:298)在com.google.tracing.TraceContext上
$ TraceContextRunnable.run(TraceContext.java:439)$ b $ java.util.run(Thread.java: 722)
由于:java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43 )
at java.lang.reflect.Method.invoke(Method.java:601)
... 41 more
引起:java.lang.NoClassDefFoundError:org / codehaus / jackson /地图/ JsonSerializableWithType
。在com.google.appengine.runtime.Request.process-244548b7ddf4520b(Request.java)
。在java.lang.ClassLoader.defineClass1(本机方法)
。在java.lang中.ClassLoader.defineClass(ClassLoader.java:794)$ java.util.SecureClassLoader.defineClass(SecureClassLoader.java:142)
在java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
$ b在COM org.codehaus.jackson.map.JsonSerializableWithType
:在sun.reflect.GeneratedMethodAccessor5.invoke(来源不明)
... 43多个
引起的:抛出java.lang.ClassNotFoundException。 google.appengine.runtime.Request.process-244548b7ddf4520b(Request.java)
... 41 more
jackson-mapper-asl 。
您可以在找到它。
I got Jackson 2.2.3 in my buildpath but i still get this error. anyone know why?
com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider: The provider class, class com.sun.jersey.json.impl.provider.entity.JSONWithPaddingProvider, could not be instantiated. Processing will continue but the class will not be utilized
java.lang.SecurityException: Unable to get members for class com.sun.jersey.json.impl.provider.entity.JSONWithPaddingProvider
at com.google.appengine.runtime.Request.process-244548b7ddf4520b(Request.java)
at java.lang.Class.getDeclaredMethods(Class.java:256)
at com.sun.jersey.core.reflection.MethodList.getAllDeclaredMethods(MethodList.java:70)
at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:64)
at com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMethods(ComponentConstructor.java:131)
at com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConstructor.java:123)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:165)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:137)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:256)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:160)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initWriters(MessageBodyFactory.java:207)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:163)
at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1277)
at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:169)
at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:775)
at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:771)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:771)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:766)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
... 41 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonSerializableWithType
at com.google.appengine.runtime.Request.process-244548b7ddf4520b(Request.java)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:794)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
... 43 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonSerializableWithType
at com.google.appengine.runtime.Request.process-244548b7ddf4520b(Request.java)
... 41 more
解决方案
You need to add jackson-mapper-asl
in your classpath.
You can find it here
这篇关于java.lang.ClassNotFoundException:org.codehaus.jackson.map.JsonSerializableWithType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
08-06 08:27