Hi, I'm trying to use jersey 1.12 with glassfish 3.1.2 with multiple
virtual hosts and I'm getting the following exception. I have 2 virtual
hosts both of which are running jersey applications. If I request a page
from 1 virtual host only, it works (doesn't matter which) but as soon as
I request a page from the second one (again order is unimportant) the
second immediately fails with the following exception trace. I've tried
to set the system property as mentioned in bug 610, but it doesn't seem
to make any difference...
Any ideas?
Thanks
John
[#|2012-04-05T17:57:32.729+0100|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=21;_ThreadName=Thread-2;|WebModule[/Finance]StandardWrapper.Throwable
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed
for 'com/sun/jersey/config/CDIExtension' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception
is javax.naming.NameNotFoundException: CDIExtension not found]
at
com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:177)
at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:92)
at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
at
com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:574)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:311)
at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:606)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
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:244)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1445)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1072)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:189)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at
com.sun.grizzly.http.ajp.AjpProcessorTask.invokeAdapter(AjpProcessorTask.java:135)
at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:679)
Caused by: javax.naming.NamingException: Lookup failed for
'com/sun/jersey/config/CDIExtension' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception
is javax.naming.NameNotFoundException: CDIExtension not found]
at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at
com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
... 35 more
Caused by: javax.naming.NameNotFoundException: CDIExtension not found
at
com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:248)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:215)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:77)
at
com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:119)
at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:505)
... 37 more
|#]
[#|2012-04-05T17:57:32.731+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=21;_ThreadName=Thread-2;|StandardWrapperValve[Jersey
Servlet]: PWC1382: Allocate exception for servlet Jersey Servlet
javax.naming.NameNotFoundException: CDIExtension not found
at
com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:248)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:215)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:219)
at
com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:77)
at
com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:119)
at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:505)
at
com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at
com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:92)
at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
at
com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:574)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:311)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
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:244)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1445)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1072)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:189)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at
com.sun.grizzly.http.ajp.AjpProcessorTask.invokeAdapter(AjpProcessorTask.java:135)
at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at
com.sun.grizzly.http.ajp.AjpProcessorTask.invokeAdapter(AjpProcessorTask.java:135)
at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:679)
--
www.pricegoblin.co.uk