Alfresco Export tool for version 6

cancel
Showing results for 
Search instead for 
Did you mean: 
Member II

Alfresco Export tool for version 6

I would like to know whether there is any export tools available for Alfresco. I tried the following links:

GitHub - gsdenys/alfresco-bulk-export: Automatically exported from code.google.com/p/alfresco-bulk-e... 

GitHub - atolcd/alfresco-share-import-export 

GitHub - vprince1/alfresco-bulk-export: Automatically exported from code.google.com/p/alfresco-bulk-... 

I tried the amp installation from the above links using alfrescos module management tool. But it was not getting installed,

nor did I get some errors. I guess the ones in the links works for Alfresco 5 and below. Please let me know whether any export tool is available for Alfresco 6.0, or  how could I implement an Alfresco Export tool.

5 Replies
Alfresco Employee

Re: Alfresco Export tool for version 6

You can use Alfresco JavaScript Console or similar.

This code should still work in Alfresco 6.

var nodeToExport = companyhome.childByNamePath("Sites/swsdp/documentLibrary");
var exportAction= actions.create("export");
exportAction.parameters['store'] = "workspace://SpacesStore";
exportAction.parameters['package-name'] = "ACPexport";
exportAction.parameters['destination'] = companyhome;
exportAction.parameters['include-children'] = true;
exportAction.parameters['include-self'] = false;
exportAction.parameters['encoding'] = "UTF-8";
exportAction.execute(nodeToExport);
Software Engineer in Alfresco Search Team.
Alfresco Employee

Re: Alfresco Export tool for version 6

And  if you want to import the result...

var targetNodeForImport =
companyhome.childByNamePath("Sites/swsdp2/documentLibrary");
var ACPFile = companyhome.childByNamePath("ACPexport.acp");
var importAction = actions.create("import");
importAction.parameters.encoding = "UTF-8";
importAction.parameters.destination = targetNodeForImport;
importAction.execute(ACPFile);
Software Engineer in Alfresco Search Team.
Member II

Re: Alfresco Export tool for version 6

Hi Angel Borroy,

I was referring this link to create a export tool.

GitHub - vprince1/alfresco-bulk-export: Automatically exported from code.google.com/p/alfresco-bulk-...

I tried the installation of Alfresco-bulk-export tool in the link in two different ways.

1. I have ACS 6.0 deployed using docker compose. What I was saying is I tried the amp(bulkexport-0.7.amp) installation of bulk export tool from the link I provided. But I was not getting it run. I was asking whether the code in the link wont work with ACS 6.

2. The second way I tried to do the Alfresco-bulk-export tool installation is:

I used the Alfresco maven archetype all-in-one, and generated one project, and I added the bulk export tool to it. But I didnt find an Alfresco maven archetype in Alfresco 6 documentation. So, what is the replacement for the Alfresco maven archetype in Alfresco 6?

I also wanna ask you, is this the right approach to implement an export tool in Alfresco 6. Or, shall I need to try a different approch to implement bulk export tool in Alfresco 6.

Thanks in advance.

Active Member

Re: Alfresco Export tool for version 6

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)
Member II

Re: Alfresco Export tool for version 6

Hi there.

May I ask, did you get any export tools to work with ACS 6.x?

We are using 6.1.2 community edition and tried the bulk export tools found on Github, but no success.