users@jersey.java.net

Re: [Jersey] Appengine

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 05 May 2009 12:14:01 +0200

Hi Sorin,

Jersey uses by default certain classes available in JDK 6 that are not
available for use on the GAE platform when deployed, essentially sub-
setting the JDK.

The problem here is that Jersey is attempting to look up if EJB
support is available or not via JNDI using
javax.naming.IInitialContext. It has not even got to the point of
enabling EJB support, if the capability is present.

Similar issues also occur for JAXB. So you will not be able to use
JAXB with GAE.

See here for a solution:

http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users+Hacking+Jersey#query
:list%3Anet.java.dev.jersey.users%20Hacking%20Jersey+page:1+mid:ok5q3rsexgrccdzn+state:results


I need to do some work on transforming such functionality into
components, so that if they fail when loaded it will not result in
Jersey applications failing. It is a PITA to do this to work around
such limitations.

Paul.


On May 5, 2009, at 12:29 AM, Sorin Miklós Zsejki wrote:

> What is the status of the compatibility with Google AppEngine? I tried
> to deploy many versions, but every single one generates some error.
> With the latest 1.1.1-ea-SNAPSHOT of today I get:
>
> com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer
> getComponentProviderFactory: Linkage error when configuring to use the
> EJB interceptor binding API. JAX-RS EJB support is disabled.
> java.lang.NoClassDefFoundError: Could not initialize class
> com
> .google
> .apphosting.runtime.security.shared.stub.javax.naming.InitialContext
> at
> com
> .sun
> .jersey
> .server
> .impl
> .ejb
> .EJBComponentProviderFactoryInitilizer
> .getComponentProviderFactory
> (EJBComponentProviderFactoryInitilizer.java:57)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.WebComponent.configure(WebComponent.java:416)
> at com.sun.jersey.spi.container.servlet.ServletContainer
> $InternalWebComponent.configure(ServletContainer.java:235)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.load(WebComponent.java:445)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 281)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 442)
> at javax.servlet.GenericServlet.init(GenericServlet.java:211)
> at
> org
> .mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
> 433)
> at
> org
> .mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:
> 342)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
> at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1093)
> at
> com
> .google
> .apphosting
> .runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
> at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
> at
> com
> .google
> .apphosting
> .utils
> .servlet
> .TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
> at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 360)
> at
> org
> .mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 712)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 405)
> at
> com
> .google
> .apphosting
> .runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
> 237)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 139)
> at org.mortbay.jetty.Server.handle(Server.java:313)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
> at org.mortbay.jetty.HttpConnection
> $RequestHandler.headerComplete(HttpConnection.java:830)
> at
> com
> .google
> .apphosting
> .runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
> 63)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> at
> com
> .google
> .apphosting
> .runtime
> .jetty
> .JettyServletEngineAdapter
> .serviceRequest(JettyServletEngineAdapter.java:125)
> at
> com
> .google
> .apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
> at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:4547)
> at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:4545)
> at
> com
> .google
> .net
> .rpc
> .impl
> .BlockingApplicationHandler
> .handleRequest(BlockingApplicationHandler.java:24)
> at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 359)
> at com.google.net.rpc.impl.Server$2.run(Server.java:792)
> at
> com
> .google
> .tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
>
> Can I disable EJB? I really don't need or want it.
>
> Thanks in advance,
> Sorin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>