Brian,

I am doing exactly the same thing.  I followed the blog below and didn't
have any problems.  I hope that this helps.

http://tugdualgrall.blogspot.com/2010/02/create-and-deploy-jax-rs-rest-service.html


On Fri, Apr 2, 2010 at 9:55 AM, Brian <[email protected]> wrote:

> Hi,
> I've run into an issue with JAXB on GAE. I have set up a simple
> project using Jersey to expose a RESTful web service and am using JAXB
> for marshalling/unmarshalling. The project runs fine in my local
> eclipse environment but when I upload to GAE and send a request to the
> web service I am getting a JAXB exception (see stack trace below). I
> am using the latest version of JAXB and the latest version of GAE SDK.
> According to the white list JAXB should now be supported so I'm not
> sure what's going on. Any help to resolve this issue would be greatly
> appreciated.
>
> Uncaught exception from servlet
> java.lang.ExceptionInInitializerError
>        at
>
> com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:
> 79)
>        at
>
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:
> 165)
>        at com.sun.xml.bind.v2.runtime.reflect.Accessor
> $FieldReflection.optimize(Accessor.java:256)
>        at
>
> com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProperty.java:
> 65)
>        at
>
> com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERProperty.java:
> 84)
>        at
>
> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayElementProperty.java:
> 96)
>        at
>
> com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayElementNodeProperty.java:
> 58)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:33)
>        at
>
> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:
> 124)
>        at
>
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:
> 179)
>        at
>
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:
> 515)
>        at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
> 330)
>        at com.sun.xml.bind.v2.runtime.JAXBContextImpl
> $JAXBContextBuilder.build(JAXBContextImpl.java:1140)
>        at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 154)
>        at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 121)
>        at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 202)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:159)
>        at javax.xml.bind.ContextFinder.find(ContextFinder.java:311)
>        at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
>        at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
>        at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
>        at
>
> com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.<init>(WadlApplicationContextImpl.java:
> 66)
>        at
> com.sun.jersey.server.impl.wadl.WadlFactory.init(WadlFactory.java:
> 94)
>        at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl.initWadl(WebApplicationImpl.java:
> 1207)
>        at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:
> 1106)
>        at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:
> 912)
>        at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:
> 589)
>        at
>
> com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:
> 403)
>        at com.sun.jersey.spi.container.servlet.ServletContainer
> $InternalWebComponent.initiate(ServletContainer.java:252)
>        at
> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:
> 550)
>        at
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:
> 201)
>        at
>
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 307)
>        at
>
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 470)
>        at javax.servlet.GenericServlet.init(GenericServlet.java:215)
>        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.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
> 191)
>        at
>
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:
> 168)
>        at
>
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
> 123)
>        at
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
> 243)
>        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5485)
>        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5483)
>        at
>
> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
> 24)
>        at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 398)
>        at com.google.net.rpc.impl.Server$2.run(Server.java:852)
>        at
> com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
> 56)
>        at
>
> com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
> 536)
>        at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
>        at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
>        at
>
> com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
> 442)
>        at
> com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
> 319)
>        at
> com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
> 290)
>        at com.google.net.async.Connection.handleReadEvent(Connection.java:
> 474)
>        at
>
> com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
> 831)
>        at
> com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
> 207)
>        at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
> 103)
>        at
> com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
> 251)
>        at com.google.apphosting.runtime.JavaRuntime
> $RpcRunnable.run(JavaRuntime.java:404)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.SecurityException:
> java.lang.IllegalAccessException: Reflection is not allowed on
> protected final java.lang.Class
> java.lang.ClassLoader.findLoadedClass(java.lang.String)
>        at com.google.appengine.runtime.Request.process-
> f4b7af1ef0914e04(Request.java)
>        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector
> $1.run(Injector.java:156)
>        at com.sun.xml.bind.v2.runtime.reflect.opt.Injector
> $1.run(Injector.java:151)
>        at
> java.security.AccessController.doPrivileged(AccessController.java:
> 34)
>        at
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector.<clinit>(Injector.java:
> 150)
>        ... 73 more
> Caused by: java.lang.IllegalAccessException: Reflection is not allowed
> on protected final java.lang.Class
> java.lang.ClassLoader.findLoadedClass(java.lang.String)
>        ... 77 more
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
Lazar Kirven
http://www.linkedin.com/in/lrkirven

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to