You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Sunil Ramchandra (JIRA)" <xe...@xml.apache.org> on 2005/10/06 12:11:47 UTC

[jira] Created: (XERCESC-1511) SAX2 parse method starts parsing XML document and hangs

SAX2 parse method starts parsing XML document and hangs
-------------------------------------------------------

         Key: XERCESC-1511
         URL: http://issues.apache.org/jira/browse/XERCESC-1511
     Project: Xerces-C++
        Type: Bug
  Components: SAX/SAX2  
    Versions: 2.5.0    
 Environment: Xerces-C++ version number :-  xerces-c_2_5_0-hpux_11-acc_a03 
Platform :- HP-UX 11 
Operating system and version number :- HP-UX Unix Version 11.0 
Compiler and version number  :- aCC compiler - HP aC++ Version A.03.37 
    Reporter: Sunil Ramchandra
    Priority: Blocker


Xerces-C++ version number   xerces-c_2_5_0-hpux_11-acc_a03 
Platform HP-UX 11 
Operating system and version number HP-UX Unix Version 11.0 
Compiler and version number  aCC compiler - HP aC++ Version A.03.37 
The schema document has no issues and the the XML string also has no issues, because both work well when i used ALTOVA tool for parsing.
The XML document (or excerpt) that failed 
<?xml version="1.0" encoding="UTF-8"?><NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo
 STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfo LocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>
The C++ application code that failed 

    parser = (SAX2XMLReader*) XMLReaderFactory::createXMLReader();
    parser->setContentHandler(this);
    parser->setErrorHandler(this);
    parser->setFeature(XMLUni::fgXercesSchema, true);
    
        ofstream outfile;
        RWCString msgFileName;
        RWCString uniqName(tempnam("/tmp","XML_"));
        msgFileName.append(uniqName);
        msgFileName.append(LTime::now().asString("_%Y""%m""%d",RWZone::utc()));
        msgFileName.append(LTime::now().asString("%H""%M""%S",RWZone::utc()));
        msgFileName.append(".xml");
        outfile.open (msgFileName, ofstream::out); ----> I am creating a temporary xml file here
        outfile<<XMLStringBuffer; ---> This string buffer has the XML string mentioned above
        outfile.close();
        cout<<"I am here: abt to errorReset"<<endl;
        this->resetErrors();
        cout<<"I am here:  abt to parse"<<msgFileName<<endl;

        parser->parse(msgFileName); --> Sending the file to the parser   (After this i am able to see the start document method call in my logs, but after that nothing)

        cout<<"I am here:  Done with parse - going to remove file"<<msgFileName<<endl;
        remove(msgFileName); --> i am removing the file

Whether you built the Xerces-C++ library yourself or used the binary distribution - NO I sued the 2_5_7 libraries.
    
What happened 

I am using the SAX2 parser to parse my XML files.
I dont use any threads here, its a single flow of events from parser creation till the parsing of the xml file.

I observe that in my logs, once the XML string is created and sent to the piece of code mentioned above. The parser hangs in the parse method.
As per its behaviour, it is supposed to call the "start document" "statrt element" functions whihc are overloaded in my classes.
The last log statement that i see is the " start document  " after that i dont get anything. My application proceeds with other threads where i do socket operations totally un-related to the XML logic or piece of code.

Here are the logs

TRACELOG_MSG : 10/05/05 09:56:51.236 : - XML string is being validated:[<?xml version="1.0" encoding="UTF-8"?>
<NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfoLocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>] (XMLConverter.C, 131)
TRACELOG_MSG : 10/05/05 09:56:51.237 : - Xml schema file was obtained:[/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd]
(XMLConverter.C, 151)
I am here: abt to errorReset
I am here:  abt to parse/tmp/XML_EAAa26861_20051005155651.xml
TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function entry CXMLConverter::startDocument (XMLConverter.C, 241)
TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function exit CXMLConverter::startDocument (XMLConverter.C, 242)
TRACELOG_MSG : 10/05/05 09:56:51.598 : - Function entry ServiceBuilderSocket::PollRead (ServiceBuilderSocket.C, 160) --> other processing continues
TRACELOG_MSG : 10/05/05 09:56:51.598 :  - LOCKING Mutex 'SBSocketLock' stat=0   [???:0] (SThreadMutex.C, 167)




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1511) SAX2 parse method starts parsing XML document and hangs

Posted by "Sunil Ramchandra (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1511?page=comments#action_12331686 ] 

Sunil Ramchandra commented on XERCESC-1511:
-------------------------------------------

Hi Jesse,

I could not reproduce this issue with the SAX2Print sample application.

Can you help me out, i am not able to proceed with this issue. I have put as many debig statements as possible, but when i run my application its just stops at the "start document" phase of parsing.

Appreciate your reply asap. Thanks

Thanks
SUnil

> SAX2 parse method starts parsing XML document and hangs
> -------------------------------------------------------
>
>          Key: XERCESC-1511
>          URL: http://issues.apache.org/jira/browse/XERCESC-1511
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.5.0
>  Environment: Xerces-C++ version number :-  xerces-c_2_5_0-hpux_11-acc_a03 
> Platform :- HP-UX 11 
> Operating system and version number :- HP-UX Unix Version 11.0 
> Compiler and version number  :- aCC compiler - HP aC++ Version A.03.37 
>     Reporter: Sunil Ramchandra
>     Priority: Blocker

>
> Xerces-C++ version number   xerces-c_2_5_0-hpux_11-acc_a03 
> Platform HP-UX 11 
> Operating system and version number HP-UX Unix Version 11.0 
> Compiler and version number  aCC compiler - HP aC++ Version A.03.37 
> The schema document has no issues and the the XML string also has no issues, because both work well when i used ALTOVA tool for parsing.
> The XML document (or excerpt) that failed 
> <?xml version="1.0" encoding="UTF-8"?><NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo
>  STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfo LocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>
> The C++ application code that failed 
>     parser = (SAX2XMLReader*) XMLReaderFactory::createXMLReader();
>     parser->setContentHandler(this);
>     parser->setErrorHandler(this);
>     parser->setFeature(XMLUni::fgXercesSchema, true);
>     
>         ofstream outfile;
>         RWCString msgFileName;
>         RWCString uniqName(tempnam("/tmp","XML_"));
>         msgFileName.append(uniqName);
>         msgFileName.append(LTime::now().asString("_%Y""%m""%d",RWZone::utc()));
>         msgFileName.append(LTime::now().asString("%H""%M""%S",RWZone::utc()));
>         msgFileName.append(".xml");
>         outfile.open (msgFileName, ofstream::out); ----> I am creating a temporary xml file here
>         outfile<<XMLStringBuffer; ---> This string buffer has the XML string mentioned above
>         outfile.close();
>         cout<<"I am here: abt to errorReset"<<endl;
>         this->resetErrors();
>         cout<<"I am here:  abt to parse"<<msgFileName<<endl;
>         parser->parse(msgFileName); --> Sending the file to the parser   (After this i am able to see the start document method call in my logs, but after that nothing)
>         cout<<"I am here:  Done with parse - going to remove file"<<msgFileName<<endl;
>         remove(msgFileName); --> i am removing the file
> Whether you built the Xerces-C++ library yourself or used the binary distribution - NO I sued the 2_5_7 libraries.
>     
> What happened 
> I am using the SAX2 parser to parse my XML files.
> I dont use any threads here, its a single flow of events from parser creation till the parsing of the xml file.
> I observe that in my logs, once the XML string is created and sent to the piece of code mentioned above. The parser hangs in the parse method.
> As per its behaviour, it is supposed to call the "start document" "statrt element" functions whihc are overloaded in my classes.
> The last log statement that i see is the " start document  " after that i dont get anything. My application proceeds with other threads where i do socket operations totally un-related to the XML logic or piece of code.
> Here are the logs
> TRACELOG_MSG : 10/05/05 09:56:51.236 : - XML string is being validated:[<?xml version="1.0" encoding="UTF-8"?>
> <NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfoLocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>] (XMLConverter.C, 131)
> TRACELOG_MSG : 10/05/05 09:56:51.237 : - Xml schema file was obtained:[/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd]
> (XMLConverter.C, 151)
> I am here: abt to errorReset
> I am here:  abt to parse/tmp/XML_EAAa26861_20051005155651.xml
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function entry CXMLConverter::startDocument (XMLConverter.C, 241)
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function exit CXMLConverter::startDocument (XMLConverter.C, 242)
> TRACELOG_MSG : 10/05/05 09:56:51.598 : - Function entry ServiceBuilderSocket::PollRead (ServiceBuilderSocket.C, 160) --> other processing continues
> TRACELOG_MSG : 10/05/05 09:56:51.598 :  - LOCKING Mutex 'SBSocketLock' stat=0   [???:0] (SThreadMutex.C, 167)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Closed: (XERCESC-1511) SAX2 parse method starts parsing XML document and hangs

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov closed XERCESC-1511.
------------------------------------

    Resolution: Invalid

Application problem.

> SAX2 parse method starts parsing XML document and hangs
> -------------------------------------------------------
>
>                 Key: XERCESC-1511
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1511
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2
>    Affects Versions: 2.5.0
>         Environment: Xerces-C++ version number :-  xerces-c_2_5_0-hpux_11-acc_a03 
> Platform :- HP-UX 11 
> Operating system and version number :- HP-UX Unix Version 11.0 
> Compiler and version number  :- aCC compiler - HP aC++ Version A.03.37 
>            Reporter: Sunil Ramchandra
>            Priority: Blocker
>
> Xerces-C++ version number   xerces-c_2_5_0-hpux_11-acc_a03 
> Platform HP-UX 11 
> Operating system and version number HP-UX Unix Version 11.0 
> Compiler and version number  aCC compiler - HP aC++ Version A.03.37 
> The schema document has no issues and the the XML string also has no issues, because both work well when i used ALTOVA tool for parsing.
> The XML document (or excerpt) that failed 
> <?xml version="1.0" encoding="UTF-8"?><NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo
>  STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfo LocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>
> The C++ application code that failed 
>     parser = (SAX2XMLReader*) XMLReaderFactory::createXMLReader();
>     parser->setContentHandler(this);
>     parser->setErrorHandler(this);
>     parser->setFeature(XMLUni::fgXercesSchema, true);
>     
>         ofstream outfile;
>         RWCString msgFileName;
>         RWCString uniqName(tempnam("/tmp","XML_"));
>         msgFileName.append(uniqName);
>         msgFileName.append(LTime::now().asString("_%Y""%m""%d",RWZone::utc()));
>         msgFileName.append(LTime::now().asString("%H""%M""%S",RWZone::utc()));
>         msgFileName.append(".xml");
>         outfile.open (msgFileName, ofstream::out); ----> I am creating a temporary xml file here
>         outfile<<XMLStringBuffer; ---> This string buffer has the XML string mentioned above
>         outfile.close();
>         cout<<"I am here: abt to errorReset"<<endl;
>         this->resetErrors();
>         cout<<"I am here:  abt to parse"<<msgFileName<<endl;
>         parser->parse(msgFileName); --> Sending the file to the parser   (After this i am able to see the start document method call in my logs, but after that nothing)
>         cout<<"I am here:  Done with parse - going to remove file"<<msgFileName<<endl;
>         remove(msgFileName); --> i am removing the file
> Whether you built the Xerces-C++ library yourself or used the binary distribution - NO I sued the 2_5_7 libraries.
>     
> What happened 
> I am using the SAX2 parser to parse my XML files.
> I dont use any threads here, its a single flow of events from parser creation till the parsing of the xml file.
> I observe that in my logs, once the XML string is created and sent to the piece of code mentioned above. The parser hangs in the parse method.
> As per its behaviour, it is supposed to call the "start document" "statrt element" functions whihc are overloaded in my classes.
> The last log statement that i see is the " start document  " after that i dont get anything. My application proceeds with other threads where i do socket operations totally un-related to the XML logic or piece of code.
> Here are the logs
> TRACELOG_MSG : 10/05/05 09:56:51.236 : - XML string is being validated:[<?xml version="1.0" encoding="UTF-8"?>
> <NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfoLocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>] (XMLConverter.C, 131)
> TRACELOG_MSG : 10/05/05 09:56:51.237 : - Xml schema file was obtained:[/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd]
> (XMLConverter.C, 151)
> I am here: abt to errorReset
> I am here:  abt to parse/tmp/XML_EAAa26861_20051005155651.xml
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function entry CXMLConverter::startDocument (XMLConverter.C, 241)
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function exit CXMLConverter::startDocument (XMLConverter.C, 242)
> TRACELOG_MSG : 10/05/05 09:56:51.598 : - Function entry ServiceBuilderSocket::PollRead (ServiceBuilderSocket.C, 160) --> other processing continues
> TRACELOG_MSG : 10/05/05 09:56:51.598 :  - LOCKING Mutex 'SBSocketLock' stat=0   [???:0] (SThreadMutex.C, 167)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1511) SAX2 parse method starts parsing XML document and hangs

Posted by "Jesse Pelton (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1511?page=comments#action_12331790 ] 

Jesse Pelton commented on XERCESC-1511:
---------------------------------------

If SAX2Print can process your document, the problem is probably not in Xerces. Are you certain that the blocked mutex is not related?

If you parse the memory buffer directly rather than writing it to a file, does the same problem occur?

In any case, it's probably time to break out the debugger. Set a breakpoint in your startDocument() function, then step through the program from there. Your trace indicates that you exit startDocument(), so presumably the problem is elsewhere. With luck, you'll have an "Aha!" moment shortly.

> SAX2 parse method starts parsing XML document and hangs
> -------------------------------------------------------
>
>          Key: XERCESC-1511
>          URL: http://issues.apache.org/jira/browse/XERCESC-1511
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.5.0
>  Environment: Xerces-C++ version number :-  xerces-c_2_5_0-hpux_11-acc_a03 
> Platform :- HP-UX 11 
> Operating system and version number :- HP-UX Unix Version 11.0 
> Compiler and version number  :- aCC compiler - HP aC++ Version A.03.37 
>     Reporter: Sunil Ramchandra
>     Priority: Blocker

>
> Xerces-C++ version number   xerces-c_2_5_0-hpux_11-acc_a03 
> Platform HP-UX 11 
> Operating system and version number HP-UX Unix Version 11.0 
> Compiler and version number  aCC compiler - HP aC++ Version A.03.37 
> The schema document has no issues and the the XML string also has no issues, because both work well when i used ALTOVA tool for parsing.
> The XML document (or excerpt) that failed 
> <?xml version="1.0" encoding="UTF-8"?><NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo
>  STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfo LocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>
> The C++ application code that failed 
>     parser = (SAX2XMLReader*) XMLReaderFactory::createXMLReader();
>     parser->setContentHandler(this);
>     parser->setErrorHandler(this);
>     parser->setFeature(XMLUni::fgXercesSchema, true);
>     
>         ofstream outfile;
>         RWCString msgFileName;
>         RWCString uniqName(tempnam("/tmp","XML_"));
>         msgFileName.append(uniqName);
>         msgFileName.append(LTime::now().asString("_%Y""%m""%d",RWZone::utc()));
>         msgFileName.append(LTime::now().asString("%H""%M""%S",RWZone::utc()));
>         msgFileName.append(".xml");
>         outfile.open (msgFileName, ofstream::out); ----> I am creating a temporary xml file here
>         outfile<<XMLStringBuffer; ---> This string buffer has the XML string mentioned above
>         outfile.close();
>         cout<<"I am here: abt to errorReset"<<endl;
>         this->resetErrors();
>         cout<<"I am here:  abt to parse"<<msgFileName<<endl;
>         parser->parse(msgFileName); --> Sending the file to the parser   (After this i am able to see the start document method call in my logs, but after that nothing)
>         cout<<"I am here:  Done with parse - going to remove file"<<msgFileName<<endl;
>         remove(msgFileName); --> i am removing the file
> Whether you built the Xerces-C++ library yourself or used the binary distribution - NO I sued the 2_5_7 libraries.
>     
> What happened 
> I am using the SAX2 parser to parse my XML files.
> I dont use any threads here, its a single flow of events from parser creation till the parsing of the xml file.
> I observe that in my logs, once the XML string is created and sent to the piece of code mentioned above. The parser hangs in the parse method.
> As per its behaviour, it is supposed to call the "start document" "statrt element" functions whihc are overloaded in my classes.
> The last log statement that i see is the " start document  " after that i dont get anything. My application proceeds with other threads where i do socket operations totally un-related to the XML logic or piece of code.
> Here are the logs
> TRACELOG_MSG : 10/05/05 09:56:51.236 : - XML string is being validated:[<?xml version="1.0" encoding="UTF-8"?>
> <NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfoLocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>] (XMLConverter.C, 131)
> TRACELOG_MSG : 10/05/05 09:56:51.237 : - Xml schema file was obtained:[/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd]
> (XMLConverter.C, 151)
> I am here: abt to errorReset
> I am here:  abt to parse/tmp/XML_EAAa26861_20051005155651.xml
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function entry CXMLConverter::startDocument (XMLConverter.C, 241)
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function exit CXMLConverter::startDocument (XMLConverter.C, 242)
> TRACELOG_MSG : 10/05/05 09:56:51.598 : - Function entry ServiceBuilderSocket::PollRead (ServiceBuilderSocket.C, 160) --> other processing continues
> TRACELOG_MSG : 10/05/05 09:56:51.598 :  - LOCKING Mutex 'SBSocketLock' stat=0   [???:0] (SThreadMutex.C, 167)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1511) SAX2 parse method starts parsing XML document and hangs

Posted by "Jesse Pelton (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1511?page=comments#action_12331491 ] 

Jesse Pelton commented on XERCESC-1511:
---------------------------------------

Can you reproduce this issue with the SAX2Print sample application?

> SAX2 parse method starts parsing XML document and hangs
> -------------------------------------------------------
>
>          Key: XERCESC-1511
>          URL: http://issues.apache.org/jira/browse/XERCESC-1511
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.5.0
>  Environment: Xerces-C++ version number :-  xerces-c_2_5_0-hpux_11-acc_a03 
> Platform :- HP-UX 11 
> Operating system and version number :- HP-UX Unix Version 11.0 
> Compiler and version number  :- aCC compiler - HP aC++ Version A.03.37 
>     Reporter: Sunil Ramchandra
>     Priority: Blocker

>
> Xerces-C++ version number   xerces-c_2_5_0-hpux_11-acc_a03 
> Platform HP-UX 11 
> Operating system and version number HP-UX Unix Version 11.0 
> Compiler and version number  aCC compiler - HP aC++ Version A.03.37 
> The schema document has no issues and the the XML string also has no issues, because both work well when i used ALTOVA tool for parsing.
> The XML document (or excerpt) that failed 
> <?xml version="1.0" encoding="UTF-8"?><NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo
>  STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfo LocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>
> The C++ application code that failed 
>     parser = (SAX2XMLReader*) XMLReaderFactory::createXMLReader();
>     parser->setContentHandler(this);
>     parser->setErrorHandler(this);
>     parser->setFeature(XMLUni::fgXercesSchema, true);
>     
>         ofstream outfile;
>         RWCString msgFileName;
>         RWCString uniqName(tempnam("/tmp","XML_"));
>         msgFileName.append(uniqName);
>         msgFileName.append(LTime::now().asString("_%Y""%m""%d",RWZone::utc()));
>         msgFileName.append(LTime::now().asString("%H""%M""%S",RWZone::utc()));
>         msgFileName.append(".xml");
>         outfile.open (msgFileName, ofstream::out); ----> I am creating a temporary xml file here
>         outfile<<XMLStringBuffer; ---> This string buffer has the XML string mentioned above
>         outfile.close();
>         cout<<"I am here: abt to errorReset"<<endl;
>         this->resetErrors();
>         cout<<"I am here:  abt to parse"<<msgFileName<<endl;
>         parser->parse(msgFileName); --> Sending the file to the parser   (After this i am able to see the start document method call in my logs, but after that nothing)
>         cout<<"I am here:  Done with parse - going to remove file"<<msgFileName<<endl;
>         remove(msgFileName); --> i am removing the file
> Whether you built the Xerces-C++ library yourself or used the binary distribution - NO I sued the 2_5_7 libraries.
>     
> What happened 
> I am using the SAX2 parser to parse my XML files.
> I dont use any threads here, its a single flow of events from parser creation till the parsing of the xml file.
> I observe that in my logs, once the XML string is created and sent to the piece of code mentioned above. The parser hangs in the parse method.
> As per its behaviour, it is supposed to call the "start document" "statrt element" functions whihc are overloaded in my classes.
> The last log statement that i see is the " start document  " after that i dont get anything. My application proceeds with other threads where i do socket operations totally un-related to the XML logic or piece of code.
> Here are the logs
> TRACELOG_MSG : 10/05/05 09:56:51.236 : - XML string is being validated:[<?xml version="1.0" encoding="UTF-8"?>
> <NumberManagerXML2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd"><CreateSV><RequestHandleInfo RequestHandle="1319"></RequestHandleInfo><TnInfo STARTTN="1501502001" ENDTN="1501502001"></TnInfo><SVIDInfo SVID="43774"></SVIDInfo><LRNInfo LRN="4004000000"></LRNInfo><BlockHolderReturnInfo BlockHolderReturnFlag=""></BlockHolderReturnInfo><SPIDInfo SPID="SP00"></SPIDInfo><GTTDataInfo ClassDPC="222222222" ClassSSN="222" ClassGTA="1" ClassTT="111" CnamDPC="222222222" CnamSSN="222" CnamTT="111" CnamGTA="1" IsvmDPC="222222222" IsvmSSN="222" IsvmTT="111" IsvmGTA="1" LidbDPC="222222222" LidbSSN="222"  LidbTT="111" LidbGTA="1" WsmscDPC=""  WsmscSSN="" WsmscTT="" WsmscGTA=""></GTTDataInfo><LocationInfo Location=""></LocationInfo><LocationTypeInfoLocationType=""></LocationTypeInfo><BillingIdInfo BillingId=""></BillingIdInfo><ActivationDateInfo ActivationDate="2005-10-05"></ActivationDateInfo><ActivationTimeInfo ActivationTime="15:43:46"></ActivationTimeInfo><NPACRegionInfo NPACRegionId="1"></NPACRegionInfo><LNPTypeInfo LNPTypeIndicator="0"></LNPTypeInfo><UpdateInfo UpdateIndicator="1"></UpdateInfo><CreateDeleteInfo CreateDeleteReason="0"></CreateDeleteInfo><ContaminateStatusInfo ContaminateStatus="0"></ContaminateStatusInfo><MessageContext Indicator="0"></MessageContext></CreateSV></NumberManagerXML2.0>] (XMLConverter.C, 131)
> TRACELOG_MSG : 10/05/05 09:56:51.237 : - Xml schema file was obtained:[/opt/lnpsite/nimnm00/flat/schema/NMXMLInterface.xsd]
> (XMLConverter.C, 151)
> I am here: abt to errorReset
> I am here:  abt to parse/tmp/XML_EAAa26861_20051005155651.xml
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function entry CXMLConverter::startDocument (XMLConverter.C, 241)
> TRACELOG_MSG : 10/05/05 09:56:51.240 : - Function exit CXMLConverter::startDocument (XMLConverter.C, 242)
> TRACELOG_MSG : 10/05/05 09:56:51.598 : - Function entry ServiceBuilderSocket::PollRead (ServiceBuilderSocket.C, 160) --> other processing continues
> TRACELOG_MSG : 10/05/05 09:56:51.598 :  - LOCKING Mutex 'SBSocketLock' stat=0   [???:0] (SThreadMutex.C, 167)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org