0

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

.

enter image description here

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

Myy
  • 18,107
  • 11
  • 37
  • 57

2 Answers2

1

You want to see the documentation (javadoc) for an item. That item

1) comes from a jar file which 2) does not have a preprocessed jar file containing the javadoc html pages attached to that jar, and which does not have 3) a source zip attached to that jar (so Eclipse can generate the javadoc itself).

This is not an error. Your code will most likely run just fine. To fix it, rightclick the jar containing the item and attach either a javadoc zip file or the source zip.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
  • maybe that's not but is it related to this otehr error I get when I run the code>? – Myy Jun 15 '12 at 21:40
  • The edit is completely unrelated to the original question. You also need Apache Xerces on the classpath. Did you follow the installation instructions to the letter? – Thorbjørn Ravn Andersen Jun 16 '12 at 02:49
  • OMG, you are correct sir. I don't know why I don't have xerces library in there. I will add the remaining libraries. – Myy Jun 16 '12 at 16:47
0

It means that the jar you downloaded didn't contain javadoc. I don't know which version of Hapi you're using, but here's a link to the Maven repo with other Hapi jars and some of them contain the javadoc - Hapi.

Dan W
  • 5,718
  • 4
  • 33
  • 44
  • no it doesn't run. it gives me this error java.lang.NoClassDefFoundError: org/apache/xerces/xni/parser/XMLParserConfiguration – Myy Jun 15 '12 at 21:01
  • well, Its not a new error, it's just a different one. this error I got when I ran teh code. I debugged it and it crashed as soon as I tried utilizing a method in that class. I'll update the info on top. – Myy Jun 15 '12 at 21:29