Export to GitHub

sipservlets - issue #187

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


Posted on Jan 3, 2013 by Swift Wombat

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)

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

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

  3. 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.

Attachments

Comment #1

Posted on Jul 5, 2013 by Massive Wombat

(No comment was entered for this change.)

Comment #2

Posted on Sep 2, 2013 by Swift Ox

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

Comment #4

Posted on Apr 29, 2014 by Massive Wombat

(No comment was entered for this change.)

Comment #5

Posted on Aug 25, 2014 by Grumpy Bear

(No comment was entered for this change.)

Status: WontFix

Labels:
Type-Defect Priority-Medium Component-Sip-Servlets Roadmap-Fix MSS-2.1.0.FINAL