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 Steve Heller <st...@steveheller.com> on 2001/11/30 03:09:36 UTC

mutex problem

In the following code:

int XMLFile::Open(const char* FileName)
{
    const char*              xmlFile = 0;
    DOMParser::ValSchemes    valScheme = DOMParser::Val_Auto;
    bool                     doNamespaces    = false;

    m_Modified = false;
    m_FileName = FileName;

    ifstream TestStream (FileName);
    String TestString;
    TestStream >> TestString;
    if (TestStream.fail())
      {
      m_Doc = DOM_Document::createDocument();
      DOM_Element NewChild = XMLUtil::CreateElement(m_Doc,"form");
      m_Doc.appendChild(NewChild);

      m_Modified = true;
      }

    else
      {
    
      // Instantiate the DOM parser.
      DOMParser parser;
}

The parser instantiation blows up with an exception in
XMLMutex::lock(). I'm using xerces-c-src1_3_0. Should I upgrade to the
latest stable version, and if so, what version is that?

--
Steve Heller, WA0CPP
http://www.steveheller.com
Author of "Learning to Program in C++", Who's Afraid of C++?", "Who's Afraid of More C++?",
"Optimizing C++", and other books
Free online versions of "Who's Afraid of C++?" and "Optimizing C++" are now available
at http://www.steveheller.com/whos and http://www.steveheller.com/opt

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


Re: mutex problem

Posted by Steve Heller <st...@steveheller.com>.
I think that's the problem. Thanks.

On Thu, 29 Nov 2001 18:18:35 -0800, "Olivier Schmitt"
<sc...@metaintegration.net> wrote:

>Did you do XMLPlatformUtils::Init() before this code ?
>
>Olivier
>
>-----Original Message-----
>From: Steve Heller [mailto:steve@steveheller.com]
>Sent: Thursday, November 29, 2001 6:10 PM
>To: xerces-c-dev@xml.apache.org
>Subject: mutex problem
>
>
>In the following code:
>
>int XMLFile::Open(const char* FileName)
>{
>    const char*              xmlFile = 0;
>    DOMParser::ValSchemes    valScheme = DOMParser::Val_Auto;
>    bool                     doNamespaces    = false;
>
>    m_Modified = false;
>    m_FileName = FileName;
>
>    ifstream TestStream (FileName);
>    String TestString;
>    TestStream >> TestString;
>    if (TestStream.fail())
>      {
>      m_Doc = DOM_Document::createDocument();
>      DOM_Element NewChild = XMLUtil::CreateElement(m_Doc,"form");
>      m_Doc.appendChild(NewChild);
>
>      m_Modified = true;
>      }
>
>    else
>      {
>
>      // Instantiate the DOM parser.
>      DOMParser parser;
>}
>
>The parser instantiation blows up with an exception in
>XMLMutex::lock(). I'm using xerces-c-src1_3_0. Should I upgrade to the
>latest stable version, and if so, what version is that?


--
Steve Heller, WA0CPP
http://www.steveheller.com
Author of "Learning to Program in C++", Who's Afraid of C++?", "Who's Afraid of More C++?",
"Optimizing C++", and other books
Free online versions of "Who's Afraid of C++?" and "Optimizing C++" are now available
at http://www.steveheller.com/whos and http://www.steveheller.com/opt

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


RE: mutex problem

Posted by Olivier Schmitt <sc...@metaintegration.net>.
Did you do XMLPlatformUtils::Init() before this code ?

Olivier

-----Original Message-----
From: Steve Heller [mailto:steve@steveheller.com]
Sent: Thursday, November 29, 2001 6:10 PM
To: xerces-c-dev@xml.apache.org
Subject: mutex problem


In the following code:

int XMLFile::Open(const char* FileName)
{
    const char*              xmlFile = 0;
    DOMParser::ValSchemes    valScheme = DOMParser::Val_Auto;
    bool                     doNamespaces    = false;

    m_Modified = false;
    m_FileName = FileName;

    ifstream TestStream (FileName);
    String TestString;
    TestStream >> TestString;
    if (TestStream.fail())
      {
      m_Doc = DOM_Document::createDocument();
      DOM_Element NewChild = XMLUtil::CreateElement(m_Doc,"form");
      m_Doc.appendChild(NewChild);

      m_Modified = true;
      }

    else
      {

      // Instantiate the DOM parser.
      DOMParser parser;
}

The parser instantiation blows up with an exception in
XMLMutex::lock(). I'm using xerces-c-src1_3_0. Should I upgrade to the
latest stable version, and if so, what version is that?

--
Steve Heller, WA0CPP
http://www.steveheller.com
Author of "Learning to Program in C++", Who's Afraid of C++?", "Who's
Afraid of More C++?",
"Optimizing C++", and other books
Free online versions of "Who's Afraid of C++?" and "Optimizing C++" are
now available
at http://www.steveheller.com/whos and http://www.steveheller.com/opt

---------------------------------------------------------------------
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