How can I resolve org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allo

2,186 views
Skip to first unread message

OmexIT

unread,
Apr 22, 2013, 8:01:45 AM4/22/13
to jpos-...@googlegroups.com
I am trying to test my server using putty on windows 8:
I send the following XML to the server
<?xml version="1.0" encoding="utf-8"?>
<isomsg>
<field id="0" value="0800"/>
<field id="3" value="000000"/>
<field id="41" value="00000001"/>
<field id="70" value="301"/>
</isomsg>

I get the following error: 
<log realm="server_channel_A/127.0.0.1:59758" at="Mon Apr 22 14:56:24 EAT 2013.215" lifespan="2700ms">
  <receive>
    <iso-exception>
      org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      org.jpos.iso.ISOException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.jpos.iso.packager.XMLPackager.unpack(XMLPackager.java:136)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:420)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:925)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:693)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:131)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:72)
    </iso-exception>
    --- data ---
    0000  EF BF BD EF BF BD 1F EF  BF BD EF BF BD 20 EF BF  ............. ..
0010  BD EF BF BD 18 EF BF BD  EF BF BD 27 EF BF BD EF  ...........'....
0020  BF BD 01 EF BF BD EF BF  BD 03 EF BF BD EF BF BD  ................
0030  03 3C 3F 78 6D 6C 20 76  65 72 73 69 6F 6E 3D 22  .<?xml version="
0040  31 2E 30 22 20 65 6E 63  6F 64 69 6E 67 3D 22 75  1.0" encoding="u
0050  74 66 2D 38 22 3F 3E 3C  69 73 6F 6D 73 67 3E 3C  tf-8"?><isomsg><
0060  66 69 65 6C 64 20 69 64  3D 22 30 22 20 76 61 6C  field id="0" val
0070  75 65 3D 22 30 38 30 30  22 2F 3E 3C 66 69 65 6C  ue="0800"/><fiel
0080  64 20 69 64 3D 22 33 22  20 76 61 6C 75 65 3D 22  d id="3" value="
0090  30 30 30 30 30 30 22 2F  3E 3C 66 69 65 6C 64 20  000000"/><field 
00a0  69 64 3D 22 34 31 22 20  76 61 6C 75 65 3D 22 30  id="41" value="0
00b0  30 30 30 30 30 30 31 22  2F 3E 3C 66 69 65 6C 64  0000001"/><field
00c0  20 69 64 3D 22 37 30 22  20 76 61 6C 75 65 3D 22   id="70" value="
00d0  33 30 31 22 2F 3E 3C 2F  69 73 6F 6D 73 67 3E     301"/></isomsg>

  </receive>
</log>
<log realm="Wallet_ISOServer_10000.server.session/127.0.0.1:59758" at="Mon Apr 22 14:56:24 EAT 2013.219">
  <session-error>
    <iso-exception>
      org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      org.jpos.iso.ISOException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.jpos.iso.packager.XMLPackager.unpack(XMLPackager.java:136)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:420)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:925)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:693)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:131)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:72)
    </iso-exception>
  </session-error>
</log>
<log realm="Wallet_ISOServer_10000.server.session/127.0.0.1:59758" at="Mon Apr 22 14:56:24 EAT 2013.221">
  <session-end/>
</log>

chhil

unread,
Apr 22, 2013, 8:25:56 AM4/22/13
to jpos-...@googlegroups.com
Your xml  request message from client looks alright.
The server hexdump reveals and the xmlpackager is probably not liking these characters preceding your request.
You need to figure out why this is so.

    0000  EF BF BD EF BF BD 1F EF  BF BD EF BF BD 20 EF BF  ............. ..
0010  BD EF BF BD 18 EF BF BD  EF BF BD 27 EF BF BD EF  ...........'....
0020  BF BD 01 EF BF BD EF BF  BD 03 EF BF BD EF BF BD  ................

-chhil

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.
Please support jPOS, contact: sa...@jpos.org
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
 
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

OmexIT

unread,
Apr 22, 2013, 8:30:38 AM4/22/13
to jpos-...@googlegroups.com
Based on your experience can you give me potential causes of this error.

chhil

unread,
Apr 22, 2013, 8:30:18 AM4/22/13
to jpos-...@googlegroups.com
I generally use netcat or telnet to inject messages, maybe putty is prepending data to the message?
JPOS Client simulator module is ideal on the long run.

-chhil

vaibh...@gmail.com

unread,
Apr 22, 2013, 12:32:22 PM4/22/13
to jpos-...@googlegroups.com
Use putty in raw form. Hope it helps you.

Regards
Vaibhav
-----Original message-----
From: OmexIT
Sent: 22-04-2013, 6:00 pm
To: jpos-...@googlegroups.com
Subject: Re: [jpos-users] How can I resolve org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allo


Based on your experience can you give me potential causes of this error.

On Monday, 22 April 2013 15:25:56 UTC+3, chhil wrote:
>
> Your xml request message from client looks alright.
> The server hexdump reveals and the xmlpackager is probably not liking
> these characters preceding your request.
> You need to figure out why this is so.
> 0000 EF BF BD EF BF BD 1F EF BF BD EF BF BD 20 EF BF .............
> ..
> 0010 BD EF BF BD 18 EF BF BD EF BF BD 27 EF BF BD EF ...........'....
> 0020 BF BD 01 EF BF BD EF BF BD 03 EF BF BD EF BF BD ................
>
> -chhil
>
>> 0010 BD EF BF BD 18 EFF BD EF ...........'....
>> Please support jPOS, contact: sa...@jpos.org <javascript:>
>>
>> You received this message because you are subscribed to the "jPOS Users"
>> group.
>> Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
>> To post to this group, send email to jpos-...@googlegroups.com<javascript:>
>> To unsubscribe, send email to jpos-users+...@googlegroups.com<javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/jpos-users
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "jPOS Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jpos-users+...@googlegroups.com <javascript:>.

Antony Omeri

unread,
Apr 22, 2013, 3:02:54 PM4/22/13
to jpos-...@googlegroups.com

Thanx

You received this message because you are subscribed to a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/j4rJSGSjMSQ/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to jpos-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages