Closed nhanth87 closed 8 years ago
Hi Tran,
Hmmm, that looks like it's actually just complaining about the request containing invalid XML?
Can you provide more detailed information about exactly what you're trying? What's your request XML?
There are indeed some relevant XSD files here: gmlc/core/slee/sbbs/src/main/config
There are referenced by jibx here: gmlc/core/slee/sbbs/pom.xml
<configuration>
<includeSchemas>
</includeSchemas>
</configuration>
Now I did at one point convert those from DTD files, so the DTDs do exist, but in my testing they weren't required and everything worked fine without them, although I suppose it's possible something in the jibx error handling might be trying to find them it seems.
Cheers, Andrew
On Mon, Feb 22, 2016 at 3:10 AM, Tran Huu Nhan notifications@github.com wrote:
MLP required jibx to convert xsd to object. However something missing that it can't file xsd object and refer to dtd (which is not correct)
11:56:12,405 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 Error parsing document (line 1, col 40) 11:56:12,406 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 com.ctc.wstx.exc.WstxParsingException: (was java.io.FileNotFoundException) /nhan/data/TELESTAX/restcomm-slee-2.8.33.70/ jboss-5.1.0.GA/bin/MLP_SVC_INIT_310.dtd at [row,col {unknown-source}]: [1,88] 11:56:12,406 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630) 11:56:12,406 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461) 11:56:12,406 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.ValidatingStreamReader.findDtdExtSubset(ValidatingStreamReader.java:475) 11:56:12,406 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.ValidatingStreamReader.finishDTD(ValidatingStreamReader.java:358) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.BasicStreamReader.skipToken(BasicStreamReader.java:3349) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1988) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.jibx.runtime.impl.StAXReaderWrapper.next(StAXReaderWrapper.java:293) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.jibx.runtime.impl.UnmarshallingContext.toStart(UnmarshallingContext.java:446) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2750) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.mobicents.gmlc.slee.mlp.MLPRequest.parseRequest(MLPRequest.java:47) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.mobicents.gmlc.slee.MobileCoreNetworkInterfaceSbb.onPost(MobileCoreNetworkInterfaceSbb.java:298) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at java.lang.reflect.Method.invoke(Method.java:606) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityImpl.java:479) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQueuedEvent(EventRoutingTaskImpl.java:379) 11:56:12,407 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(EventRoutingTaskImpl.java:126) 11:56:12,408 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl$EventRoutingTaskStatsCollector.run(EventRouterExecutorImpl.java:72) 11:56:12,408 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 11:56:12,408 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 11:56:12,408 ERROR STDERR http://SLEE-EventRouterExecutor-3-thread-1 at java.lang.Thread.run(Thread.java:745) 11:56:12,408 INFO MobileCoreNetworkInterfaceSbb http://SLEE-EventRouterExecutor-3-thread-1 Exception while unmarshalling XML request data: Error parsing document (line 1, col 40) 11:56:12,408 INFO MobileCoreNetworkInterfaceSbb http://SLEE-EventRouterExecutor-3-thread-1 Generated response XML: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svc_result SYSTEM "MLP_SVC_RESULT_310.DTD">
FORMAT ERROR Invalid XML received: Error parsing document (line 1, col 40)
— Reply to this email directly or view it on GitHub https://github.com/RestComm/gmlc/issues/12.
Hi Andrew, Nice to meet you here,
The problem happen just by sending a MLP request: Create a request file demo.txt with content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svc_init SYSTEM "MLP_SVC_INIT_310.dtd">
<svc_init xmlns="MLP_SVC_INIT_310.dtd">
<hdr>
<client>
<id>USERNAME</id>
<pwd>PASSWORD</pwd>
<serviceid>SERVICEID</serviceid>
</client>
</hdr>
<slir>
<msids>
<msid type="MSISDN">12345</msid>
</msids>
<eqop>
<resp_timer>15</resp_timer>
</eqop>
</slir>
</svc_init>
then use curl -X POST http://ip:8080/restcomm and the problem happen (telestax changed /mobicents to /restcomm due to rebrand)
I have do debugging and the problem is here: org.oma.protocols.mlp.svc_init.SvcInit svcInit = (org.oma.protocols.mlp.svc_init.SvcInit)unmarshaller.unmarshalDocument(requestStream, "UTF-8");
But no way to jump into this function to know what's the root cause Please advice me what I need to do to solve it
BR, TN
Hi Tran,
I'm not sure if that's just an e-mail client paste error or not?
Your request XML should look more like this, does it?
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svc_init SYSTEM "MLP_SVC_INIT_310.dtd">
I suspect it's something like due to malformed XML, jibx is trying to process the specified DTD file and not finding it, so we may need to find a way to point jibx at the DTD in order to allow for proper error handling anyway, but the root cause should just be that you're feeding bad XML into the system. Of course even if you get it to work, we should still make a note and get the error handling fixed. I'll try to help take a look soon when I can.
Cheers, Andrew
On Tue, Feb 23, 2016 at 12:07 AM, Tran Huu Nhan notifications@github.com wrote:
Hi Andrew, Nice to meet you here,
The problem happen just by sending a MLP request: Create a request file demo.txt with content: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svc_init SYSTEM "MLP_SVC_INIT_310.dtd">
USERNAME PASSWORD SERVICEID
MSISDN OF TARGET
15
then use curl -X POST http://ip:8080/restcomm and the problem happen (telestax changed /mobicents to /restcomm due to rebrand)
I have do debugging and the problem is here: org.oma.protocols.mlp.svc_init.SvcInit svcInit = (org.oma.protocols.mlp.svc_init.SvcInit)unmarshaller.unmarshalDocument(requestStream, "UTF-8");
But no way to jump into this function to know what's the root cause Please advice me what I need to do to solve it
BR, TN
— Reply to this email directly or view it on GitHub https://github.com/RestComm/gmlc/issues/12#issuecomment-187500191.
Hi Andrew, I downloaded 12 DTD files from OMA and put it in bin directory and it work. However, GMLC will read 12 files every request and it went bad in case 1000 request/s, we are burning our hard disk.
I take a note and will comeback asap with this.
Br, TN
Closed by #8e16b48f75437
MLP required jibx to convert xsd to object. However something missing that it can't find xsd object and refer to dtd (which is not correct)
11:56:12,405 ERROR STDERR Error parsing document (line 1, col 40) 11:56:12,406 ERROR STDERR com.ctc.wstx.exc.WstxParsingException: (was java.io.FileNotFoundException) /nhan/data/TELESTAX/restcomm-slee-2.8.33.70/jboss-5.1.0.GA/bin/MLP_SVC_INIT_310.dtd at [row,col {unknown-source}]: [1,88] 11:56:12,406 ERROR STDERR at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630) 11:56:12,406 ERROR STDERR at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461) 11:56:12,406 ERROR STDERR at com.ctc.wstx.sr.ValidatingStreamReader.findDtdExtSubset(ValidatingStreamReader.java:475) 11:56:12,406 ERROR STDERR at com.ctc.wstx.sr.ValidatingStreamReader.finishDTD(ValidatingStreamReader.java:358) 11:56:12,407 ERROR STDERR at com.ctc.wstx.sr.BasicStreamReader.skipToken(BasicStreamReader.java:3349) 11:56:12,407 ERROR STDERR at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1988) 11:56:12,407 ERROR STDERR at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069) 11:56:12,407 ERROR STDERR at org.jibx.runtime.impl.StAXReaderWrapper.next(StAXReaderWrapper.java:293) 11:56:12,407 ERROR STDERR at org.jibx.runtime.impl.UnmarshallingContext.toStart(UnmarshallingContext.java:446) 11:56:12,407 ERROR STDERR at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2750) 11:56:12,407 ERROR STDERR at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900) 11:56:12,407 ERROR STDERR at org.mobicents.gmlc.slee.mlp.MLPRequest.parseRequest(MLPRequest.java:47) 11:56:12,407 ERROR STDERR at org.mobicents.gmlc.slee.MobileCoreNetworkInterfaceSbb.onPost(MobileCoreNetworkInterfaceSbb.java:298) 11:56:12,407 ERROR STDERR at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:56:12,407 ERROR STDERR at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 11:56:12,407 ERROR STDERR at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 11:56:12,407 ERROR STDERR at java.lang.reflect.Method.invoke(Method.java:606) 11:56:12,407 ERROR STDERR at org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityImpl.java:479) 11:56:12,407 ERROR STDERR at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQueuedEvent(EventRoutingTaskImpl.java:379) 11:56:12,407 ERROR STDERR at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(EventRoutingTaskImpl.java:126) 11:56:12,408 ERROR STDERR at org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl$EventRoutingTaskStatsCollector.run(EventRouterExecutorImpl.java:72) 11:56:12,408 ERROR STDERR at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 11:56:12,408 ERROR STDERR at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 11:56:12,408 ERROR STDERR at java.lang.Thread.run(Thread.java:745) 11:56:12,408 INFO MobileCoreNetworkInterfaceSbb Exception while unmarshalling XML request data: Error parsing document (line 1, col 40) 11:56:12,408 INFO MobileCoreNetworkInterfaceSbb Generated response XML: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svc_result SYSTEM "MLP_SVC_RESULT_310.DTD">