Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Model Driven Health Tools » org.eclipse.mdht.uml.cda.util.CDAUtil.init [java.lang.NullPointerException: null](ConsolFactory.eINSTANCE.createProcedureActivityAct2().init() NullPointer Issue)
org.eclipse.mdht.uml.cda.util.CDAUtil.init [java.lang.NullPointerException: null] [message #1761722] Thu, 11 May 2017 14:35 Go to next message
Nishi S is currently offline Nishi SFriend
Messages: 2
Registered: May 2017
Junior Member
We are using the following version of MDHT:
> MDHT R2.1 Version
> Binary Release : https://github.com/mdht/mdht-models/releases/tag/20170106

While invoking any "ConsolFactory.eINSTANCE.createXXX.init()" , sporadically got this nullpointer exception. Not able to reproduce everytime though.

Example of calling init()
ProcedureActivityAct2 act = ConsolFactory.eINSTANCE.createProcedureActivityAct2().init();

Error Details:
17:27:47 java.lang.NullPointerException: null
17:27:47 at org.eclipse.mdht.uml.cda.util.CDAUtil.init(CDAUtil.java:1111)
17:27:47 at org.eclipse.mdht.uml.cda.util.AnnotationBasedInitializer.initialize(AnnotationBasedInitializer.java:46)
17:27:47 at org.eclipse.mdht.emf.runtime.util.Initializer$Util.init(Initializer.java:470)
17:27:47 at org.eclipse.mdht.emf.runtime.util.Initializer$Util.init(Initializer.java:464)
17:27:47 at org.eclipse.mdht.emf.runtime.util.Initializer$Util.init(Initializer.java:442)
17:27:47 at org.openhealthtools.mdht.uml.cda.consol.impl.ProcedureActivityAct2Impl.init(ProcedureActivityAct2Impl.java:265)
17:27:47 at com.medplus.care360.cda.business.generator.camel.processor.procedures.ProcedureActivityActProcessor.createAct(ProcedureActivityActProcessor.java:61)
Re: org.eclipse.mdht.uml.cda.util.CDAUtil.init [java.lang.NullPointerException: null] [message #1763320 is a reply to message #1761722] Fri, 12 May 2017 15:01 Go to previous messageGo to next message
Sean Muir is currently offline Sean MuirFriend
Messages: 63
Registered: September 2015
Member
Not being able to reproduce consistently makes this issue problematic to isolate

Looking at the code - best guess is the annotation that is being used to initialize the object does not have a not null map
CDAUtil.init(object, annotation.getDetails().map());

The annotations are supported through the ecore model deployed in the jar

What is the environment you are running ?

We could add a better NPE check but need to be able to reproduce
Re: org.eclipse.mdht.uml.cda.util.CDAUtil.init [java.lang.NullPointerException: null] [message #1764158 is a reply to message #1763320] Fri, 26 May 2017 03:36 Go to previous message
Nishi S is currently offline Nishi SFriend
Messages: 2
Registered: May 2017
Junior Member
Thanks Sean for the reply.

The Null checks are all taken care at our end, but the NPE was coming from the library's CDAUtil.init() sporadically for the same criteria/inputs from our end.
It would be great if you can point the Source code.

We are using this release version:
https://github.com/mdht/mdht-models/releases/tag/20170106

We couldn't find source code for org.eclipse.mdht.uml.cda.util package anywhere.

Previous Topic:MedicationStatusObservation
Next Topic:Building source into a single jar
Goto Forum:
  


Current Time: Wed Apr 24 19:52:23 GMT 2024

Powered by FUDForum. Page generated in 0.03680 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top