<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why i cant export files with javascript console? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92550#M27436</link>
    <description>&lt;P&gt;And where does that get exported? i cant find it anywhere&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 10:47:33 GMT</pubDate>
    <dc:creator>jagpanadero</dc:creator>
    <dc:date>2020-10-15T10:47:33Z</dc:date>
    <item>
      <title>Why i cant export files with javascript console?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92548#M27434</link>
      <description>&lt;P&gt;Im using javascript console in alfresco 6.2 and im following this &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-export-tool-for-version-6/td-p/60152" target="_self" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-export-tool-for-version-6/td-p/60152&lt;/A&gt; but Unfortunatly im getting this error, what can i do?&lt;/P&gt;&lt;PRE&gt;500 Internal Error
Stacktrace-Details:
org.springframework.extensions.webscripts.WebScriptException: 09140004 Wrapped Exception (with status template): 09140029 Failed to execute script 'Javascript Console Script': 09140028 The choice of Java method org.alfresco.repo.jscript.ScriptAction.execute matching JavaScript argument types (null) is ambiguous; candidate methods are: 
    void execute(org.alfresco.repo.jscript.ScriptNode)
    void execute(org.alfresco.service.cmr.repository.NodeRef) (Javascript Console Script#16)
	at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1139)
	at de.fme.jsconsole.ExecuteWebscript.executeScriptContent(ExecuteWebscript.java:405)
	at de.fme.jsconsole.ExecuteWebscript.access$100(ExecuteWebscript.java:56)
	at de.fme.jsconsole.ExecuteWebscript$2.execute(ExecuteWebscript.java:280)
	at de.fme.jsconsole.ExecuteWebscript$2.execute(ExecuteWebscript.java:273)
	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:338)
	at de.fme.jsconsole.ExecuteWebscript.runWithTransactionIfNeeded(ExecuteWebscript.java:272)
	at de.fme.jsconsole.ExecuteWebscript.access$000(ExecuteWebscript.java:56)
	at de.fme.jsconsole.ExecuteWebscript$1.doWork(ExecuteWebscript.java:250)
	at de.fme.jsconsole.ExecuteWebscript$1.doWork(ExecuteWebscript.java:247)
	at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
	at de.fme.jsconsole.ExecuteWebscript.runScriptWithTransactionAndAuthentication(ExecuteWebscript.java:247)
	at de.fme.jsconsole.ExecuteWebscript.execute(ExecuteWebscript.java:121)
	at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:467)
	at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
	at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
	at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
	at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
	at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
	at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1152)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.alfresco.scripts.ScriptException: 09140029 Failed to execute script 'Javascript Console Script': 09140028 The choice of Java method org.alfresco.repo.jscript.ScriptAction.execute matching JavaScript argument types (null) is ambiguous; candidate methods are: 
    void execute(org.alfresco.repo.jscript.ScriptNode)
    void execute(org.alfresco.service.cmr.repository.NodeRef) (Javascript Console Script#16)
	at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:211)
	at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219)
	at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181)
	at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109)
	at de.fme.jsconsole.ExecuteWebscript.executeScriptContent(ExecuteWebscript.java:348)
	... 46 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 09140028 The choice of Java method org.alfresco.repo.jscript.ScriptAction.execute matching JavaScript argument types (null) is ambiguous; candidate methods are: 
    void execute(org.alfresco.repo.jscript.ScriptNode)
    void execute(org.alfresco.service.cmr.repository.NodeRef) (Javascript Console Script#16)
	at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:533)
	at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207)
	... 50 more
Caused by: org.mozilla.javascript.EvaluatorException: The choice of Java method org.alfresco.repo.jscript.ScriptAction.execute matching JavaScript argument types (null) is ambiguous; candidate methods are: 
    void execute(org.alfresco.repo.jscript.ScriptNode)
    void execute(org.alfresco.service.cmr.repository.NodeRef) (Javascript Console Script#16)
	at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
	at org.mozilla.javascript.Context.reportRuntimeError(Context.java:998)
	at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1053)
	at org.mozilla.javascript.Context.reportRuntimeError4(Context.java:1040)
	at org.mozilla.javascript.NativeJavaMethod.findFunction(NativeJavaMethod.java:468)
	at org.mozilla.javascript.NativeJavaMethod.findCachedFunction(NativeJavaMethod.java:262)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:139)
	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
	at org.mozilla.javascript.gen.Javascript_Console_Script_29._c_script_0(Javascript Console Script:16)
	at org.mozilla.javascript.gen.Javascript_Console_Script_29.call(Javascript Console Script)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3508)
	at org.mozilla.javascript.gen.Javascript_Console_Script_29.call(Javascript Console Script)
	at org.mozilla.javascript.gen.Javascript_Console_Script_29.exec(Javascript Console Script)
	at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509)
	... 51 more


An error inside the HTTP server which prevented it from fulfilling the request.
09140028 The choice of Java method org.alfresco.repo.jscript.ScriptAction.execute matching JavaScript argument types (null) is ambiguous; candidate methods are: 
    void execute(org.alfresco.repo.jscript.ScriptNode)
    void execute(org.alfresco.service.cmr.repository.NodeRef) (Javascript Console Script#16)&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Oct 2020 12:47:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92548#M27434</guid>
      <dc:creator>jagpanadero</dc:creator>
      <dc:date>2020-10-14T12:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why i cant export files with javascript console?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92549#M27435</link>
      <description>&lt;P&gt;It looks like some part of the Alfresco JS API has evolved, adding an overloaded method. The JavaScript integration in Alfresco cannot deal with a null-value as a parameter when there are overloaded methods because it cannot decide which overload to call. In this case you must call the method with a non-null value - there is no other way. When you followed the thread you linked, you are using something like&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;companyhome&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;childByNamePath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Sites/swsdp/documentLibrary"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to resolve the parameter value. If the path in that call does not exist, the method will return a null value - when you use that return value without checking against null in your call to execute, then you will run into the problem you currently have. Either you must adapt the parameter to childByNamePath to a path that really exists, or at least use a null-check in an if-condition to avoid executing the rest of the code if the path cannot be resolved.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:22:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92549#M27435</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2020-10-15T08:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why i cant export files with javascript console?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92550#M27436</link>
      <description>&lt;P&gt;And where does that get exported? i cant find it anywhere&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 10:47:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/why-i-cant-export-files-with-javascript-console/m-p/92550#M27436</guid>
      <dc:creator>jagpanadero</dc:creator>
      <dc:date>2020-10-15T10:47:33Z</dc:date>
    </item>
  </channel>
</rss>

