Exception.[qtp24109300-37] : /my-first-app/SipSessionCreator: j ava.lang.IllegalStateException: CallSession 66f9c291@kod-lap-70 is not locked by thread Thread[qtp24 109300-37,5,main]

12 views
Skip to first unread message

Vigneshwaran Selvaraj

unread,
Jan 25, 2012, 10:52:06 AM1/25/12
to cipango-users
Hi All,
We have a written a small HttpServlet that will create a converged
session from http session and invoke a sip servlet to send register
message by passing the application session reference.
We are able to send register and receive 200 ok response.
On receiving 200 ok response in Sipservlet, we display a log out page
on clicking logout button we want trigger unregister message to be
sent.
But when we post to request from page to httpservlet on click we face
below exception.

2012-01-25 19:58:04,921 WARN log [qtp24109300-37] : /my-
first-app/SipSessionCreator: java.lang.IllegalStateException:
CallSession 66f9c291@kod-lap-70 is not locked by thread Thread[qtp24
109300-37,5,main]

We are posting to the same servlet that created the initial converged
session.

Please help us..

Thomas

unread,
Feb 6, 2012, 5:14:06 AM2/6/12
to cipang...@googlegroups.com
Hi,

This exception occurs when a SIP operation is performed from a non SIP managed thread. In most cases, an automatic lock is done though.
Could you send us the whole stacktrace to find out what SIP operation was attempted ?

Thanks,

Thomas

> --
> You received this message because you are subscribed to the Google Groups "cipango-users" group.
> To post to this group, send email to cipang...@googlegroups.com.
> To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cipango-users?hl=en.
>

Vigneshwaran Selvaraj

unread,
Feb 7, 2012, 12:29:37 AM2/7/12
to cipango-users
Hi Thanks for the reply
Below is our stack trace.
completing Continuation...
continuation complete::loginwait
{"SOCKET_MM_IP_ADDR":"192.168.3.67","RESPONSE_STATUS":"200
OK","SOCKET_PORT":"8080"}
java.lang.Exception
at org.cipango.server.session.SessionManager
$CSession.assertLocked(SessionManager.java:715)
at org.cipango.server.session.SessionManager
$CSession.cancel(SessionManager.java:492)
at
org.cipango.server.session.AppSession.access(AppSession.java:447)
at org.cipango.http.servlet.ConvergedSessionManager
$Session.access(ConvergedSessionManager.j
ava:160)
at
org.eclipse.jetty.server.session.AbstractSessionManager.access(AbstractSessionManager.jav
a:111)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:
163)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:
864)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:
117)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection
.java:247)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:
114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:
596)
at org.eclipse.jetty.server.HttpConnection
$RequestHandler.content(HttpConnection.java:1068)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:
805)
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:
426)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:
508)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access
$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint
$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool
$2.run(QueuedThreadPool.java:451)
at java.lang.Thread.run(Unknown Source)
2012-02-07 10:51:27.996:WARN::/my-first-app/SipSessionCreator:
java.lang.IllegalStateException: Call
Session d921c0e2@kod-lap-70 is not locked by thread
Thread[qtp23503403-52,5,main]

Our flow is code is as below,
Incoming request lands on Login Servlet.
Login Servlet creates Application session as below,

chs = (ConvergedHttpSession)request.getSession();
String urlAttrib = (chs.encodeURL("/SipSessionCreator", "http"));
System.out.println("Encoded URL.."+urlAttrib);
request.getSession().setAttribute("URL", urlAttrib);
sas = chs.getApplicationSession(); "
Now this application session is passed to sip servlet to send out
register, we used the ClickToDial example of cipango and same way we
invoked a method on sip servlet to send out register,

After invoking a method on sip servlet, the HTTP servlet waits for 200
OK, this is implemented based on jetty's continuation framework.

Once 200 OK is recieved Sip Servlet notifies the HTTP servlet on
register success.

Thomas

unread,
Feb 9, 2012, 4:54:09 AM2/9/12
to cipang...@googlegroups.com
Hi Selvaraj,

This issue has been fixed, you may try using the cipango trunk.

Regards,

Thomas

Vignesh

unread,
Feb 14, 2012, 4:29:35 AM2/14/12
to cipang...@googlegroups.com
Thanks.. it worked fine with the latest cipango trunk
Reply all
Reply to author
Forward
0 new messages