ecmcore / share-extras

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

Javascipt console error with Solr #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Install javascript console ver0.4.3
2.Activate Solr index
3.

What is the expected output? What do you see instead?
Console should work

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

What version of Alfresco are you using? On what application server?
4.0d

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

Please provide any additional information below.

Hi

Tested the console with 4.0d using Lucene index and it worked great. But now 
with Solr enabled it does not work anymore. I get the following in the log file

2012-03-27 08:48:46,844 ERROR [extensions.webscripts.AbstractRuntime?] 
[http-8080-20] Exception from executeScript - redirecting to status template 
error: 02270005 Wrapped Exception (with status template): 02270026 Failed to 
execute script 
'classpath:alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js': 
02270025 TypeError?: Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco/tomcat/shared/lib/javascript-console-0.4.3.jar!/alfresco/
templates/webscripts/de/fme/jsconsole/listscripts.get.js#6)

org.springframework.extensions.webscripts.WebScriptException?: 02270005 Wrapped 
Exception (with status template): 02270026 Failed to execute script 
'classpath:alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js': 
02270025 TypeError?: Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco/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?.createStatusExcepti
on(AbstractWebScript?.java:970) at 
org.springframework.extensions.webscripts.DeclarativeWebScript?.execute(Declarat
iveWebScript?.java:171) at 
org.alfresco.repo.web.scripts.RepositoryContainer?$2.execute(RepositoryContainer
?.java:400) at 
org.alfresco.repo.transaction.RetryingTransactionHelper?.doInTransaction(Retryin
gTransactionHelper?.java:388) at 
org.alfresco.repo.web.scripts.RepositoryContainer?.transactionedExecute(Reposito
ryContainer?.java:462) at 
org.alfresco.repo.web.scripts.RepositoryContainer?.transactionedExecuteAs(Reposi
toryContainer?.java:500) at 
org.alfresco.repo.web.scripts.RepositoryContainer?.executeScript(RepositoryConta
iner?.java:316) at 
org.springframework.extensions.webscripts.AbstractRuntime?.executeScript(Abstrac
tRuntime?.java:372) at 
org.springframework.extensions.webscripts.AbstractRuntime?.executeScript(Abstrac
tRuntime?.java:209) at 
org.springframework.extensions.webscripts.servlet.WebScriptServlet?.service(WebS
criptServlet?.java:118) at 
javax.servlet.http.HttpServlet?.service(HttpServlet?.java:717) at 
org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFil
terChain?.java:290) at 
org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain
?.java:206) at 
org.alfresco.web.app.servlet.GlobalLocalizationFilter?.doFilter(GlobalLocalizati
onFilter?.java:58) at 
org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFil
terChain?.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?.j
ava: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:1
09) at 
org.apache.catalina.connector.CoyoteAdapter?.service(CoyoteAdapter?.java:298) 
at 
org.apache.coyote.http11.Http11AprProcessor?.process(Http11AprProcessor?.java:86
1) at 
org.apache.coyote.http11.Http11AprProtocol?$Http11ConnectionHandler?.process(Htt
p11AprProtocol?.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?: 02270026 Failed to execute 
script 
'classpath:alfresco/templates/webscripts/de/fme/jsconsole/listscripts.get.js': 
02270025 TypeError?: Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco/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?.ja
va:195) at 
org.alfresco.repo.processor.ScriptServiceImpl?.execute(ScriptServiceImpl?.java:2
12) at 
org.alfresco.repo.processor.ScriptServiceImpl?.executeScript(ScriptServiceImpl?.
java:174) at 
org.alfresco.repo.web.scripts.RepositoryScriptProcessor?.executeScript(Repositor
yScriptProcessor?.java:102) at 
org.springframework.extensions.webscripts.AbstractWebScript?.executeScript(Abstr
actWebScript?.java:1193) at 
org.springframework.extensions.webscripts.DeclarativeWebScript?.execute(Declarat
iveWebScript?.java:86) ... 25 more
Caused by: org.alfresco.error.AlfrescoRuntimeException?: 02270025 TypeError?: 
Cannot read property "children" from undefined 
(jar:file:/C:/Alfresco/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(RhinoScriptPro
cessor?.java:499) at 
org.alfresco.repo.jscript.RhinoScriptProcessor?.execute(RhinoScriptProcessor?.ja
va:191) ... 30 more
Caused by: org.mozilla.javascript.EcmaError?: TypeError?: Cannot read property 
"children" from undefined 
(jar:file:/C:/Alfresco/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.c17.c1(jar:file:/C:/Alfresco/tomcat/shared/lib/javasc
ript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscrip
ts.get.js:6) at 
org.mozilla.javascript.gen.c17.call(jar:file:/C:/Alfresco/tomcat/shared/lib/java
script-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscr
ipts.get.js) at 
org.mozilla.javascript.optimizer.OptRuntime?.callName(OptRuntime?.java:97) at 
org.mozilla.javascript.gen.c17.c0(jar:file:/C:/Alfresco/tomcat/shared/lib/javasc
ript-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscrip
ts.get.js:28) at 
org.mozilla.javascript.gen.c17.call(jar:file:/C:/Alfresco/tomcat/shared/lib/java
script-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscr
ipts.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.c17.call(jar:file:/C:/Alfresco/tomcat/shared/lib/java
script-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscr
ipts.get.js) at 
org.mozilla.javascript.gen.c17.exec(jar:file:/C:/Alfresco/tomcat/shared/lib/java
script-console-0.4.3.jar!/alfresco/templates/webscripts/de/fme/jsconsole/listscr
ipts.get.js) at 
org.alfresco.repo.jscript.RhinoScriptProcessor?.executeScriptImpl(RhinoScriptPro
cessor?.java:483) ... 31 more

Original issue reported on code.google.com by eugenev...@gmail.com on 2 Apr 2012 at 9:39

GoogleCodeExporter commented 8 years ago
I can confirm I get this error too, thanks.

Original comment by opy...@gmail.com on 2 Apr 2012 at 2:21

Attachments:

GoogleCodeExporter commented 8 years ago
I have now un-installed 4.0d and installed 4.1a. It appears that the trick is 
not to change the dir.root variable in global.properties file. I used to store 
my repository on a separate hard drive from the Alfreco installation but it 
seems that there are a few places were Solr is pointing to the 
C:/Alfresco/Alf_data location and if this is not there any more things just do 
not want to work. So I'm doing a third test were I re-install alfresco and go 
through all my customisation to see if I can get the console to work if I do 
not change the dir.root variable will report back

Original comment by eugenev...@gmail.com on 4 Apr 2012 at 2:18

GoogleCodeExporter commented 8 years ago

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

GoogleCodeExporter commented 8 years ago
Version 0.5 already worked with SOLR but I added an additional check in case 
the script s folder is not found (in 0.5.1) to be safe.

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

GoogleCodeExporter commented 8 years ago
Issue 74 has been merged into this issue.

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