I am a student in Sigapore and I am doing a project now using a program called RFIDSim. Is`s a simulating program about RFID. A compiling error occured. just as the picture belowAsk Help for a compiling error about Low Level Reader Protocol, LLRP-error.jpg Anyone can help for this problem or have any suggestions? I will appreciate a lot. My Ant version is 1.8.2 and my jdk version is 1.4.2

This is the source contain the error:
package rfidsim.llrp.app;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

import jist.runtime.JistAPI;

import org.apache.log4j.Logger;
import org.jdom.JDOMException;
import org.llrp.ltk.exceptions.InvalidLLRPMessageExceptio n;
import org.llrp.ltk.generated.messages.ADD_ACCESSSPEC;
import org.llrp.ltk.generated.messages.ADD_ACCESSSPEC_RES PONSE;
import org.llrp.ltk.generated.messages.ADD_ROSPEC;
import org.llrp.ltk.generated.messages.ADD_ROSPEC_RESPONS E;
import org.llrp.ltk.generated.messages.DELETE_ACCESSSPEC_ RESPONSE;
import org.llrp.ltk.generated.messages.DELETE_ROSPEC_RESP ONSE;
import org.llrp.ltk.generated.messages.DISABLE_ACCESSSPEC _RESPONSE;
import org.llrp.ltk.generated.messages.DISABLE_ROSPEC_RES PONSE;
import org.llrp.ltk.generated.messages.ENABLE_ACCESSSPEC;
import org.llrp.ltk.generated.messages.ENABLE_ACCESSSPEC_ RESPONSE;
import org.llrp.ltk.generated.messages.ENABLE_ROSPEC_RESP ONSE;
import org.llrp.ltk.generated.messages.ERROR_MESSAGE;
import org.llrp.ltk.generated.messages.GET_ACCESSSPECS_RE SPONSE;
import org.llrp.ltk.generated.messages.GET_READER_CAPABIL ITIES_RESPONSE;
import org.llrp.ltk.generated.messages.GET_READER_CONFIG_ RESPONSE;
import org.llrp.ltk.generated.messages.GET_ROSPECS_RESPON SE;
import org.llrp.ltk.generated.messages.KEEPALIVE;
import org.llrp.ltk.generated.messages.KEEPALIVE_ACK;
import org.llrp.ltk.generated.messages.RO_ACCESS_REPORT;
import org.llrp.ltk.generated.messages.SET_READER_CONFIG_ RESPONSE;
import org.llrp.ltk.generated.messages.START_ROSPEC_RESPO NSE;
import org.llrp.ltk.generated.messages.STOP_ROSPEC_RESPON SE;
import org.llrp.ltk.types.LLRPMessage;
import org.llrp.ltk.util.LLRPConverter;
import org.llrp.ltk.util.Util;

import rfidsim.llrp.LLRPReaderAccessor;
import rfidsim.tag.RFIDTag;
import rfidsim.util.Triggerable;

public class GeneralLLRPApplication implements LLRPApplicationInterface,
Triggerable {

public static String ACCESSSPECS = "ADD_ACCESSSPECS";
public static String ROSPECS = "ADD_ROSPECS";
private Map llrps;
private Logger logger = Logger.getLogger(GeneralLLRPApplication.class);
private LLRPConverter conv;
private Properties properties;

public GeneralLLRPApplication() {
llrps = new HashMap();
conv = new LLRPConverter();
}

public static void main(String[] args) {
if (args.length != 2) {
System.out.println("GeneralLLRPApplication usage:");
System.out
.println("\t provide path to simulator properties file as first argument");
System.out
.println("\t and path to GeneralLLRPApplicationProperties file as second argument");
System.out.println();
System.out
.println("GeneralLLRPApplicationProperties file contains path to base message directory.");
System.out
.println("Currently only a single ADD_ROSPEC message per reader is supported but unlimited ADD_ACCESSSPEC");
System.out
.println("XML Encoded messages must be provided according to following folder structure");
System.out.println("\t /reader0");
System.out.println("\t +-> ADD_ACCESSSPECS");
System.out.println("\t +-> accessspec1.xml");
System.out.println("\t +-> ...");
System.out.println("\t +-> accessspecN.xml");
System.out.println("\t /reader0");
System.out.println("\t +-> ADD_ROSPECS");
System.out.println("\t +-> addrospec.xml");
System.out.println("\t ...");
System.out.println("\t /readerN");
System.out.println("\t +-> ADD_ACCESSSPECS");
System.out.println("\t +-> accessspec1.xml");
System.out.println("\t +-> ...");
System.out.println("\t +-> accessspecN.xml");
System.out.println("\t /readerN");
System.out.println("\t +-> ADD_ROSPECS");
System.out.println("\t +-> addrospec.xml");
} else {
String[] extraArgs = new String[1];
extraArgs[0] = args[1];
LLRPReaderAccessor.startSimulation(args[0],
GeneralLLRPApplication.class.getName(), extraArgs);
}
}

public void setupDone(String[] args) {
String propertiesFile = args[0];

try {
InputStream is = new FileInputStream(propertiesFile);
properties = new Properties();
properties.load(is);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String messagePath = (String) properties.get("messageFolder");
File root = new File(messagePath);
// message structure must be messages/reader#/
String[] perReader = root.list(new FilenameFilter() {
public boolean accept(File dir, String filename) {
if (filename.startsWith("reader")) {
return true;
} else {
return false;
}
}
});
for (int i = 0; i < perReader.length; i++) {
// add rospecs for each reader
LLRPReaderAccessor accessor = (LLRPReaderAccessor) llrps
.get(perReader[i]);
accessor.getReaderLogic().setAccessor(this);
File perReaderFolder = new File(messagePath + File.separator
+ perReader[i]);
String[] accessspecsFolder = perReaderFolder
.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith(ACCESSSPECS);
}
});
String[] accessSpecs = new File(messagePath + File.separator
+ perReader[i] + File.separator + accessspecsFolder[0])
.list();
for (int j = 0; j < accessSpecs.length; j++) {
if (accessSpecs[j].endsWith(".xml")) {

ADD_ACCESSSPEC add = (ADD_ACCESSSPEC) readXML(messagePath
+ File.separator + perReader[i] + File.separator
+ accessspecsFolder[0] + File.separator
+ accessSpecs[j]);
accessor.handleAddAccessSpec((ADD_ACCESSSPEC) add);
// and immediately active it
ENABLE_ACCESSSPEC enable = new ENABLE_ACCESSSPEC();
enable.setAccessSpecID(add.getAccessSpec()
.getAccessSpecID());
accessor.handleEnableAccessSpec(enable);
String test = new String("test");
}
}
String[] rospecsFolder = perReaderFolder.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith(ROSPECS);
}
});
String[] rospecs = new File(messagePath + File.separator
+ perReader[i] + File.separator + rospecsFolder[0]).list();
if (rospecs.length > 1) {
logger
.warn("more than one ADD_ROSPEC message found. All messages are ignored except for first one");
}
for (int k = 0; k < rospecs.length; k++) {
if (rospecs[k].endsWith(".xml")) {
accessor.handleAddRoSpec((ADD_ROSPEC) readXML(messagePath
+ File.separator + perReader[i] + File.separator
+ rospecsFolder[0] + File.separator + rospecs[k]));
k = rospecs.length;
}
}
}
// always stop after max running time
LLRPReaderAccessor first = (LLRPReaderAccessor) llrps.values()
.iterator().next();
first.getReaderLogic()
.startNewTrigger(
this,
new BigInteger((String) properties.get("duration"))
.longValue());
}

private LLRPMessage readXML(String path) {
LLRPMessage message = null;
try {
message = Util.loadXMLLLRPMessage(new File(path));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JDOMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return message;
}

public void handleAddAccessSpecResponse(ADD_ACCESSSPEC_RESPONS E spec) {
try {
logger.info(spec.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleAddROSpecResponse(ADD_ROSPEC_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleDeleteAccessSpecResponse(DELETE_ACCESSSPEC_R ESPONSE delete) {
try {
logger.info(delete.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleDeleteROSpecResponce(DELETE_ROSPEC_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleDisableAccessSpecResponse(
DISABLE_ACCESSSPEC_RESPONSE disable) {
try {
logger.info(disable.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleDisableROSpecResponse(DISABLE_ROSPEC_RESPONS E response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleEnableAccessSpecResponse(ENABLE_ACCESSSPEC_R ESPONSE enable) {
try {
logger.info(enable.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleEnableROSpecResponse(ENABLE_ROSPEC_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleGetAccessSpecResponse(GET_ACCESSSPECS_RESPON SE get) {
try {
logger.info(get.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleGetROSpecResponse(GET_ROSPECS_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleGetReaderCapabilitiesResponse(
GET_READER_CAPABILITIES_RESPONSE get) {
try {
logger.info(get.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleGetReaderConfigResponse(GET_READER_CONFIG_RE SPONSE get) {
try {
logger.info(get.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleStartROSpecResponse(START_ROSPEC_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleStopROSpecResponse(STOP_ROSPEC_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void addLLRPReaderAccessor(String name, LLRPReaderAccessor access) {
this.llrps.put(name, access);
}

public void handleROAccessReport(String from, RO_ACCESS_REPORT report) {
try {
logger.info("received report from reader: " + from);
logger.info(report.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// llrp.stop();
}

public void handleErrorMessage(ERROR_MESSAGE error) {
try {
logger.info(error.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleSetReaderConfigResponse(
SET_READER_CONFIG_RESPONSE response) {
try {
logger.info(response.toXMLString());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void handleKeepalive(KEEPALIVE keepalive) {
KEEPALIVE_ACK ack = new KEEPALIVE_ACK();
try {
logger.debug(keepalive.encodeXML());
} catch (InvalidLLRPMessageException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// llrp.handleKeepaliveACK(ack);
}

public void handleTriggerTimeout() {
Iterator iter = llrps.values().iterator();
while (iter.hasNext()) {
LLRPReaderAccessor temp = (LLRPReaderAccessor) iter.next();
temp.stop();

RFIDTag.tagLogger.debug(temp.getReaderLogic().getC urrentFrameStatistics().toCSV());
RFIDTag.tagLogger.debug("tags: "+temp.getReaderLogic().getTags().size());
}
logger.debug("stopping execution at " + JistAPI.getTime());
}

}