Executing AppleScript from Java

I have a script that was working on os 10.2.x but after upgrading to 10.3.3 it seems to hang. I’m calling the script using the following java code:

// work around to OS 10.2.6 bug, which causes: NSAppleScriptErrorNumber = -1750
NSAppleScript myScript = new NSAppleScript( script );
// This dictionary holds any errors
// that are encountered during script execution
NSMutableDictionary errors = new NSMutableDictionary();
// Execute the script!
NSAppleEventDescriptor results = myScript.execute(errors);
System.err.println("Errors: " + errors);

The java code never returns from the execute() method.
The script itself makes calls to Filemaker to get it to export html/xml files. I’ve printed out the script in the java app and copied the text into a new script in Script Editor, which runs flawlessly.

Any idea what might be up or suggestions about how to go about debugging this?


Interesting followup: The script eventually finished after a long, long time (hours?!?). I left for lunch (put the computer to sleep) and it was still sitting there when I returned. It finally completed some time after I quit Filemaker. Is there something that could slow down the script to geologic speed?