我正在尝试在露天使用 FileFolderService 创建一个文件,但是我遇到了异常,下面提供了详细信息。所以任何人都可以帮助我!
站点名称:mysite 文件名:将作为请求参数传递,并在站点的文档库中创建具有传入值的新文件。
代码片段:
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry");
FileFolderService fileFolderService = serviceRegistry.getFileFolderService();
String fileName = req.getParameter("fileName");
NodeRef folder = new NodeRef("avm://mysite/-1;www;avm_webapps;ROOT;documentLibrary");
fileFolderService.create(folder, fileName, ContentModel.TYPE_CONTAINER);
抛出异常:
ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-4] Exception from executeScript - redirecting to status template error: 11100002 Wrapped Exception (with status template): 11100016 Invalid node type for AVM.
org.springframework.extensions.webscripts.WebScriptException: 11100002 Wrapped Exception (with status template): 11100016 Invalid node type for AVM.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:433)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:495)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:533)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:349)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)