You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2007/03/07 20:49:24 UTC
[jira] Closed: (XALANC-636) Null pointer when using
XPathEvaluator::selectNodeList
[ https://issues.apache.org/jira/browse/XALANC-636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Bertoni closed XALANC-636.
--------------------------------
> Null pointer when using XPathEvaluator::selectNodeList
> ------------------------------------------------------
>
> Key: XALANC-636
> URL: https://issues.apache.org/jira/browse/XALANC-636
> Project: XalanC
> Issue Type: Bug
> Components: XalanC
> Affects Versions: 1.10
> Environment: Linux
> Reporter: fred C
> Priority: Blocker
>
> Hi,
> I perform a simple test with a simple XML file :
> the code :
> -------------
> //Initialization ConfigurationServer & Loader
> FileConfigLoader fileConfigLoader;
> ConfigurationServer<> configurationServer ;
>
> std::wstring file3;
> file3.append(L"PhysicalEnt.xml");
> fileConfigLoader.addRepository(L"/Root/entities.*",file3);
> configurationServer.setLoader(&fileConfigLoader);
>
> /* Test 1: ConfigDOMNodeListPtr entitieslist3 = configurationServer.selectNodes(L"/Root/entities/*"); */
> ConfigDOMNodePtr entNode = configurationServer.selectSingleNode (L"/Root/entities");
> ConfigDOMNodeListPtr entitieslist = entNode->selectNodes(L"entity");
> /* Test 2 :ConfigDOMNodeListPtr entitieslist = entNode->selectNodes(L"*"); */
>
> //fill the map
> for (int i=0; i< entitieslist->get_length() ; i++)
> {
> std::cout << " Iteraction : " << i << std::endl;
> //gathering data for the map key
> ConfigDOMNodePtr structElem = entitieslist->nextNode();
> ConfigDOMNodeListPtr structParamsNodes = structElem->selectNodes(L"physicalEntity/entityType/*");
> unsigned int entityKind = (ConfigurationServer<>::NodeConverter) structParamsNodes->nextNode();
> unsigned int domain = (ConfigurationServer<>::NodeConverter) structParamsNodes->nextNode();
> std::cout << " EntityKind : " << entityKind << std::endl;
> }
> The XML file :
> -------------------
> Fichier 'PhysicalEnt.xml':
> <entities>
> <entity>
> <physicalEntity>
> <entityType>
> <entityKind>1</entityKind>
> <domain>1</domain>
> <countryCode>1</countryCode>
> <category>1</category>
> <subcategory>1</subcategory>
> <specific>1</specific>
> <extra>1</extra>
> </entityType>
> </physicalEntity>
> </entity>
> <entity>
> <physicalEntity>
> <entityType>
> <entityKind>2</entityKind>
> <domain>2</domain>
> <countryCode>2</countryCode>
> <category>2</category>
> <subcategory>2</subcategory>
> <specific>2</specific>
> <extra>2</extra>
> </entityType>
> </physicalEntity>
> </entity>
> </entities>
> When running this, I have the error :
> ------------------------------------------------
> ldd CS_test.x.msb05023
> linux-gate.so.1 => (0xffffe000)
> libACE.so.5 => /usr/lib/libACE.so.5 (0xb7e94000)
> libxerces-c.so.27 => /home/nhbwb/ghemires/xerces-c-src_2_7_0/lib/libxerces-c.so.27 (0xb7ad3000)
> libxalan-c.so.110 => /home/nhbwb/ghemires/xml-xalan/c/lib/libxalan-c.so.110 (0xb7645000)
> libxalanMsg.so.110 => /home/nhbwb/ghemires/xml-xalan/c/lib/libxalanMsg.so.110 (0xb763e000)
> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x429fd000)
> libm.so.6 => /lib/tls/libm.so.6 (0x4270e000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x429d3000)
> libc.so.6 => /lib/tls/libc.so.6 (0x425e2000)
> librt.so.1 => /lib/tls/librt.so.1 (0x42494000)
> libdl.so.2 => /lib/libdl.so.2 (0x42733000)
> libpthread.so.0 => /lib/tls/libpthread.so.0 (0x42814000)
> /lib/ld-linux.so.2 (0x41dae000)
> (gdb) where
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0x426097d5 in raise () from /lib/tls/libc.so.6
> #2 0x4260b149 in abort () from /lib/tls/libc.so.6
> #3 0x42a9f1db in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6
> #4 0x42a9cef1 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.6
> #5 0x42a9cf26 in std::terminate () from /usr/lib/libstdc++.so.6
> #6 0x42a9d06f in __cxa_throw () from /usr/lib/libstdc++.so.6
> #7 0xb7c384df in xercesc_2_7::DOMDocumentImpl::createElement () from /home/nhbwb/ghemires/xerces-c-src_2_7_0/lib/libxerces-c.so.27
> #8 0xb77e481f in xalanc_1_10::NodeRefList::operator= () from /home/nhbwb/ghemires/xml-xalan/c/lib/libxalan-c.so.110
> #9 0xb7826184 in xalanc_1_10::XPathEvaluator::selectNodeList () from /home/nhbwb/ghemires/xml-xalan/c/lib/libxalan-c.so.110
> #10 0x0805a624 in ConfigXercesDOMNode::selectNodes (this=0xbffff4b0, query=@0xbffff4e0)
> at /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:418
> #11 0x0804cca8 in main (argc=1, argv=0xbffff5b4) at ../CS_test_main.cpp:37
> I can't fix the problem.
> I rebuild Xalan, but the same.
> Thanks;
> Fred.
--
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org