seiif / share-extras

Automatically exported from code.google.com/p/share-extras
0 stars 0 forks source link

Internal Server Error: TypeError "cannot read property 'children' from undefined" #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Added javascript-console-0.4.3.jar to tomcat/shared/lib
2. Restart Alfresco
3. Log in to Share, open Javascript console

What is the expected output? What do you see instead?
Expected to get normal console screen with the ability to write and execute 
code. Instead I go to the Javascript Console screen, I get an error prompt 
stating "Internal server error" followed by output on the logs. If I then do a 
basic test; select Repository folder as my Space, and run the code 
"print(space.properties.name);" I get an error message on the Output screen: 

500 

03100004 Wrapped Exception (with status template): Error executing one if the 
included scripts from the data dictionary.
TypeError: Cannot call method "createNode" of undefined 
(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco
/templates/webscripts/de/fme/jsconsole/execute.post.js#252)

What version of the add-on are you using? Please provide version of the
downloaded package, or Subversion revision number.
Javascript-Console 0.4.3 JAR file

What version of Alfresco are you using? On what application server?
Alfresco Enterprise Edition 4.0, tomcat6 application server

What web browser are you using? Please supply browser name and version.
Chrome 18.0.1025.152

Please provide any additional information below.

I get the following output on the logs when I visit the javascript console 
screen:

2012-04-10 09:14:46,406  ERROR [extensions.webscripts.AbstractRuntime] 
[http-8080-5] Exception from executeScript - redirecting to status template 
error: 03100003 Wrapped Exception (with status template): 03100041 Failed to 
execute script 
'classpath*:alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js': 
03100040 TypeError: Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco
/templates/webscripts/de/fme/jsconsole/listscripts.get.js#6)
 org.springframework.extensions.webscripts.WebScriptException: 03100003 Wrapped Exception (with status template): 03100041 Failed to execute script 'classpath*:alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js': 03100040 TypeError: Cannot read property "children" from undefined (jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js#6)
    at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:970)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
    at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:400)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
    at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.scripts.ScriptException: 03100041 Failed to execute 
script 
'classpath*:alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js': 
03100040 TypeError: Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco
/templates/webscripts/de/fme/jsconsole/listscripts.get.js#6)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:195)
    at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
    at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
    at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
    at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1193)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
    ... 25 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 03100040 TypeError: 
Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco
/templates/webscripts/de/fme/jsconsole/listscripts.get.js#6)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:499)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:191)
    ... 30 more
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property 
"children" from undefined 
(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco
/templates/webscripts/de/fme/jsconsole/listscripts.get.js#6)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
    at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)
    at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)
    at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3388)
    at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1362)
    at org.mozilla.javascript.gen.c5._c1(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js:6)
    at org.mozilla.javascript.gen.c5.call(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
    at org.mozilla.javascript.gen.c5._c0(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js:28)
    at org.mozilla.javascript.gen.c5.call(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
    at org.mozilla.javascript.gen.c5.call(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js)
    at org.mozilla.javascript.gen.c5.exec(jar:file:/C:/Alfresco4/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:483)
    ... 31 more

Original issue reported on code.google.com by ben.gra...@miller.co.uk on 10 Apr 2012 at 9:21

GoogleCodeExporter commented 8 years ago

Original comment by will.abson on 27 Jun 2012 at 2:36

GoogleCodeExporter commented 8 years ago
Problem with SOLR search. Should be fixed in 0.5. An additional check will 
prevent this error in 0.5.1.

Original comment by Florian....@gmail.com on 27 Sep 2012 at 3:36