Skip to main content

LexerCore Parse Error

5 replies [Last post]
spiroket
Offline
Joined: 2008-04-18
Points: 0

Hi,

I 'm working on ThirdPartyCC code to make a sip call using mobicents. But when I try to establish call I get an error message in server.log. Here it is:

Unexpected Token : SIP
java.text.ParseException: SIP/2.0 100 Trying

Unexpected Token : SIP
at gov.nist.core.LexerCore.match(LexerCore.java:229)
at gov.nist.javax.sip.parser.Parser.sipVersion(Parser.java:57)
at gov.nist.javax.sip.parser.RequestLineParser.parse(RequestLineParser.java:64)
at gov.nist.javax.sip.parser.StringMsgParser.processFirstLine(StringMsgParser.java:347)
at gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:179)
at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:296)
at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:255)
at java.lang.Thread.run(Thread.java:619)
2008-04-18 17:24:29,908 ERROR [STDERR] java.lang.NullPointerException
2008-04-18 17:24:29,908 ERROR [STDERR] at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:683)
2008-04-18 17:24:29,908 ERROR [STDERR] at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:323)
2008-04-18 17:24:29,923 ERROR [STDERR] at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:255)
2008-04-18 17:24:29,923 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
2008-04-18 17:24:29,923 ERROR [SipResourceAdapter_47.168.55.38_7888] Error while processing incoming UDP packet
java.lang.NullPointerException
at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:683)
at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:323)
at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:255)
at java.lang.Thread.run(Thread.java:619)
2008-04-18 17:24:33,908 ERROR [SipResourceAdapter_47.168.55.38_7888] BYE sip:nt3pcc@mobi SIP/2.0

I should explain that I get this error for 200 OK, BYE and also 180 Ringing. Is there any body solved this kind of issue?

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
karaer
Offline
Joined: 2009-11-03
Points: 0

dear spiroket, i am facing the same problem now, and i need figure out a way urgently, i tried on different pcs, it didn't work. Could you plz help me about this?

alexandrem
Offline
Joined: 2005-10-19
Points: 0

Hi,

Please provide the Mobicents product and version you are using plus the stacktrace so it can be verified.

Regards,
Alexandre Mendonca
JBoss R&D

karaer
Offline
Joined: 2009-11-03
Points: 0

Hi,

I need to provide instant messaging between two sip clients. I am new to this subject, there is a java client code in the internet, something called as TextClient.java which has 3 source codes inside: MessageProcessor.java, SipLayer.java and TextClient.java. It's also available here: http://www.oracle.com/technology/pub/articles/dev2arch/2007/10/introduct... or here: http://www.maretzke.de/pub/howtos/sip_im/HowTo_SIPIM_Android_MiMa_v1.0_2...

It seems it's possible to send message P2P between 2 sip clients, but somehow i can't.
The sender sends the message but the recipient says that there's problem at:

]]>

]
DEBUG - gov.nist.javax.sip.stack.ServerLog.logMessage(ServerLog.java:339) []
DEBUG - gov.nist.javax.sip.stack.ServerLog.logMessage(ServerLog.java:340) [ DEBUG - gov.nist.javax.sip.SipProviderImpl.sendRequest(SipProviderImpl.java:691) [done sending MESSAGE to hop 127.0.0.1:5061/udp]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:284) [UDPMessageChannel: peerAddress = 127.0.0.1/5062]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:288) [Length = 385]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:290) [MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0
Call-ID: 04788acf640d0eb2c764262b54c874f6@127.0.0.1
CSeq: 1 MESSAGE
From: "tules" ;tag=sip-im-awt_v1.0
To: "mina"
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=branch1
Max-Forwards: 70
Contact: "tules"
Content-Type: text/plain
Content-Length: 2

ol]
ERROR - MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP
java.text.ParseException: MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP
at gov.nist.core.LexerCore.match(LexerCore.java:229)
at gov.nist.javax.sip.parser.Parser.sipVersion(Parser.java:57)
at gov.nist.javax.sip.parser.RequestLineParser.parse(RequestLineParser.java:64)
at gov.nist.javax.sip.parser.StringMsgParser.processFirstLine(StringMsgParser.java:352)
at gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:180)
at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:296)
at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:255)
at java.lang.Thread.run(Unknown Source)
ERROR - gov.nist.javax.sip.stack.UDPMessageChannel.handleException(UDPMessageChannel.java:556) [BAD MESSAGE!]
ERROR - gov.nist.javax.sip.stack.UDPMessageChannel.handleException(UDPMessageChannel.java:557) [null]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:301) [Rejecting message ! MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0
Call-ID: 04788acf640d0eb2c764262b54c874f6@127.0.0.1
CSeq: 1 MESSAGE
From: "tules" ;tag=sip-im-awt_v1.0
To: "mina"
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=branch1
Max-Forwards: 70
Contact: "tules"
Content-Type: text/plain
Content-Length: 2

ol]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:303) [error message MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP]
ERROR - MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP
java.text.ParseException: MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP
at gov.nist.core.LexerCore.match(LexerCore.java:229)
at gov.nist.javax.sip.parser.Parser.sipVersion(Parser.java:57)
at gov.nist.javax.sip.parser.RequestLineParser.parse(RequestLineParser.java:64)
at gov.nist.javax.sip.parser.StringMsgParser.processFirstLine(StringMsgParser.java:352)
at gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:180)
at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:296)
at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:255)
at java.lang.Thread.run(Unknown Source)
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:308) [MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0
Call-ID: 04788acf640d0eb2c764262b54c874f6@127.0.0.1
CSeq: 1 MESSAGE
From: "tules" ;tag=sip-im-awt_v1.0
To: "mina"
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=branch1
Max-Forwards: 70
Contact: "tules"
Content-Type: text/plain
Content-Length: 2

ol]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:319) [Sending automatic 400 Bad Request:]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:320) [SIP/2.0 400 Bad Request (MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP)
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=branch1
CSeq: 1 MESSAGE
Call-ID: 04788acf640d0eb2c764262b54c874f6@127.0.0.1
From: "tules" ;tag=sip-im-awt_v1.0
To: "mina"
Server: sip-im
]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:677) [gov.nist.javax.sip.stack.UDPMessageChannel:sendMessage 127.0.0.1/0
SIP/2.0 400 Bad Request (MESSAGE sip:mina@127.0.0.1:5061;transport=udp SIP/2.0

Unexpected Token : SIP)
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=branch1
CSeq: 1 MESSAGE
Call-ID: 04788acf640d0eb2c764262b54c874f6@127.0.0.1
From: "tules" ;tag=sip-im-awt_v1.0
To: "mina"
Server: sip-im
]
DEBUG - gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:680) [*******************
]
ERROR - Error while processing incoming UDP packet
java.lang.NullPointerException
at gov.nist.javax.sip.stack.UDPMessageChannel.sendMessage(UDPMessageChannel.java:683)
at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:323)
at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:255)
at java.lang.Thread.run(Unknown Source)

spiroket
Offline
Joined: 2008-04-18
Points: 0

Thanks for your reply. But I checked all the headers and they are as they should be. I tested the same code on another PC. I think it is related with dual-core processor. Because I tested correctly on single-processor but it does not work either on another dual-core PC. Someone says that it is related with lazy initialization of LexerCore, I mean it is not synchronized.

baranowb
Offline
Joined: 2006-01-09
Points: 0

Saw that one too many times.
I think one of the headers has wrong value - possibly Via has branch parameter set or wrong value, also see what tags are stored there.