IBM Support

C#-to-UML transformation terminates with NullPointerException if the C# source code is referencing a generic delegate type from an assembly

Troubleshooting


Problem

The C#-to-UML transformation of the IBM Rational Modeling Extension for Microsoft .NET may abort with a "java.lang.NullPointerException" if the C# source code contains an event handler which uses a generic delegate type from an assembly .

Symptom

If C# code is as follows:

using System;
public class Sample
{

    public event EventHandler<SampleEventArgs> HandleChange;

}

At the end of the UML to C# Transformation, the following error message appears:

Transformation execution status
 java.lang.NullPointerException
 java.lang.NullPointerException
   Transform context stack
   java.lang.NullPointerException

     Transform 1805347739:  Element "Processing field " was executing source "com.ibm.xtools.cli.model.impl.EventImpl@38bb38bb (modifiable: true, generated: false, startLine: 13, startColumn: 9, endLine: 13, endColumn: 85) (documentation: null, name: UpdateCheckFinished, attributeSections: null, preUsercode: , postUsercode: ) (modifiers: 512) (hasAccessor: false, initializer: null)"

     Transform 1605394352:  Element "com.ibm.xtools.transform.csharp.uml..extractor.VariableExtractor" was executing source "com.ibm.xtools.cli.model.impl.CompositeTypeDeclarationImpl@31443144 (modifiable: true, generated: false, startLine: 9, startColumn: 5, endLine: 69, endColumn: 6) (documentation: , name: TestClass, attributeSections: null, preUsercode: , postUsercode: ) (fullyQualifiedName: Test.Forms.TestClass) (modifiers: 512) (kind: CLASS, partial: false)"

     Transform com.ibm.xtools.transform.csharp.uml.NamespaceTransform:  Element "com.ibm.xtools.transform.csharp.uml..extractor.CompositeTypesExtractor" was executing source "com.ibm.xtools.cli.model.impl.NamespaceDeclarationImpl@30403040 (modifiable: true, generated: false, startLine: 7, startColumn: 1, endLine: 70, endColumn: 2) (documentation: , name: Forms, attributeSections: null, preUsercode: , postUsercode: ) (fullyQualifiedName: Test.Forms)"

     Transform com.ibm.xtools.transform.csharp.uml.NamespaceTransform:  Element "com.ibm.xtools.transform.csharp.uml..extractor.NamespaceExtractor" was executing source "com.ibm.xtools.cli.model.impl.NamespaceDeclarationImpl@2f2b2f2b (modifiable: true, generated: false, startLine: 7, startColumn: 1, endLine: 70, endColumn: 2) (documentation: null, name: Genius, attributeSections: null, preUsercode: , postUsercode: ) (fullyQualifiedName: Test)"

     Transform com.ibm.xtools.transform.csharp.uml.NamespaceTransform:  Element "com.ibm.xtools.transform.csharp.uml..extractor.NamespaceExtractor" was executing source "com.ibm.xtools.cli.model.impl.CompilationUnitImpl@27fe27fe (modifiable: true, generated: false, startLine: -1, startColumn: -1, endLine: -1, endColumn: -1) (name: TestClass.cs, lastTimestamp: 1242208696000, filePath: Classes\TestClass.cs) (complete: true, globalAttributeSections: null, preprocessorDirectives: null)"

     Transform FolderTransform:  Element "com.ibm.xtools.transform.csharp.uml..extractor.CompilationUnitExtractor" was executing source "com.ibm.xtools.cli.model.impl.FolderImpl@66166616 (modifiable: true, generated: false, startLine: -1, startColumn: -1, endLine: -1, endColumn: -1) (name: Classes, lastTimestamp: null, filePath: Classes)"

     Transform C# to UML:  Element "com.ibm.xtools.transform.csharp.uml..extractor.FolderExtractor" was executing source "[com.ibm.xtools.cli.model.impl.ProjectImpl@5c4f5c4f (modifiable: true, generated: false, startLine: -1, startColumn: -1, endLine: -1, endColumn: -1) (name: Genius.Forms, lastTimestamp: null, filePath: C:\data\Test.Forms.csproj) (dotnetName: Test.Forms)]"

Cause

This issue has been identified as a product defect and has been logged as a Authorized Program Analysis Report (APAR) PK88193.

Resolving The Problem

Contact IBM Rational Client Support to troubleshoot the problem.

[{"Product":{"code":"SS5HXK","label":"Rational Modeling Extension for Microsoft .NET"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Transformation","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8;7.0.0.9;7.0.5;7.0.5.1;7.0.5.2;7.0.5.3;7.0.5.4;7.5;7.5.1;7.5.2;7.5.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

RME.NET

Document Information

Modified date:
16 June 2018

UID

swg21391418