Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

error with react-0.14.7, would somebody give me some help? tks #5

Closed
99937272 opened this issue Mar 21, 2016 · 3 comments
Closed

error with react-0.14.7, would somebody give me some help? tks #5

99937272 opened this issue Mar 21, 2016 · 3 comments

Comments

@99937272
Copy link

...
Caused by: javax.script.ScriptException: Unable to resolve: fbjs/lib/ExecutionEnvironment in at line number 93 at column number 2
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:451)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at de.matrixweb.jreact.JReact.render(JReact.java:177)
... 26 more
Caused by: :93:2 Unable to resolve: fbjs/lib/ExecutionEnvironment
at jdk.nashorn.internal.runtime.ECMAException.create(ECMAException.java:113)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:93)
at jdk.nashorn.internal.scripts.Script$Recompilation$28$56AAAAA$^function_.L:1(:16)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:86)
at jdk.nashorn.internal.scripts.Script$Recompilation$26$56AAAAA$^function_.L:1(:16)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:86)
at jdk.nashorn.internal.scripts.Script$Recompilation$24$56AAAAA$^function_.L:1(:16)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:86)
at jdk.nashorn.internal.scripts.Script$Recompilation$20$56AAAAA$^function_.L:1(:18)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:86)
at jdk.nashorn.internal.scripts.Script$Recompilation$18$56AAAAA$^function_.L:1(:15)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:86)
at jdk.nashorn.internal.scripts.Script$Recompilation$16$56AAAAA$^function_.L:1(:4)
at jdk.nashorn.internal.scripts.Script$Recompilation$5$1523A$^eval_.require(:86)
at jdk.nashorn.internal.scripts.Script$4$^eval_.:program(:7)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
... 31 more

@99937272
Copy link
Author

then I put the fbjs package into react-0.14/node_modules/react/lib/node_modules/fbjs
it take another exception:
java.lang.RuntimeException: Failed to execute render request
at de.matrixweb.jreact.JReact.render(JReact.java:179)
at de.matrixweb.jreact.JReact.renderToString(JReact.java:156)
at de.matrixweb.jreact.JReactClasspathTest014.dynamicMarkup(JReactClasspathTest014.java:65)
at de.matrixweb.jreact.JReactClasspathTest014.testRenderMultipleTimes(JReactClasspathTest014.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: javax.script.ScriptException: TypeError: Cannot call undefined in at line number 46
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:451)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at de.matrixweb.jreact.JReact.render(JReact.java:177)
... 26 more
Caused by: :46 TypeError: Cannot call undefined
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
at jdk.nashorn.internal.runtime.Undefined.lookupTypeError(Undefined.java:128)
at jdk.nashorn.internal.runtime.Undefined.lookup(Undefined.java:100)
at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:106)
at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98)
at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
at jdk.nashorn.internal.scripts.Script$Recompilation$589$855AAAAAA$^function_.L:1$warning(:46)
at jdk.nashorn.internal.scripts.Script$Recompilation$588$1131A$^function_.L:1$deprecated$newFn(:33)
at jdk.nashorn.internal.scripts.Script$4$^eval_.:program(:22)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
... 31 more

@KnisterPeter
Copy link
Owner

Never tried it with react 0.13 or react 0.14.
For sure there are some updates required. I will look into it.

@KnisterPeter
Copy link
Owner

Fixed with 6fd904b but with react from 0.13 onwards you have to do the jsx transpilation yourself (e.g. using babel) and as well you need to install 'react-dom'.
Have a look at the react-0.14 tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants