我正在使用 JSF 在 Eclipse 中构建 webApp
我最近从hapi page下载了 hapi api ,并下载了 1.2V 并将 jars 添加到我项目中的 lib 文件夹中。并开始尝试在他们的示例页面中遵循示例,但随后我 import import ca.uhn.hl7v2.parser.GenericParser; 例如,我收到一条消息说
此元素既没有附加源也没有附加 Javadoc,因此找不到 Javadoc
.
这意味着什么?我没有正确添加罐子吗?我该怎么办?
编辑:
我的 java 类看起来像这样:
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;
}
}
我正在测试这个页面。我上传了一条 hl7 消息并尝试解析它,但一旦我到达解析,我就会收到一个错误。当我尝试调试它时。它给了我这个错误
严重:java.lang.NoClassDefFoundError:org/apache/xerces/xni/parser/XMLParserConfiguration javax.faces.el.EvaluationException:java.lang.NoClassDefFoundError:org/apache/xerces/xni/parser/XMLParserConfiguration