xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esther Parrilla Endrino <esther.parri...@deimos-space.com>
Subject Re: Xerces C++ and JNI
Date Thu, 14 Aug 2003 10:20:16 GMT
I do not use Java parser because I have to link with this C++ API which 
is the one that calls Xerces.

Peter Guyatt wrote:
> Hi,
> 
> 	Why dont you use the Xerces java parser ?
> 
> Pete
> 
> -----Original Message-----
> From: Esther Parrilla Endrino [mailto:esther.parrilla@deimos-space.com]
> Sent: 14 August 2003 11:00
> To: xerces-c-dev@xml.apache.org
> Subject: Re: Xerces C++ and JNI
> 
> 
> Hi Pete,
> 
> yes I am doing:
> 
>      // Initialize the XML4C system
>      try {
>          XMLPlatformUtils::Initialize();
>      }
>      catch (const XMLException& toCatch) {
> 
>           cerr << "Error during initialization! :\n"
>                << StrX(toCatch.getMessage()) << endl;
>      }
> 
> and at the end:
> 
> 	XMLPlatformUtils::Terminate();
> 
> Thanks anyway, I cannot understand why it crashes as I have called the
> C++ class from a C library and it works fine!!!
> 
> esther
> 
> 
> Peter Guyatt wrote:
> 
>>Hi,
>>
>>	This may sound like a stupid comment to make but have you initialised the
>>Xerces library by using the XMLPlatformUtils::Initialize(); method ?
>>
>>if the class with the JNI interface is not in a thread that keeps a
> 
> constant
> 
>>handle on the library, it will be garbage collected, so you would need to
>>initialize and terminate the Xerces library every time you call the native
>>method.
>>
>>Thanks
>>
>>Pete
>>
>>
>>
>>-----Original Message-----
>>From: Esther Parrilla Endrino [mailto:esther.parrilla@deimos-space.com]
>>Sent: 14 August 2003 10:05
>>To: xerces-c-dev@xml.apache.org
>>Subject: Xerces C++ and JNI
>>
>>
>>Hi all,
>>
>>Well my question is related to Xerces and to JNI too, I apologize if
>>maybe this is not the correst list to ask for...
>>
>>I am doing and application in java that must use one class made in C++,
>>this class calls Xerces C++ to validate files.
>>Everything is OK using JNI, but the only method that crashes is the one
>>that calls Xerces... :(
>>
>>It crashes when it executes:
>>	 parser->parse(xmlFile);
>>
>>I have checked that the file name is read ok in the C++ class from the
>>java application but when in this C++ class I try to parse the file it
>>crashes...
>>
>>Does someone found the same error somewhere?
>>Do you know a debugging tool that I can use with JNI?
>>
>>Thanks in advance,
>>
>>esther
>>
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 



-- 
Esther Parrilla Endrino
Ground Segment Systems Division
DEIMOS SPACE S.L. http://www.deimos-space.com
e-mail: esther.parrilla@deimos-space.com
tel:    00 34 91 806 34 57

~ Code matters more than comercials ~

--


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


Mime
View raw message