JohnFord / sipservlets

Automatically exported from code.google.com/p/sipservlets
0 stars 0 forks source link

Using REST service and Sip Servlets in one project is leading to an Exception, if also Injection via EJB is used #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Problem:
Using REST service and Sip Servlets in one project is leading to an Exception, 
if also Injection via EJB is used.

What steps will reproduce the problem?
1. Adding a Sip Servlet and REST service in the project
(REST service is activated via a class extending Application and annotated with 
@ApplicationPath, which is the Java EE 6 "no XML" approach activating JAX-RS)

2. Using the REST service and/or Sip servlet will not produce any errors.

3. Add an injected service via @EJB to the project.

4. Using the REST service results in following exception:

Exception sending request destroyed lifecycle event to listener instance of 
class org.jboss.weld.servlet.WeldListener: java.lang.NullPointerException
    at org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:71) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]
    at org.jboss.weld.context.http.HttpRequestContextImpl.deactivate(HttpRequestContextImpl.java:86) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]
    at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:103) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) [jbossweb-7.0.16.Final.jar:]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final.jar:]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final.jar:]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final.jar:]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final.jar:]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final.jar:]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final.jar:]
    at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37]

What version of the product are you using? On what operating system?

Mobicents: mss-2.0.0.FINAL-jboss-as-7.1.2.Final
OS: Mac OS X 10.6.8

Please provide any additional information below.

An example project is attached. (And also the war file is attached)

There is a Test file in src/test/java which is calling the deployed REST 
service. In the original project this should result in the error above.
If the Sip Servlet is not activated (e.g. by renaming sip.xml) no error occurs 
on calling the REST service.
If the Sip Servlet is activated and the injected service HelloWorldService is 
removed there is also no error calling the REST service.

Original issue reported on code.google.com by alexande...@fokus.fraunhofer.de on 3 Jan 2013 at 1:31

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jean.deruelle on 5 Jul 2013 at 7:44

GoogleCodeExporter commented 8 years ago
Reported in this message

https://groups.google.com/forum/#!topic/mobicents-public/Dw-hDU9ycv0

to be related to a Weld bug fixed in Weld 2.0, requiring upgrade to Wildfly:

https://issues.jboss.org/browse/WELD-1020

Original comment by josemre...@gmail.com on 2 Sep 2013 at 2:12

GoogleCodeExporter commented 8 years ago
http://stackoverflow.com/questions/15545888/mobicent-ejb-injection-in-a-sip-serv
let-rest-service-project

Original comment by jean.deruelle on 1 Oct 2013 at 2:03

GoogleCodeExporter commented 8 years ago

Original comment by jean.deruelle on 29 Apr 2014 at 5:26

GoogleCodeExporter commented 8 years ago

Original comment by jean.der...@telestax.com on 25 Aug 2014 at 10:53