-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mod rhino failing on javascript error #22
Comments
Hmm. I am not able to reproduce this. Do you have any more information you can give me to go on?
It's clear that you're getting an error where |
Below is a repro and I am including the vertx version I am using.SE-STEOWENS-MB1:SessionService sowens$ vertx version2.1M5 (built 2014-01-30 08:25:08) SE-STEOWENS-MB1:SessionService sowens$ cat Server.jsvar http = require('vertx/http');http.createHttpServer().requestHandler(function(req) { var file = req.path() === '/' ? 'index.html' : req.path(); req.response.chunked(true); req.response.write('Hello world'); req.response.end();}).listen(8080);SE-STEOWENS-MB1:SessionService sowens$ vertx run Server.jsUsing java.util.logging as the default logging framework -Dio.netty.leakDetectionLevel: simple -Dio.netty.eventLoopThreads: 16 java.nio.ByteBuffer.cleaner: available java.nio.Buffer.address: available sun.misc.Unsafe.theUnsafe: available sun.misc.Unsafe.copyMemory: available java.nio.Bits.unaligned: true -Dio.netty.noKeySetOptimization: false -Dio.netty.selectorAutoRebuildThreshold: 512 Failed in deploying verticle org.mozilla.javascript.EvaluatorException: missing name after . operator (file:/usr/local/vert.x-2.1M5/sys-mods/io.vertx -------- Original Message -------- http.createHttpServer().requestHandler(function(req) { |
How would we identify a discrepancy between Rhino Jar's. I am using the same version you are of vertx. Is vertx self contained or is it possible that it is pulling in other Jar files from elsewhere? Also, just why would you use a keyword as a property name anyhow? It plays havoc with my syntax checker in the IDE. |
"Also, just why would you use a keyword as a property name anyhow? It plays havoc with my syntax checker in the IDE." - NVM This question should properly be directed to the Mongoose team who likes to define schemas with property names and values that correspond to javascript keywords, when simply placing "" marks around them would fix the syntax checking. |
Well, yes the Rhino jar is shipped with mod-lang-rhino in version 2.0.0-final. If you look in As for using |
Ok so when I look in the directory:se-steowens-mb1:lib sowens$ ls /usr/local/vert.x/sys-mods/io.vertx -------- Original Message -------- |
I am using the distro for vert.x-2.1M5, which includes
io.vertx
lang-rhino2.0.0-finalAt any rate any app I write dies with this error:
Failed in deploying verticle
org.mozilla.javascript.EvaluatorException: missing name after . operator (file:/usr/local/vert.x-2.1M5/sys-mods/io.vertx
lang-rhino2.0.0-final/vertx/http.js#1029)at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)
at org.mozilla.javascript.Parser.addError(Parser.java:146)
at org.mozilla.javascript.Parser.reportError(Parser.java:160)
at org.mozilla.javascript.Parser.memberExprTail(Parser.java:2015)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:1953)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1808)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:1737)
at org.mozilla.javascript.Parser.addExpr(Parser.java:1718)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1698)
at org.mozilla.javascript.Parser.relExpr(Parser.java:1672)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:1628)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1617)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1606)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1595)
at org.mozilla.javascript.Parser.andExpr(Parser.java:1583)
at org.mozilla.javascript.Parser.orExpr(Parser.java:1571)
at org.mozilla.javascript.Parser.condExpr(Parser.java:1554)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:1539)
at org.mozilla.javascript.Parser.expr(Parser.java:1518)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1245)
at org.mozilla.javascript.Parser.statement(Parser.java:708)
at org.mozilla.javascript.Parser.parseFunctionBody(Parser.java:463)
at org.mozilla.javascript.Parser.function(Parser.java:592)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2231)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:1950)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1808)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:1737)
at org.mozilla.javascript.Parser.addExpr(Parser.java:1718)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1698)
at org.mozilla.javascript.Parser.relExpr(Parser.java:1672)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:1628)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1617)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1606)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1595)
at org.mozilla.javascript.Parser.andExpr(Parser.java:1583)
at org.mozilla.javascript.Parser.orExpr(Parser.java:1571)
at org.mozilla.javascript.Parser.condExpr(Parser.java:1554)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:1539)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:1545)
at org.mozilla.javascript.Parser.expr(Parser.java:1518)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1201)
at org.mozilla.javascript.Parser.statement(Parser.java:708)
at org.mozilla.javascript.Parser.parse(Parser.java:401)
at org.mozilla.javascript.Parser.parse(Parser.java:359)
at org.mozilla.javascript.Context.compileImpl(Context.java:2254)
at org.mozilla.javascript.Context.compileReader(Context.java:1202)
at org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBase.getModuleScript(CachingModuleScriptProviderBase.java:89)
at org.mozilla.javascript.commonjs.module.provider.SoftCachingModuleScriptProvider.getModuleScript(SoftCachingModuleScriptProvider.java:67)
at org.vertx.java.platform.impl.RhinoVerticleFactory$1.getModuleScript(RhinoVerticleFactory.java:153)
at org.mozilla.javascript.commonjs.module.Require.getModule(Require.java:363)
at org.mozilla.javascript.commonjs.module.Require.getExportedModuleInterface(Require.java:264)
at org.mozilla.javascript.commonjs.module.Require.call(Require.java:218)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c2._c0(file:/usr/local/vert.x-2.1M5/sys-mods/io.vertx
lang-rhino2.0.0-final/vertx.js:67)at org.mozilla.javascript.gen.c2.call(file:/usr/local/vert.x-2.1M5/sys-mods/io.vertx
lang-rhino2.0.0-final/vertx.js)at org.mozilla.javascript.gen.c2.exec(file:/usr/local/vert.x-2.1M5/sys-mods/io.vertx
lang-rhino2.0.0-final/vertx.js)at org.mozilla.javascript.commonjs.module.Require.executeModuleScript(Require.java:340)
at org.mozilla.javascript.commonjs.module.Require.getExportedModuleInterface(Require.java:288)
at org.mozilla.javascript.commonjs.module.Require.call(Require.java:218)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c1._c0(file:/Users/sowens/Documents/workspace/SessionService/app.js:1)
at org.mozilla.javascript.gen.c1.call(file:/Users/sowens/Documents/workspace/SessionService/app.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.gen.c1.call(file:/Users/sowens/Documents/workspace/SessionService/app.js)
at org.mozilla.javascript.gen.c1.exec(file:/Users/sowens/Documents/workspace/SessionService/app.js)
at org.mozilla.javascript.commonjs.module.Require.executeModuleScript(Require.java:340)
at org.mozilla.javascript.commonjs.module.Require.getExportedModuleInterface(Require.java:288)
at org.mozilla.javascript.commonjs.module.Require.requireMain(Require.java:137)
at org.vertx.java.platform.impl.RhinoVerticleFactory$RhinoVerticle.start(RhinoVerticleFactory.java:229)
at org.vertx.java.platform.Verticle.start(Verticle.java:82)
at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1708)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:744)
The text was updated successfully, but these errors were encountered: