Opened 7 years ago

Closed 7 years ago

#16079 closed defect (wontfix)

userConfig is empty; rhino does not work

Reported by: fbest Owned by: Colin Snover
Priority: undecided Milestone: tbd
Component: Doc parser Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

in js-doc-parse/dojo/dojo.js +156

for(var baseUrl = userConfig.baseUrl || ".", arg, rhinoArgs = this.arguments, i = 0; i < rhinoArgs.length;){

userConfig is empty, shouldn't there be the values from config.js? this causes baseUrl to be "."

This causes fail loading configRhino: (nodejs works fine with similar code/equaling path (./_base/configNode.js))

load(baseUrl + "/_base/configRhino.js");

js: Couldn't read source file "./_base/configRhino.js: ./_base/configRhino.js >> (No such file or directory)". js: uncaught JavaScript? runtime exception: ReferenceError?: "rhinoDojoConfig" >> is not defined.

after replacing baseUrl hardcodet to the absolute path:

org.mozilla.javascript.WrappedException?: Wrapped java.net.MalformedURLException: no protocol: main.js

at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773) at org.mozilla.javascript.MemberBox?.invoke(MemberBox?.java:183) at org.mozilla.javascript.FunctionObject?.call(FunctionObject?.java:413) at org.mozilla.javascript.optimizer.OptRuntime?.callName(OptRuntime?.java:97) at org.mozilla.javascript.gen.c2._c11(Unknown Source) at org.mozilla.javascript.gen.c2.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.callN(OptRuntime?.java:86) at org.mozilla.javascript.gen.c1._c76(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.call1(OptRuntime?.java:66) at org.mozilla.javascript.gen.c1._c7(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.callName(OptRuntime?.java:97) at org.mozilla.javascript.gen.c1._c36(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.callName(OptRuntime?.java:97) at org.mozilla.javascript.gen.c1._c40(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.callName(OptRuntime?.java:97) at org.mozilla.javascript.gen.c1._c11(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.callName(OptRuntime?.java:97) at org.mozilla.javascript.gen.c1._c1(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime?.call2(OptRuntime?.java:76) at org.mozilla.javascript.gen.c1._c0(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.ContextFactory?.doTopCall(ContextFactory?.java:398) at org.mozilla.javascript.ScriptRuntime?.doTopCall(ScriptRuntime?.java:3065) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.gen.c1.exec(Unknown Source) at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:564) at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:486) at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:452) at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443) at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196) at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117) at org.mozilla.javascript.Context.call(Context.java:515) at org.mozilla.javascript.ContextFactory?.call(ContextFactory?.java:507) at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179) at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)

Caused by: java.net.MalformedURLException: no protocol: main.js

at java.net.URL.<init>(URL.java:583) at java.net.URL.<init>(URL.java:480) at java.net.URL.<init>(URL.java:429) at org.mozilla.javascript.tools.shell.Global.readUrl(Global.java:1030) at org.mozilla.javascript.tools.shell.Global.readUrl(Global.java:811) at sun.reflect.NativeMethodAccessorImpl?.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl?.invoke(NativeMethodAccessorImpl?.java:57) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.mozilla.javascript.MemberBox?.invoke(MemberBox?.java:161) ... 39 more

Change History (3)

comment:1 Changed 7 years ago by fbest

here a better stacktrace (ringo):

Wrapped java.net.MalformedURLException: no protocol: main.js (/foo/js-doc-parse/dojo/_base/configRhino.js#114)

at /js-doc-parse/dojo/_base/configRhino.js:114 (anonymous)

at /js-doc-parse/dojo/dojo.js:1409 (anonymous)

at /js-doc-parse/dojo/dojo.js:93 (anonymous)

at /js-doc-parse/dojo/dojo.js:654 (anonymous)

at /js-doc-parse/dojo/dojo.js:719 (anonymous)

at /js-doc-parse/dojo/dojo.js:124 (anonymous)

at /js-doc-parse/dojo/dojo.js:1789 (anonymous)

at /js-doc-parse/dojo/dojo.js:1

comment:2 Changed 7 years ago by fbest

invalid: nodejs detecs the relative path but rhino not. so you have to change the dir :/

comment:3 Changed 7 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

The documentation parser does not support Rhino. Please use Node.

Note: See TracTickets for help on using tickets.