×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    6

    Exception: Expected start tag found end tag

    Hi everybody,
    my problem is quite simple - I have a Nokia 6230i emulator and I want to synchronize it with a local computer via Sync4j. The emulator connects to the Sync4j and sends an WBXML file. And here is the problem. Sync4j tries to decode this file to XML. The exception "Expected start tag found end tag </data>" shows during this decoding. The WBXML looks however strange, there are some chars looking odd (it looks like wrong formatt or encoding - not like UTF-8) but I may be mistaken. Maybe the problem is WBXML to XML decoding.

    Here's the exception:

    [24.3.2006 10:09:24][sync4j.server] FINEST: Message has content type: application/vnd.syncml+wbxml; charset=UTF-8
    [24.3.2006 10:09:24][sync4j.server] FINEST: Convertint message from wbxml to xml
    [24.3.2006 10:09:24][sync4j.server] FINEST: Char-set: UTF-8 (null, means wbxml defined)
    [24.3.2006 10:09:24][sync4j.server] FINEST: Message to translate into the SyncML object:
    <SyncML><SyncHdr><VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>1</SessionID><MsgID>1</MsgID><Target><LocURI>http://localhost:8080/sync4j/sync</LocURI></Target><Source><LocURI>FAKE SN:????????????</LocURI></Source><Meta><MaxMsgSize>3584</MaxMsgSize></Meta></SyncHdr><SyncBody><Alert><CmdID>1</CmdID><Data>201</Data><Item><Target><LocURI>scal</LocURI></Target><Source><LocURI>/telecom/cal.vcs</LocURI></Source><Meta><Anchor><Last>0</Last><Next>0</Next></Anchor></Meta></Item></Alert><Put><CmdID>2</CmdID><Item><Source><LocURI>./devinf11</LocURI></Source><Meta><Type>application/vnd.syncml-devinf+wbxml</Type></Meta><Data>?Tj?1.1

    Nokia 6230i

    FAKE HwV

    FAKE SwV

    FAKE SN:???????????????
    Nokia

    Je?
    Q?iU?O??^??P?*I?TKphone
    G]/telecom/pb.vcf
    R8
    ZFtext/x-vcard
    d2.1
    bFtext/x-vcard
    d2.1
    _`1
    `2
    `7
    G]/telecom/cal.vcs
    R8
    ZFtext/x-vcalendar
    d1.0
    bFtext/x-vcalendar
    d1.0
    _`1
    `2
    `7
    G]/telecom/note.txt
    R8
    ZFtext/plain
    d
    bFtext/plain
    d
    _`1
    `2
    `7
    EFtext/x-vcard
    XBEGIN
    cVCARD
    XVERSION
    c2.1
    XEND
    cVCARD
    XN
    XTEL
    WPREF
    WWORK
    WHOME
    WVOICE
    WFAX
    WCELL
    XNOTE
    XURL
    XEMAIL
    XLABEL
    EFtext/x-vcalendar
    XBEGIN
    cVCALENDAR
    cVEVENT
    cVTODO
    XVERSION
    c1.0
    XEND
    cVCALENDAR
    cVEVENT
    cVTODO
    XDTSTART
    Hdatetime
    XDTEND
    Hdatetime
    XSUMMARY
    XDUE
    XAALARM
    Hdatetime
    XDALARM
    Hdatetime
    XRRULE
    XCATEGORIES
    XLOCATION
    XSTATUS
    XPRIORITY
    XEXDATE
    EFtext/plain
    X
    Hchr
    \3000
    </Data></Item></Put><Final></Final></SyncBody></SyncML>
    [24.3.2006 10:09:24][sync4j.engine] FINEST: Starting input canonization
    [24.3.2006 10:09:24][sync4j.server] SEVERE: Error unmarshalling message:Expected start tag, found end tag "Data" (line 1, col 1589)
    [24.3.2006 10:09:24][sync4j.server] FINER: THROW
    org.jibx.runtime.JiBXException: Expected start tag, found end tag "Data" (line 1, col 1589)
    at org.jibx.runtime.impl.UnmarshallingContext.toStart(Unknown Source)
    at org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag(Unknown Source)
    at sync4j.framework.core.JiBX_s4j_server_src_xml_jibx_bindingDevInf_access.unmarshal()
    at sync4j.framework.core.DevInfData.JiBX_s4j_server_src_xml_jibx_binding_unmarshal_2_0(DevInfData.java)



    Any ideas? Thanks a lot.
    Last edited by jjefrey; 2006-03-24 at 09:20.

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    6

    Re: Exception: Expected start tag found end tag

    Well after a while it looks to me like the DATA part is in WBXML instead XML, isn't it? Could it be because of different character coding?

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    A JiBX exception means there is a problem converting the XML to Java objects. The device information is coded as WBXML, however the WBXML > XML converter should have converted it to XML already, which was not done. Not sure why. Is this a Funambol out-of the box without any changes or tweaks? Is this the latest version? You should ask this question at their support channels…

    Oh, I hate Sync4j for this (unnesesscary) WBXML > XML > JiBX and JiBX > XML > XML patcher > WBXML paths. Unstable as hell.

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    6

    Re: Exception: Expected start tag found end tag

    Ok thanks for advice, however it looks like no one had a problem like this, could it be the nokia emulator fault? My guess is that Nokia could send some bad characters which WBXML -> XML parser can't convert...

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Contact me privately to get my e-mail address and then send me your WBXML. I will have a look at it with my own parser.

    In any case it is a Funambol problem. Nokia will not change that anymore so Funambol has to adopt. Ask their mailing list and/or file a bug report with the WBXML data.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Stand corrected. This is a Nokia fault. The string table length in the DevInf is wrong. Instead of being a mb_u_int32 it is an ordinary integer.

    This makes the DevInf unparseable. Are you using the latest version of the Nokia 6230i SDK? You should file a bug to Nokia – probably this is a wide spread one even in the real device. However, it is a sleeping bug because a real device has a three byte shorter DevInf string table and therefore it does not matter if the mb_u_int32 is a mb_u_int32 or an integer because it has the same representation.

    Have you understood anything*? Sorry, it is complicated. Funambol (Sync4j) cannot do much about that. It is a Nokia 6230i SDK issue. Is there a special reason, you have chosen the 6230i? Try another one…

    * The Data part of this SyncML message contains device information (DevInf) of your Nokia SDK. Because WBXML has name spacing problems, one solution is to put this DevInf as CDATA as WBXML into the enclosing WBXML. This is okay and done by all Nokia devices out there. Each WBXML contains a lookup table (string table) for common used strings quite at the beginning. This is to compress a XML even further than simple element-to-ID conversion. However, the length prefixed of the string table is wrong. It states it is 81 bytes long. However, WBXML has a special representation of integers (mb_u_int32). The first bit signals it takes an additional byte, so the above should be 81 01 in WBXML. Because of this all the length are messed up and the WBXML to XML conversation seem to fail for the whole SyncML message because of that buggy JiBX.

    Funambol (Sync4j) cannot do much, except you could issue two feature requests, the first to give a better error message than this JiBX crap, second there should be a warning on the WBXML to XML level about a problem. The internal DevInf WBXML should then be skipped because the external one is parsable and okay.

  7. #7
    Registered User
    Join Date
    Mar 2006
    Posts
    6

    Re: Exception: Expected start tag found end tag

    Hi,
    thanks for the info, I understand quite everything (I have studied WBXML a bit also). I choosed 6230i because of the synchronization and I am not using the newest version because it's unstable. I would like to try other Nokia emulators however I wasn't successful in finding one with synchronization via SyncML and working on my comp (Win 2000 SP4). Do you know where I could find some? Thanks a lot.

  8. #8
    Registered User
    Join Date
    Mar 2006
    Posts
    6

    Re: Exception: Expected start tag found end tag

    One more question - where can I report bug to Nokia?

  9. #9
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    All SDKs on the URL I provided, have SyncML when the device has SyncML, of course. The Nokia 6230 without i SDK should be quite stable. Additionally, all SDKs work here. Probably your Windows installation is a bit confused…

    I have no idea where to report bugs. Perhaps that first four feedback topics here in the forum? I really do not know.

Similar Threads

  1. Problems with errno module
    By tsharju in forum Symbian
    Replies: 1
    Last Post: 2005-10-21, 11:24
  2. ALERT: Bad GC tag value found! 使用S60 SDK V1.2的出错信息
    By godener in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 2
    Last Post: 2005-07-15, 01:31
  3. Replies: 2
    Last Post: 2004-11-17, 10:20
  4. About 'Bad GC tag value found'
    By horaceng in forum Mobile Java General
    Replies: 1
    Last Post: 2004-05-04, 19:40
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×