I'm building a webApp in Eclipse using JSF
I recently download the hapi api from the hapi page, and downloaded the 1.2V and added the jars to my lib folder in my project. and started trying to follow th example in their examples page but then I import import ca.uhn.hl7v2.parser.GenericParser; for example, I get a message saying
This element neither has attached source nor attached Javadoc and hence no Javadoc could be found
.
what does that mean? did I not add the jars correctly? what do I do?
EDIT:
my java class looks like this:
package com.bravo.patient;
import ca.uhn.hl7v2.parser.GenericParser;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.app.Application;
import ca.uhn.hl7v2.app.Connection;
import ca.uhn.hl7v2.app.ConnectionHub;
import ca.uhn.hl7v2.app.Initiator;
import ca.uhn.hl7v2.app.SimpleServer;
import ca.uhn.hl7v2.llp.LLPException;
import ca.uhn.hl7v2.llp.LowerLayerProtocol;
import ca.uhn.hl7v2.llp.MinLowerLayerProtocol;
import ca.uhn.hl7v2.model.Message;
import ca.uhn.hl7v2.parser.EncodingNotSupportedException;
import ca.uhn.hl7v2.parser.Parser;
import ca.uhn.hl7v2.parser.PipeParser;
import com.bravo.SecuredPage;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
import java.io.InputStream;
import org.apache.myfaces.custom.fileupload.UploadedFile;
public class HL7Test extends SecuredPage{
static final Logger logger = Logger.getLogger(HL7Test.class);
private UploadedFile uploadedFile;
private String today = "";
public HL7Test(){
initialize();
secure();
}
private void secure(){
/** Assign the required permission elements to the any pages using this Backing Bean **/
registerSecurePageId("patient");
registerSecurePageAction("");
registerSecurePageComponent("");
}
public void initialize(){
}
public UploadedFile getUploadedFile(){
return this.uploadedFile;
}
public void setUploadedFile(UploadedFile uploadedFile){
this.uploadedFile = uploadedFile;
}
/**********************
ACTIONS
**********************/
public String actionTest(){
try{
String message = "n";
InputStream is = uploadedFile.getInputStream();
message = IOUtils.toString(is, "UTF-8");
Parser p = new GenericParser();
Message adt = p.parse(message);
}catch (Exception e) {
e.printStackTrace();
}
return "";
}
public String getToday(){
return this.today;
}
public void setToday(String today){
this.today = today;
}
}
I'm testing this page. I upload a hl7 message and try to parse it but as soon as I reach the parse, I get an error. as I try to debug it. it give me this error
SEVERE: java.lang.NoClassDefFoundError: org/apache/xerces/xni/parser/XMLParserConfiguration javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/apache/xerces/xni/parser/XMLParserConfiguration