You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Madhava <ma...@gmail.com> on 2016/03/16 07:36:19 UTC

Not able to call rest webservice in TomEE 1.7.2

I am getting below error.

SEVERE: Allocate exception for servlet JerseyServlet
javax.naming.NameNotFoundException: Name [com] is not bound in this Context.
Unable to find [com].
    at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
    at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
    at javax.naming.InitialContext.lookup(InitialContext.java:411)
    at
com.sun.jersey.server.impl.cdi.CDIExtension$2.stepInto(CDIExtension.java:290)
    at
com.sun.jersey.server.impl.cdi.CDIExtension.diveIntoJNDIContext(CDIExtension.java:267)
    at
com.sun.jersey.server.impl.cdi.CDIExtension.lookupJerseyConfigJNDIContext(CDIExtension.java:287)
    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:572)
    at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
    at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
    at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
    at javax.servlet.GenericServlet.init(GenericServlet.java:158)
    at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
    at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
    at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)


I have defined the servlet in my web.xml as

<servlet>
    <servlet-name>JerseyServlet</servlet-name>
   
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.config.property.packages</param-name>
        <param-value>com.edifixio.osrd.web.mogui.restfulws</param-value>
    </init-param>
   
</servlet>
<servlet-mapping>
    <servlet-name>JerseyServlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

How to make it working with above configuration?

Note: It works well in *weblogic * server and if I /remove /the servlet
declaration in web.xml it works well in Tomee also.
I have asked same question in
http://stackoverflow.com/questions/35770103/tomee-allocate-exception-for-servlet-jersey-serlvet.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-tp4677910.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by MMA <ma...@gmail.com>.
Unfortunately adding this also does not work. I will put the project in
github. Thanks for your time.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677917.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you need to make clear what you want to do:

1. deploy your JAXRS endpoints on a particular path: in this case just
remove jersey from the deployment/container/any other place and use
CXF which is the way to deploy JAXRS services in TomEE
2. use jersey: you need to configure the classloading to use jersey
jaxrs API, this depends the jersey bundle you use and has several
posts on the forum but to be honest if your app is not depending on
jersey anywhere else than in web.xml you would gain time just not
relying on jersey

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-03-17 14:55 GMT+01:00 MMA <ma...@gmail.com>:
> This does not looks to be work  .
>
> May be the issue comes from openEJB CDI is conflicting with the CDI that
> comes with Jersey.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677927.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by MMA <ma...@gmail.com>.
This does not looks to be work  .

May be the issue comes from openEJB CDI is conflicting with the CDI that
comes with Jersey.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677927.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
remove from your webapp and remove the jersey servlet. Just use plain
JAXRS configuration:

<web-app>
    <servlet>
        <display-name>My JAX-RS Servlet</display-name>
        <servlet-name>com.company.MyJaxRsApplication</servlet-name>
        <init-param><!-- optional since servlet-name does it -->
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>com.company.MyJaxRsApplication</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>com.company.MyJaxRsApplication</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
</web-app>

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-03-17 12:58 GMT+01:00 MMA <ma...@gmail.com>:
> Remove jersey means, remove from TomEE_HOME/lib or from maven dependency?
>
> I already have servlet :
>
> <servlet>
>         <servlet-name>jersey-serlvet</servlet-name>
>
>         <servlet-class>
>             com.sun.jersey.spi.container.servlet.ServletContainer
>         </servlet-class>
>
>         <init-param>
>             <param-name>com.sun.jersey.config.property.packages</param-name>
>             <param-value>com.tomee.restfulws</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>jersey-serlvet</servlet-name>
>         <url-pattern>/rest/*</url-pattern>
>     </servlet-mapping>
>
> Works: http://localhost:[PORT_NO]/restfulws/test/sayHi
> Does not work: http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677925.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by MMA <ma...@gmail.com>.
Remove jersey means, remove from TomEE_HOME/lib or from maven dependency?

I already have servlet :

<servlet>
        <servlet-name>jersey-serlvet</servlet-name>

        <servlet-class>
            com.sun.jersey.spi.container.servlet.ServletContainer
        </servlet-class>

        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>com.tomee.restfulws</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>jersey-serlvet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>

Works: http://localhost:[PORT_NO]/restfulws/test/sayHi 
Does not work: http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi 




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677925.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-03-17 12:08 GMT+01:00 MMA <ma...@gmail.com>:
> Yes, there should be jar conflict. But could not find how to resolve the
> issue.
>
> In TomEE I need to call the rest as
> http://localhost:[PORT_NO]/restfulws/test/sayHi but in other sever I need to
> call http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi
>
> So my issue was why TomEE does not allow to call restful ws as
> http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi?
> What is the configuration I need to change?
>

Remove jersey, map a servlet named with your jaxrs Application to
/rest/* and it should do it.

> In TomEE I need to call ws as :
> http://localhost:[PORT_NO]/restfulws/test/sayHi
>
> In Weblogic I need to call:
> http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi
>
> In plain Apache-tomcat-7.0.52 I need to call:
> http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677923.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by MMA <ma...@gmail.com>.
Yes, there should be jar conflict. But could not find how to resolve the
issue.

In TomEE I need to call the rest as
http://localhost:[PORT_NO]/restfulws/test/sayHi but in other sever I need to
call http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi

So my issue was why TomEE does not allow to call restful ws as
http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi?
What is the configuration I need to change?

In TomEE I need to call ws as :
http://localhost:[PORT_NO]/restfulws/test/sayHi

In Weblogic I need to call:
http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi

In plain Apache-tomcat-7.0.52 I need to call:
http://localhost:[PORT_NO]/restfulws/*rest*/test/sayHi



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677923.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

seems it works on tomee 7.0.0-M3 OOTB so can be a jaxrs api conflict.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-03-17 7:14 GMT+01:00 MMA <ma...@gmail.com>:
> Hi,
>
>    I have shared the sample project in github.
>
> Repository location: https://github.com/MadhavaMaiya/TomeeRestfulWs.git
>
> In weblogic server I need to call the rest webservice as
> http://localhost:7101/restfulws/rest/test/sayHi
> But in TomEE I need to call http://localhost:9300/restfulws/test/sayHi to
> work.
> If I try with http://localhost:9300/restfulws/rest/test/sayHi then I am
> getting the exception mentioned above.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677919.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by MMA <ma...@gmail.com>.
Hi,

   I have shared the sample project in github.

Repository location: https://github.com/MadhavaMaiya/TomeeRestfulWs.git

In weblogic server I need to call the rest webservice as
http://localhost:7101/restfulws/rest/test/sayHi
But in TomEE I need to call http://localhost:9300/restfulws/test/sayHi to
work.
If I try with http://localhost:9300/restfulws/rest/test/sayHi then I am
getting the exception mentioned above.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677919.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Maybe add openejb.classloader.forced-load=com.sun.jersey too

If not please reproduce this on github with tomee mvn plugin to let us
investigate further.
Le 16 mars 2016 12:10, "MMA" <ma...@gmail.com> a écrit :

> When I set
> com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true I
> was getting below error.
>
> SEVERE: StandardWrapper.Throwable
> java.lang.IllegalAccessError: tried to access method
>
> com.sun.jersey.server.impl.cdi.CDIExtension.setWebApplication(Lcom/sun/jersey/spi/container/WebApplication;)V
> from class com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory
>         at
>
> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:94)
>         at
>
> com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
>         at
>
> com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
>         at
>
> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
>         at
>
> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
>         at
>
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
>         at
>
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
>         at
>
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:158)
>         at
>
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
>         at
>
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
>         at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
>         at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
>         at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>         at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>         at
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
>         at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>         at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
>         at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
>         at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>         at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
>         at
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677914.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by MMA <ma...@gmail.com>.
When I set com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true I
was getting below error.

SEVERE: StandardWrapper.Throwable
java.lang.IllegalAccessError: tried to access method
com.sun.jersey.server.impl.cdi.CDIExtension.setWebApplication(Lcom/sun/jersey/spi/container/WebApplication;)V
from class com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory
	at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>(CDIComponentProviderFactory.java:94)
	at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
	at
com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:572)
	at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
	at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
	at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
	at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
	at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
	at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
	at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-with-Jersey-Servlet-tp4677910p4677914.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Not able to call rest webservice in TomEE 1.7.2

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Did you set com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
in conf/system.properties? If not jersey will use JNDI in a
proprietary way.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-03-16 7:36 GMT+01:00 Madhava <ma...@gmail.com>:
> I am getting below error.
>
> SEVERE: Allocate exception for servlet JerseyServlet
> javax.naming.NameNotFoundException: Name [com] is not bound in this Context.
> Unable to find [com].
>     at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
>     at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
>     at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
>     at javax.naming.InitialContext.lookup(InitialContext.java:411)
>     at
> com.sun.jersey.server.impl.cdi.CDIExtension$2.stepInto(CDIExtension.java:290)
>     at
> com.sun.jersey.server.impl.cdi.CDIExtension.diveIntoJNDIContext(CDIExtension.java:267)
>     at
> com.sun.jersey.server.impl.cdi.CDIExtension.lookupJerseyConfigJNDIContext(CDIExtension.java:287)
>     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:572)
>     at
> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:312)
>     at
> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:604)
>     at
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
>     at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
>     at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
>     at javax.servlet.GenericServlet.init(GenericServlet.java:158)
>     at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
>     at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
>     at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>     at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
>     at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>     at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
>     at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>     at java.lang.Thread.run(Thread.java:745)
>
>
> I have defined the servlet in my web.xml as
>
> <servlet>
>     <servlet-name>JerseyServlet</servlet-name>
>
> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
>     <init-param>
>         <param-name>com.sun.jersey.config.property.packages</param-name>
>         <param-value>com.edifixio.osrd.web.mogui.restfulws</param-value>
>     </init-param>
>
> </servlet>
> <servlet-mapping>
>     <servlet-name>JerseyServlet</servlet-name>
>     <url-pattern>/rest/*</url-pattern>
> </servlet-mapping>
>
> How to make it working with above configuration?
>
> Note: It works well in *weblogic * server and if I /remove /the servlet
> declaration in web.xml it works well in Tomee also.
> I have asked same question in
> http://stackoverflow.com/questions/35770103/tomee-allocate-exception-for-servlet-jersey-serlvet.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Not-able-to-call-rest-webservice-in-TomEE-1-7-2-tp4677910.html
> Sent from the TomEE Users mailing list archive at Nabble.com.