Hello there,

I've just compiled and installed SDO C++ Milestone release 3 under Linux (Suse 9.3). However, when I run the test suite (sdotest.sh) I get this:

[...] tuscany/tuscany_sdo_cpp-1.0-incubator-M3-src> ./sdotest.sh
Using SDO installed at /home/worker/rozne/tuscany/tuscany_sdo_cpp-1.0-incubator-M3-src
Test Failed: 3 sdotest::jira980()
Test Failed: 16 sdotest::emptycs()
Test Failed: 35 sdotest::bunique()
Test Failed: 36 sdotest::buniqueread()
I/O warning : failed to load external entity "not_present.xsd"
I/O warning : failed to load external entity "not-present.xml"
Test Failed: 54 sdotest::merle1()
Test Failed: 55 sdotest::loadOpenNS()
Test Failed: 56 sdotest::saveOpen()
Test Failed: 57 sdotest::loadOpen()
I/O warning : failed to load external entity "sca-policy.xsd"
Test Failed: 65 sdotest::cssave2()
Test Failed: 66 sdotest::csload2()
Test Failed: 67 sdotest::cssave()
Test Failed: 68 sdotest::csload()
Test Failed: 105 sdotest::b46634()
Test Failed: 109 sdotest::b45933()
Test Failed: 111 sdotest::jira705()
Test Failed: 115 sdotest::cdatatest()
Test Failed: 116 sdotest::cloneopentest()
I/O warning : failed to load external entity "xml.xsd"
I/O warning : failed to load external entity "xhtml1-strict.xsd"
Test Failed: 117 sdotest::tuscany963()
Total tests:118 Tests passed:100

What's wrong with my installation?

I have to mention that I applied 2 small unofficial patches to DataObjectImpl.cpp and SDOXMLWriter.cpp . I got them from Albert Krzymowski, it seems that there were some issues with memory leaks and Java compatibility, or so.

Albert told me he had already submitted those patches to you, Tuscany Developers.

Any ideas?

--
    "Serce medrcow jest w domu zaloby,
     a serce glupcow w domu wesela."     (Koh 7:4)
*** DataObjectImpl.cpp	Wed Aug  8 16:28:43 2007
--- DataObjectImpl.cpp.orig	Wed Aug  8 16:26:25 2007
***************
*** 19,26 ****
  
  /* $Rev: 511929 $ $Date: 2007-02-26 17:54:36 +0000 (Mon, 26 Feb 2007) $ */
  
- /*  \date 2007/08/07 (AK) listValue freed. */
- 
  #include "commonj/sdo/disable_warn.h"
  #include "commonj/sdo/DataObjectImpl.h"
  
--- 19,24 ----
***************
*** 3189,3196 ****
        doValue(0),
        isnull(false),
        userdata((void*) 0xFFFFFFFF),
!       changesummaryobject(0),
!       listValue(0)
     {
        // open type support
        openBase = t.getPropertiesSize() ;
--- 3187,3193 ----
        doValue(0),
        isnull(false),
        userdata((void*) 0xFFFFFFFF),
!       changesummaryobject(0)
     {
        // open type support
        openBase = t.getPropertiesSize() ;
***************
*** 3221,3228 ****
        container(0),
        isnull(false),
        userdata((void*) 0xFFFFFFFF),
!       changesummaryobject(0),
!       listValue(0)
     {
        // open type support
        openBase = ObjectType->getPropertiesSize() ;
--- 3218,3224 ----
        container(0),
        isnull(false),
        userdata((void*) 0xFFFFFFFF),
!       changesummaryobject(0)
     {
        // open type support
        openBase = ObjectType->getPropertiesSize() ;
***************
*** 3281,3291 ****
                  i = PropertyValues.begin();
              }
          }
- 
- 	// AK: remove listValue if set. Verify if this pointer was not
- 	// copied when the object was duplicated.
- 	if(listValue != 0)
- 	  delete listValue;
  
          // Theory: A DO cant get here if its still attached to anything,
          //so we dont need to detach....
--- 3277,3282 ----
*** SDOXMLWriter.cpp	Wed Aug  8 18:58:20 2007
--- SDOXMLWriter.cpp.orig	Wed Aug  8 16:27:56 2007
***************
*** 19,28 ****
  
  /* $Rev: 509991 $ $Date: 2007-02-21 12:58:33 +0000 (Wed, 21 Feb 2007) $ */
  
- /*  \date 2007/08/07 (AK) write the root element with "tns" prefix */
- /*  \date 2007/08/07 (AK) write the xsi:type for subtypes          */
- 
- 
  #include "commonj/sdo/SDOXMLWriter.h"
  #include "commonj/sdo/SDOXMLString.h"
  #include "commonj/sdo/SDOString.h"
--- 19,24 ----
***************
*** 171,177 ****
                      writeXSIType = false;
                  }
  
-                 writeXSIType = true;
                  writeDO(root, elementURI, elementName, writeXSIType, true);
              }
              rc = xmlTextWriterEndDocument(writer);
--- 167,172 ----
***************
*** 697,705 ****
                  }
                  else
                  {
! 		    rc = xmlTextWriterStartElementNS(writer, NULL, elementName, NULL);
! 		  //AK: Always write tns in order to maintain Java Comapatiblity.
!                   //  rc = xmlTextWriterStartElementNS(writer, (const xmlChar*)"tns", elementName, elementURI);
                  }
                  if (rc < 0) {
                      SDO_THROW_EXCEPTION("writeDO", SDOXMLParserException, "xmlTextWriterStartElementNS failed");
--- 692,698 ----
                  }
                  else
                  {
!                     rc = xmlTextWriterStartElementNS(writer, NULL, elementName, elementURI);
                  }
                  if (rc < 0) {
                      SDO_THROW_EXCEPTION("writeDO", SDOXMLParserException, "xmlTextWriterStartElementNS failed");
***************
*** 706,712 ****
                  }
  
                  // For the root element we will now gather all the namespace information
!                 // namespaceMap[elementURI] = SDOXMLString("tns"); <- not needed now, the xmlTextWriterStartElementNS does the job (AK)
  
                  // We always add the xsi namespace. TODO we should omit if we can
                  namespaceMap[s_xsiNS] = s_xsi;
--- 699,705 ----
                  }
  
                  // For the root element we will now gather all the namespace information
!                 namespaceMap[elementURI] = SDOXMLString("tns");
  
                  // We always add the xsi namespace. TODO we should omit if we can
                  namespaceMap[s_xsiNS] = s_xsi;
***************
*** 720,726 ****
                  // Write the startElement for non-root object
                  SDOXMLString theName=elementName;
  
!                 /*if (!elementURI.isNull() 
                      && !elementURI.equals("")
                      && !elementURI.equals(s_commonjsdo)
                      && !elementURI.equals(tnsURI))
--- 713,719 ----
                  // Write the startElement for non-root object
                  SDOXMLString theName=elementName;
  
!                 if (!elementURI.isNull() 
                      && !elementURI.equals("")
                      && !elementURI.equals(s_commonjsdo)
                      && !elementURI.equals(tnsURI))
***************
*** 734,740 ****
                          theName += elementName;
                      }
                  }
!                  */
                  rc = xmlTextWriterStartElement(writer, theName);
                  if (rc < 0) {
                      SDO_THROW_EXCEPTION("writeDO", SDOXMLParserException, "xmlTextWriterStartElement failed");
--- 727,733 ----
                          theName += elementName;
                      }
                  }
! 
                  rc = xmlTextWriterStartElement(writer, theName);
                  if (rc < 0) {
                      SDO_THROW_EXCEPTION("writeDO", SDOXMLParserException, "xmlTextWriterStartElement failed");
***************
*** 781,788 ****
                  {
                      SDOXMLString theName=typeName;
  
!                     //if (!typeURI.isNull() && !typeURI.equals(tnsURI) && !typeURI.equals(""))
!                     if (!typeURI.isNull() && !typeURI.equals(""))
                      {
                          std::map<SDOXMLString,SDOXMLString>::iterator it = namespaceMap.find(typeURI);
                          if (it != namespaceMap.end())
--- 774,780 ----
                  {
                      SDOXMLString theName=typeName;
  
!                     if (!typeURI.isNull() && !typeURI.equals(tnsURI) && !typeURI.equals(""))
                      {
                          std::map<SDOXMLString,SDOXMLString>::iterator it = namespaceMap.find(typeURI);
                          if (it != namespaceMap.end())
***************
*** 976,992 ****
                                              xsiTypeNeeded = true;
                                          }
                                      }
! 				    
! 				    //AK: Write xsi:type if the value type is a subtype .
! 				    if( typeImpl.getPropertyImpl(seqPropName) != 0){
! 
! 				      DataObjectImpl* doValueImpl = (DataObjectImpl*)(DataObject*)doValue;
! 				      const TypeImpl& valueTypeImpl = doValueImpl->getTypeImpl();
! 
! 				      xsiTypeNeeded = ! valueTypeImpl.equals(typeImpl.getPropertyImpl(seqPropName)->getType());
! 
! 				    }
! 
                                      writeDO(doValue, seqPropURI, seqPropName, xsiTypeNeeded);
                                  }
                              }
--- 968,974 ----
                                              xsiTypeNeeded = true;
                                          }
                                      }
! 	
                                      writeDO(doValue, seqPropURI, seqPropName, xsiTypeNeeded);
                                  }
                              }
***************
*** 1077,1094 ****
                              }
                              else
                              {
!                                 DataObjectPtr propDO = dataObject->getDataObject(pl[i]);
! 
! 				//AK: Write xsi:type if the value type is a subtype .
! 				if(typeImpl.getPropertyImpl(propertyName) != 0 ){
! 				  
! 				  DataObjectImpl* doValueImpl = (DataObjectImpl*)(DataObject*)propDO;
! 				  const TypeImpl& valueTypeImpl = doValueImpl->getTypeImpl();
! 				  
! 				  xsiTypeNeeded = ! valueTypeImpl.equals(typeImpl.getPropertyImpl(propertyName)->getType());
! 				  
! 				}
! 
                                  writeDO(propDO, propertyTypeURI, propertyName, xsiTypeNeeded);
                              }
                          }
--- 1059,1065 ----
                              }
                              else
                              {
!                                 DataObjectPtr propDO = dataObject->getDataObject(pl[i]);                
                                  writeDO(propDO, propertyTypeURI, propertyName, xsiTypeNeeded);
                              }
                          }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to