In an unfortunate turn of events, I've run into exactly the same error as a.meyer. Similar situation too. I've been working on something on and off for a few weeks. Today I went to run the script and it produced the error above. I updated Photoshop and Java, which had no effect. I even installed ExtendScript, and that's starting to look like a can of worms I can't afford to open tonight.
If you'd like, I'd be happy to send along my PSD.