web stats
Mirth Community - View Single Post - Excel As Data Source
View Single Post
Old 07-08-2011, 05:43 AM
marmanold marmanold is offline
Mirth Newb
Join Date: Feb 2011
Location: Franklin, TN
Posts: 9
marmanold is on a distinguished road

Originally Posted by bernd05 View Post

I've tried to follow your instructions, but when I try to use the Channel I reveiced an error saying:

[2011-07-08 09:55:32,817]  
FATAL (org.mule.impl.DefaultComponentExceptionStrategy:84): The error is: null
	at com.webreach.mirth.connectors.js.JavaScriptMessageReceiver.poll(JavaScriptMessageReceiver.java:88)
	at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:90)
	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Unknown Source)
[2011-07-08 09:54:52,754]  
(org.mule.impl.DefaultComponentExceptionStrategy:83): The Default Component Exception Strategy has been invoked but there is no current event on the context
[2011-07-08 09:51:07,408]  
(com.webreach.mirth.connectors.js.JavaScriptMessageReceiver:152): org.mozilla.javascript.EcmaError: TypeError: Cannot call property getWorkbook in object [JavaPackage jxl.Workbook]. It is not a function, it is "object". (62c52ab0-7111-48f0-bafc-db7bccfbb578#9)
Any hints for me?

Thanks, Regards,
- Bernd
Unfortunately Mirth errors are rather cryptic. The "function not an object" error is something I've seen from time to time working with JAVA classes from within Mirth. It usually either means the JAVA class isn't loaded (Mirth hasn't been restarted since the .jar file was installed) or that the method isn't being used correctly.

You could try instantiating the object before using it. Something like:
var excelBook = new Packages.jxl.Workbook;
var excel = excelBook.getWorkbook(excelFile);
I also just realized that I left out the part in the code where I import the JAVA package. I believe the following is what I do in my channel. (I have another client Mirth setup installed at the moment, so I can't verify.)
That might fix the issue as well.

Viel Glück!
Michael Arnold| Electronic Data Interchange Specialist

PlayMaker CRM
Sales Innovation for Home Care
A Division of The ADAM Group
115 Southeast Parkway Court | Franklin, TN 37064
866.930.6847 | F: 866.232.6470 | PlayMakerCRM.com
Reply With Quote