Hello,
i want run the demo (http://hl7api.sourceforge.net/conf/compiler_demo.html) in hapi051 with the ConfGen -v adt_a01_profile.xml build demo. But in the Class ConformanceComponentBuilder following codes rais a error:
// The following is a workaround to allow for composite subcomponents.
Class c;
Object instance;
try {
c = Class.forName("ca.uhn.hl7v2.model." + versionString + ".datatype." + comp.getSubComponent(i).getDatatype());
//-->this Line rais the Error!!!
instance = c.getConstructor(null).newInstance(null);
-->Otput of the Demo-Application:
build
ConfGen: verbose display enabled
Generating Source...
log4j:WARN No appenders could be found for logger (ca.uhn.hl7v2.conf.parser.ProfileParser).
log4j:WARN Please initialize the log4j system properly.
Generating Segment: demo.MsgADTA01
Generating Field: demo.PIDchildren.FieldPatientName
ConformanceError:
ca.uhn.hl7v2.conf.classes.exceptions.ConformanceError: Could not find underlying SubComponent datatype. This is a bug. Exception: java.lang.NoSuchMethodException: ca.uhn.hl7v2.model.v24.datatype.ST.<init>(null)
Done.
if i comment out the line instance = c.getConstructor(null).newInstance(null); then it runs without errors.I think a problem with SubComponent?
i have attached the class ca.uhn.hl7v2.model.v24.datatype.ST which i use.
Is there a never version of hapi?