On Mar 14, 2008, at 6:46 PM, Stephan Janssen wrote:
>
> I've just tried the REST Customer Database example in Netbeans 6.0
> with the latest release of Jersey 0.6.
> Normally I use IntelliJ, Tomcat, Restlet and Spring, so I'm new to
> the above setup but want to give it a try...
>
> The CustomerDB example project compiles nicely, however when I
> deploy the project on Glassfish v2 (and V2 UR1)
> I'm getting a stack trace (see below), which is not a nice first
> impression :(
>
> Do I need to configure a JMS destination which is used by the
> Jersey / Grizzly servlet ? Suggestions are welcome.
>
I think this is a result of using @Resource without a matching JNDI
entry - no need to add a JMS destination or anything. We are switching
to using our own annotation instead of @Resource in the next cut of
the JSR API and that will eliminate this issue.
> Second question, what is the status now on injecting Spring beans in
> a Restful (Jersey-enabled) Resource,
> some pointers (or example code) would be welcome.
>
I'll leave that question for those currently working on this.
Marc.
> ---
> NAM0006: JMS Destination object not found:
> com.sun.ws.rest.impl.container.servlet.JSPTemplateProcessor/
> servletContext
> javax.naming.NameNotFoundException
> javax.naming.NameNotFoundException
> at
> com
> .sun
> .enterprise
> .naming.TransientContext.resolveContext(TransientContext.java:268)
> at
> com
> .sun.enterprise.naming.TransientContext.lookup(TransientContext.java:
> 191)
> at
> com
> .sun
> .enterprise
> .naming
> .SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
> at
> com
> .sun
> .enterprise
> .naming
> .LocalSerialContextProviderImpl
> .lookup(LocalSerialContextProviderImpl.java:111)
> at
> com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at
> com
> .sun
> .enterprise
> .naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:391)
> at com.sun.enterprise.web.WebModuleContextConfig.configureResource
> (WebModuleContextConfig.java:220)
> at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent
> (WebModuleContextConfig.java:161)
> at
> org
> .apache
> .catalina
> .util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:143)
> at
> org.apache.catalina.core.StandardContext.init(StandardContext.java:
> 6350)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> 4848)
> at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
> at
> org
> .apache
> .catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
> 957)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
> at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:
> 1584)
> at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:
> 1222)
> at
> com
> .sun
> .enterprise
> .server
> .WebModuleDeployEventListener
> .moduleDeployed(WebModuleDeployEventListener.java:182)
> at
> com
> .sun
> .enterprise
> .server
> .WebModuleDeployEventListener
> .moduleDeployed(WebModuleDeployEventListener.java:278)
> at
> com
> .sun
> .enterprise
> .admin
> .event
> .AdminEventMulticaster
> .invokeModuleDeployEventListener(AdminEventMulticaster.java:974)
> at
> com
> .sun
> .enterprise
> .admin
> .event
> .AdminEventMulticaster
> .handleModuleDeployEvent(AdminEventMulticaster.java:961)
> at
> com
> .sun
> .enterprise
> .admin
> .event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:
> 464)
> at
> com
> .sun
> .enterprise
> .admin
> .event
> .AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
> at
> com
> .sun
> .enterprise
> .admin
> .server
> .core
> .DeploymentNotificationHelper
> .multicastEvent(DeploymentNotificationHelper.java:308)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing
> .DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:
> 226)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing
> .ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:
> 298)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:
> 132)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing.PEDeploymentService.executePhases(PEDeploymentService.java:
> 919)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing.PEDeploymentService.start(PEDeploymentService.java:591)
> at
> com
> .sun
> .enterprise
> .deployment
> .phasing.PEDeploymentService.start(PEDeploymentService.java:635)
> at
> com
> .sun
> .enterprise
> .admin
> .mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:
> 744)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com
> .sun
> .enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:
> 375)
> at
> com
> .sun
> .enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:
> 358)
> at
> com
> .sun
> .enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:
> 464)
> at
> com
> .sun
> .jmx
> .interceptor
> .DefaultMBeanServerInterceptor
> .invoke(DefaultMBeanServerInterceptor.java:836)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown
> Source)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com
> .sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
> at $Proxy1.invoke(Unknown Source)
> at
> com
> .sun
> .enterprise
> .admin
> .server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
> at
> com
> .sun
> .enterprise
> .interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
> at
> com
> .sun
> .enterprise
> .admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:
> 69)
> at
> com
> .sun
> .enterprise
> .admin
> .jmx
> .remote
> .server
> .MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
> at
> com
> .sun
> .enterprise
> .admin
> .jmx
> .remote
> .server
> .servlet
> .RemoteJmxConnectorServlet
> .processRequest(RemoteJmxConnectorServlet.java:122)
> at
> com
> .sun
> .enterprise
> .admin
> .jmx
> .remote
> .server
> .servlet
> .RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:
> 738)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:
> 831)
> at
> org
> .apache
> .catalina
> .core
> .ApplicationFilterChain.servletService(ApplicationFilterChain.java:
> 411)
> at
> org
> .apache
> .catalina
> .core
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 317)
> at
> org
> .apache
> .catalina
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
> (MonitorFilter.java:196)
> at
> org
> .apache
> .catalina
> .core
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 230)
> at
> org
> .apache
> .catalina
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 288)
> at
> org
> .apache
> .catalina
> .core.StandardContextValve.invokeInternal(StandardContextValve.java:
> 271)
> at
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 202)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org
> .apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 571)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 150)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org
> .apache
> .catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org
> .apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 571)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
> 272)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
> (DefaultProcessorTask.java:637)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess
> (DefaultProcessorTask.java:568)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process
> (DefaultProcessorTask.java:813)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
> (DefaultReadTask.java:341)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask
> (DefaultReadTask.java:263)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask
> (DefaultReadTask.java:214)
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:
> 265)
> at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run
> (WorkerThreadImpl.java:116)
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.