on 11-01-2006 1:21 AM
Guys,
I have developed a adapter EJB module to convert an excel file to xml. When I execute my module, I am getting an error "Unable to recognize OLE stream".
<b>jxl.read.biff.BiffExeption: Unable to recognize OLE stream.</b>
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
throws ModuleException {
//Object obj = null;
//Message msg = null;
try {
Audit.addAuditLogEntry(amkey, AuditLogStatus.SUCCESS, "Entered ModuleData method");
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
// Write Audit message
amkey = new AuditMessageKey(msg.getMessageId(), AuditDirection.OUTBOUND);
Audit.addAuditLogEntry(amkey, AuditLogStatus.SUCCESS,
"Custom adapter module MyProjectEJB called: Method ModuleData");
XMLPayload xp = msg.getDocument();
if (xp != null) {
byte by[] = convert(xp.getContent());
xp.setContent(by);
Audit.addAuditLogEntry(amkey, AuditLogStatus.SUCCESS,
"Custom adapter module MyProjectEJB called: Method convert executed");
}
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {
Audit.addAuditLogEntry(amkey, AuditLogStatus.ERROR, "Error in method ModuleData");
}
return inputModuleData;
}
// Transform the excel data into xml so that the Adapter Engine can do the processing.
public byte[] convert(byte src[]) throws Exception {
String xmldata = "";
try {
Audit.addAuditLogEntry(amkey, AuditLogStatus.SUCCESS,
"src: " + src.length);
String err = "";
ByteArrayInputStream f5 = new ByteArrayInputStream(src);
Audit.addAuditLogEntry(amkey, AuditLogStatus.SUCCESS,
"ByteArrayInputStream f5 = new ByteArrayInputStream(src)- executed");
<b>Workbook wb = Workbook.getWorkbook(f5);</b> -
> After this step I am getting that error.
Any ideas are greatly appreciated. I connect to unix server to get the file using FILE adapter/custom module.
Thanks,
Shanth
Hi,
Did you cross check your module with this howtoguide-
Also this thread discussion-
May help you
Regards,
moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.