normally no, nothing in the log can help?
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-24 13:51 GMT+01:00 Patel, Sanjay <[email protected]>:
> It worked and does not give that error anymore and also spring beans are 
> injected properly.
>
> But now even though the war is deployed, it gives 404-not-found error and not 
> able to access web-app. Is there anything else needs to be done?
>
> Thanks,
> Sanjay
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:[email protected]]
> Sent: Thursday, March 20, 2014 5:18 PM
> To: [email protected]
> Subject: Re: Name [com] is not bound in this Context. Unable to find [com].
>
> jersey uses by default a custom lookup to get the bean manager 
> (com/sun/something/...), you need to set a system property to use a portable 
> behavior:
> com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-03-20 22:15 GMT+01:00 Patel, Sanjay <[email protected]>:
>> What does this error mean? I don't get this error if I don't use 
>> SpringServlet but in that case the  I have other issues like dependency 
>> injection not working.
>>
>> I have simple spring web application with jersey rest service.
>>
>> Web.xml has,
>>         <!-- Map the REST Servlet to /rest/ -->
>>         <servlet>
>>                 <servlet-name>RestService</servlet-name>
>>                 
>> <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
>>                 <init-param>
>>                         
>> <param-name>com.sun.jersey.config.property.packages</param-name>
>>                         
>> <param-value>org.nemours.perman.rest.resource</param-value>
>>                 </init-param>
>>                 <init-param>
>>                         
>> <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
>>                         <param-value>true</param-value>
>>                 </init-param>
>>                 <load-on-startup>1</load-on-startup>
>>         </servlet>
>>         <servlet-mapping>
>>                 <servlet-name>RestService</servlet-name>
>>                 <url-pattern>/*</url-pattern>
>>         </servlet-mapping>
>>
>> Accessing web application gives below error,
>> javax.naming.NameNotFoundException: Name [com] is not bound in this Context. 
>> Unable to find [com].
>>         org.apache.naming.NamingContext.lookup(NamingContext.java:820)
>>         org.apache.naming.NamingContext.lookup(NamingContext.java:168)
>>         org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
>>         javax.naming.InitialContext.lookup(InitialContext.java:411)
>>         
>> com.sun.jersey.server.impl.cdi.CDIExtension$2.stepInto(CDIExtension.java:290)
>>         
>> com.sun.jersey.server.impl.cdi.CDIExtension.diveIntoJNDIContext(CDIExtension.java:267)
>>         
>> com.sun.jersey.server.impl.cdi.CDIExtension.lookupJerseyConfigJNDIContext(CDIExtension.java:287)
>>         
>> com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
>>         
>> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:92)
>>         
>> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
>>         
>> com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
>>         
>> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
>>         
>> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
>>         
>> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
>>         
>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
>>         
>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
>>         javax.servlet.GenericServlet.init(GenericServlet.java:160)
>>         org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
>>         
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
>>         
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>         
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
>>         
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>         
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>         
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
>>         
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
>>         
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>         
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>         java.lang.Thread.run(Thread.java:722)

Reply via email to