2013-09-25 4 views
0

내 GAE 로그에서이 오류가 발생합니다. 나는 그것을 봤고 나는 다음을 시도했지만 그들은 문제를 해결하지 못했습니다. 저지와 함께 jackson 2.0을 사용하고 있습니다. 잭슨 병을 최신 버전으로 업데이트하려고했지만 도움이되지 않았습니다.java.lang.ClassNotFoundException : org.codehaus.jettison.json.JSONException

  1. 어떤 아이디어가 모든 잭슨 항아리 (코어, 데이터 바인딩 및 주석) 다른

누구나 rome1.0.jar 포함 web.xml을

  • 에서
  • 장애인 DisableWADL 교체?

    com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider: The provider class, class com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General, 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.JSONObjectProvider$General 
        at com.google.appengine.runtime.Request.process-3e0d19a979182c6d(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/jettison/json/JSONException 
        at java.lang.Class.getDeclaredMethods0(Native Method) 
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2447) 
        ... 41 more 
    Caused by: java.lang.ClassNotFoundException: org.codehaus.jettison.json.JSONException 
        at com.google.appengine.runtime.Request.process-3e0d19a979182c6d(Request.java) 
        ... 41 more 
    
  • +0

    클래스 패스에 'jettison .jar'이 있습니까? –

    답변

    2

    WEB-INF/lib에 jettison jar를 추가하십시오.

    +0

    빌드 경로 또는 lib 폴더에 추가해야합니까? – code511788465541441

    +0

    프로젝트에서 다른 병 (잭슨, 로마 등)과 같은 방식으로 제티슨 병을 다루어야한다고 말하고 싶습니다. – Jiji

    1

    실제로 Jettison jar를 추가하는 대신 Jettison 기반 데이터 바인딩을 사용하지 않아야합니다. POJO 매핑이나 Jackson에서는 필요하지 않습니다. 그래서 그것에 대한 당신의 의존성은 우발적 일 수 있습니다. 병을 추가하는 것은 실제 문제를 가리는 것입니다.

    +0

    좀 더 자세히 설명해 주시겠습니까? 저는 Jackson을 사용하고 있다고 가정 할 수 있습니다.하지만 계속해서 배포가 중단됩니다. 실수로 설정되지 않도록하려면 어떻게해야합니까? 감사합니다. – Frank

    +0

    @ 프랭크 이것은 오히려 고대의 질문입니다. 원저자는 Jackson을 사용하지 않았습니다. 스택 추적은 org.json 패키지 기반 공급자를 보여줍니다. 나는 그것이 어떻게 구성 되었는가, 또는 있어야만 하는지를 모른다. 그러나 그는 잭슨에있는 공급자를 사용하지 않고 있었다. 마찬가지로 당신이 무엇을하고 있는지 알지 못하지만 적합한 JSON 공급자를 선택하는 방법에 대한 Jersey 문서를 읽어야합니다. – StaxMan

    +0

    답변을 주셔서 감사합니다. – Frank

    관련 문제