Hola, estoy incorporando Alfresco a un proyecto de nuestra compañía desarrollado con Spring Boot, y al crear una carpeta me arroja un error y no sé cómo solventarlo:
Este es el método del servicio con el que estoy realizando pruebas:
/** * * @param folderName Nombre de la carpeta * @param relativeFolderPath Direccion relativa * @return * @throws Exception */ public Node createFolder(String folderName, String relativeFolderPath) throws Exception{ Objects.requireNonNull(folderName); NodeBodyCreate nodeBodyCreate = new NodeBodyCreate(); nodeBodyCreate.setName(folderName); nodeBodyCreate.setNodeType("cm:folder"); nodeBodyCreate.setRelativePath(relativeFolderPath); Node folderNode = nodesApi .createNode("Subvencions", nodeBodyCreate, null, null, null, null, null) .getBody().getEntry(); LOGGER.info("Created new folder: {}", folderNode); return folderNode; }
Pom:
<repositories> <repository> <id>alfresco-public</id> <url>https://artifacts.alfresco.com/nexus/content/groups/public</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.alfresco</groupId> <artifactId>alfresco-java-rest-api-spring-boot-starter</artifactId> <version>5.1.1</version> </dependency> ......
Y este es el error que me arroja:
feign.FeignException$BadRequest: [400 Bad Request] during [POST] to [http://___________/alfresco/api/-default-/public/alfresco/versions/1/nodes/Subvencions/children] [NodesApiClient#createNode(String,NodeBodyCreate,Boolean,Boolean,Boolean,List,List)]: [{"error":{"errorKey":"Could not read content from HTTP request body: Unrecognized field \"definition\" (Class org.alfresco.rest.api.model.Node), not marked as ignorable\n at [Source: java.io.BufferedR... (825 bytes)]
Gracias.
¿Qué versión de Alfresco Repositorio estás usando? 7.2?
Esta es la versión del repositorio:
Close Alfresco Share v5.2.d (r134641-b15, Aikau 1.0.101.3, Spring Surf 5.2.d, Spring WebScripts 6.13, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223) Alfresco Community v5.2.0 (r134428-b13) schema 10005
La SDK no funciona con Alfresco 5.2 (al menos no ha sido probada).
Discussions about Alfresco Content Services and Alfresco Process Services in Spanish
Related:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.