I am getting an error in the ReqIf Importer converter tool. 


Error message

Object reference not set to an instance of an object. 


Resolution:

Complete a conversion analysis using the tool by clicking Validate Files



You'll get a list of the errors. Below is one example of errors:  


The reason for the errors may be in the definition of the ReqIF export from SystemWeaver. 


For example, the errors highlighted in blue above indicate that in the file, an Object of the type X_SSRP can be found having a number of attributes, but in the SPEC-OBJECT-TYPE declaration for X_SSRP these attributes are not defined.


For a quick fix, you can copy the attribute definition from another (e.g., X_RQ) and replace "X_RQ" with "X_SSRP" like this:

<SPEC-OBJECT-TYPE IDENTIFIER="X_SSRP" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="Document">
                    <SPEC-ATTRIBUTES>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.ObjectText" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.ObjectText">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.ObjectHeading" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.ObjectHeading">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.Status" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.Status">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.VersionNumber" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.VersionNumber">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.VersionText" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.VersionText">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.VersionID" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.VersionID">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.ChapterName" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.ChapterName">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.Text" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.Text">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.SystemWeaverID" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="SystemWeaverID">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-INTEGER IDENTIFIER="X_SSRP.Priority" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.Priority">
                            <TYPE>
                                <DATATYPE-DEFINITION-INTEGER-REF>ID_SW_IntegerType</DATATYPE-DEFINITION-INTEGER-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-INTEGER>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.VerificationMethod" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.VerificationMethod">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-XHTML IDENTIFIER="X_SSRP.Name" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ReqIF.Name">
                            <TYPE>
                                <DATATYPE-DEFINITION-XHTML-REF>ID_SW_XhtmlFormatType</DATATYPE-DEFINITION-XHTML-REF>
                            </TYPE>
                        </ATTRIBUTE-DEFINITION-XHTML>
                        <ATTRIBUTE-DEFINITION-ENUMERATION IDENTIFIER="X_SSRP.ASIL" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="ASIL Class">
                            <TYPE>
                                <DATATYPE-DEFINITION-ENUMERATION-REF>ID_SW_EnumerationType</DATATYPE-DEFINITION-ENUMERATION-REF>
                            </TYPE>
                            <DEFAULT-VALUE>
                                <ATTRIBUTE-VALUE-ENUMERATION>
                                    <VALUES>
                                        <ENUM-VALUE-REF>D</ENUM-VALUE-REF>
                                    </VALUES>
                                    <DEFINITION>
                                        <ATTRIBUTE-DEFINITION-ENUMERATION-REF>X_SSRP.ASIL</ATTRIBUTE-DEFINITION-ENUMERATION-REF>
                                    </DEFINITION>
                                </ATTRIBUTE-VALUE-ENUMERATION>
                            </DEFAULT-VALUE>
                        </ATTRIBUTE-DEFINITION-ENUMERATION>
                    </SPEC-ATTRIBUTES>
                </SPEC-OBJECT-TYPE>

Before doing this, it looked like this:

<SPEC-OBJECT-TYPE IDENTIFIER="X_SSRP" LAST-CHANGE="2018-10-09T15:55:00+01:00" LONG-NAME="Document">
                    <SPEC-ATTRIBUTES/>
                </SPEC-OBJECT-TYPE>

This quickfix allows you to load the file. The rest of the errors have to do with not having all ASIL values defined within the enum attribute definition and having "THE-VALUE="" " within a tag where it shouldn't be. See below with red highlighting.

<ATTRIBUTE-VALUE-XHTML THE-VALUE="1a1">

If the file comes from SystemWeaver, then these errors can be fixed in the ReqIF export definition.

I am getting an error in the ReqIf Importer converter tool. 


Error message

There are duplicate specObjects in the files. See log for details.


Resolution:

The error indicates that the RegIF file that you are trying to convert to XML using the ReqIF Importer tool contains duplicate SpecObjects, which means the same object (with the same identifier) has been added to the file more than once. This case is not valid according to the ReqIF standard and might lead into some issues if you ignore this warning.


In order to solve this issue, make sure the original file is fixed by removing the duplicates. Then, try to convert the new ReqIF file.


To find out the duplicate object(s), look into the log file. The log might include information about these duplicate object(s).