开发者

Jersey error on Google App Engine

In my java application I'm using Jersey for REST services. Everything works perfect, but I get this error which consumes a lot of CPU (13830cpu_ms) and freezes the app for few seconds.

com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider: The provider c     
class, class com.sun.jersey.json.impl.provider.entity.JSONArrayProv开发者_JAVA技巧ider$App, 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.JSONArrayProvider$App
    at com.google.appengine.runtime.Request.process-d73c0d822f527031(Request.java)
    at java.lang.Class.getDeclaredMethods(Class.java:252)

Any idea how I can solve this problem?


@Drew Sears: thanks, but the error occurs in Jersey code - not mine so there is no code to show.

Finally I found the problem: I use only the jersey libraries like jersey-core-1.7.jar. This is fine and the application will rund REST services with only this libraries, but if I generate JSON it will search for the jackson library which provides a JSON array provider.

By simple adding the jackson*.jar libs the problem is gone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜