[daisy] importPackage does not work in Document Task
Bruno Dumon
bruno at outerthought.org
Thu Sep 6 03:45:45 CDT 2007
Hi,
On Wed, 2007-09-05 at 15:03 +0200, Jonas Tamsyn wrote:
> Hi,
>
>
>
> When I try to use the importPackage (or inputClass) function in a
> document task script I get the following error:
>
>
>
> org.mozilla.javascript.EcmaError: ReferenceError: "importPackage" is not defined. (#1)
> at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3229)
> at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3219)
> at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3292)
> at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:1894)
> at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2923)
> at script(:1)
> at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
> at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
> at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
> at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
> at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:172)
> at org.outerj.daisy.doctaskrunner.serverimpl.TaskRunner.run(TaskRunner.java:96)
> at java.lang.Thread.run(Unknown Source)
>
>
>
> Normally you should be able to use this function here.
>
> Could it be an error in the execution of the script in the
> doctaskrunner?
I did a quick google search: importPackage is not available by default,
and is provided by ImporterTopLevel [1].
You could create a jira issue for this (issues.cocoondev.org). If you
want to try to fix it yourself (patch welcome!), the relevant code in
Daisy is in:
services/doctaskrunner/server-impl/src/java/org/outerj/daisy/doctaskrunner/serverimpl/TaskRunner.java
[1] http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/ImporterTopLevel.html
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
More information about the daisy
mailing list