I meant create a "meta" data source, create a point in it, and give it any old script to give the point a value.
The only thing potentially wrong that i could see in the code is possible failure to create the Javascript engine, which would be an environmental thing, probably to do with the JVM. Of course, if you're not using the most current Mango version (1.6.4) that could be an issue too.