RE: [Beepcore-java-users] TCPSession.sendFrame: NullPointerException
Status: Beta
Brought to you by:
huston
|
From: Wladimir A. <wa...@ju...> - 2005-12-05 15:13:22
|
I've run into this a couple of times. TCPSession has some race
conditions re the socket manipulation. What I do to avoid these problems
(all but one) is to guarantee that the channel and session cannot be
closed while sending messages (through external locks). Of course, if
the session is closed from the other side there is nothing we can do. In
this case, the NullPointerException kills the TCPSEssion thread (created
inside enableIO()).
Fixing these problems is not trivial (chance of distributed deadlock),
so I decided it was easier to live with them ;-)
Wladimir=20
-----Original Message-----
From: bee...@li...
[mailto:bee...@li...] On Behalf Of
Lukas Zbinden
Sent: Monday, December 05, 2005 6:21 AM
To: bee...@li...
Subject: [Beepcore-java-users] TCPSession.sendFrame:
NullPointerException
Hi
We use the beepcore java library in our diploma project 'a =20
collaborative editor'.
When two users collaboratively edit a document, each character is sent =20
over a channel by a call to
myChannelImplInstance.sendMSG(outputData, myReplylistener).
Both sides use the same channel. After a while (both users type very =20
fast, i.e.
channel.sendMSG(..) is called at a high rate), the following exception =20
occurs:
Caused by: java.lang.NullPointerException
at =20
org.beepcore.beep.transport.tcp.TCPSession.sendFrame(TCPSession.java:=20
291)
at =20
org.beepcore.beep.core.ChannelImpl.sendFrames(ChannelImpl.java:837)
at =20
org.beepcore.beep.core.ChannelImpl.sendQueuedMessages(ChannelImpl.java:=20
773)
at =20
org.beepcore.beep.core.ChannelImpl.sendToPeer(ChannelImpl.java:754)
at =20
org.beepcore.beep.core.ChannelImpl.sendMSG(ChannelImpl.java:414)
at =20
ch.iserver.ace.net.impl.protocol.AbstractConnection.send(AbstractConnect
ion.java:77)
at =20
ch.iserver.ace.net.impl.protocol.ParticipantConnectionImpl.sendToPeer(Pa
rticipantConnectionImpl.java:261)
at =20
ch.iserver.ace.net.impl.protocol.ParticipantConnectionImpl.sendRequest(P
articipantConnectionImpl.java:157)
at =20
ch.iserver.ace.collaboration.jupiter.server.ParticipantConnectionWrapper
.sendRequest(ParticipantConnectionWrapper.java:177)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at =20
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at =20
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
AopUtils.java:335)
at =20
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinp
oint(ReflectiveMethodInvocation.java:181)
at =20
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:148)
at =20
ch.iserver.ace.util.AsyncMethodInvocation.proceed(AsyncMethodInvocation.
java:100)
at ch.iserver.ace.util.AsyncWorker.doWork(AsyncWorker.java:102)
at ch.iserver.ace.util.Worker.run(Worker.java:49)
Does anyone know this problem? Is it a bug or do I use the channel the =20
wrong way?
Any help highly appreciated.
Lukas
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
_______________________________________________
Beepcore-java-users mailing list
Bee...@li...
https://lists.sourceforge.net/lists/listinfo/beepcore-java-users
|