Hi there! I'm currently getting an exception when trying to create a new node from default alfresco API, only cm:content parent type. The cm:folder parent ones are getting created nicely.
<type name="yyy:xxxxxxxxxx">
<title>Title</title>
<parent>cm:content</parent>
This error came out after putting in my alfresco content service POM the docx4j dependency. I'm running Alfresco on Java 14.
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j-JAXB-ReferenceImpl</artifactId>
<version>11.4.9</version>
</dependency>
I'm currently using the 11.4.9 version, which is available from Java 11 on, but I even tried the 8.x.x version (the one for Java8) and got the same error. I think there is an internal dependency from docx4j that overwrite a previous dependency Alfresco is using to create that node or something like this. I can't get rid of this error..
This is the error in my console, nothing more other than this, no specific exception or code line to watch for or debug.
2023-10-13 11:11:53,264 ERROR [framework.webscripts.ResourceWebScriptPost] [http-nio-8080-exec-33] 4f73474e-e849-4a88-91fd-e2aa0c51bfda : [org.alfresco.error.AlfrescoRuntimeException.create(AlfrescoRuntimeException.java:60), org.alfresco.error.AlfrescoRuntimeException.makeRuntimeException(AlfrescoRuntimeException.java:76), org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:493), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript.execute(AbstractResourceWebScript.java:199), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript$1.execute(AbstractResourceWebScript.java:111), org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript.execute(AbstractResourceWebScript.java:128), org.alfresco.rest.framework.webscripts.ApiWebScript.execute(ApiWebScript.java:113), org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:474), org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:664), org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:435), org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:315), org.alfresco.rest.api.PublicApiRepositoryContainer.access$001(PublicApiRepositoryContainer.java:47), org.alfresco.rest.api.PublicApiRepositoryContainer$1.doWork(PublicApiRepositoryContainer.java:84), org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:126), org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:95), org.alfresco.rest.api.PublicApiRepositoryContainer.executeScript(PublicApiRepositoryContainer.java:80), org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399), org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210), org.alfresco.repo.web.scripts.TenantWebScriptServlet.service(TenantWebScriptServlet.java:82), javax.servlet.http.HttpServlet.service(HttpServlet.java:729), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207), org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207), org.alfresco.web.app.servlet.ServletMetricsFilter.doFilter(ServletMetricsFilter.java:161), org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207), org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:75), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62), java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.base/java.lang.reflect.Method.invoke(Method.java:564), org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:132), org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186), org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212), com.sun.proxy.$Proxy246.doFilter(Unknown Source), org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207), org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207), org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207), org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212), org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94), org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492), org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141), org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80), org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88), org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502), org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1152), org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684), org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539), org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630), org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61), java.base/java.lang.Thread.run(Thread.java:832)]
I'm getting an exception while just "laying around" in my alfresco and I think those may be related:
2023-10-14 13:02:58,014 ERROR [extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-36] Exception from executeScript: 09147151 Exception in Transaction.
org.alfresco.error.AlfrescoRuntimeException: 09147151 Exception in Transaction.
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:536)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:595)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:664)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:362)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:315)
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 org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43)
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.web.app.servlet.ServletMetricsFilter.doFilter(ServletMetricsFilter.java:161)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.alfresco.web.scripts.servlet.X509ServletFilterBase.doFilter(X509ServletFilterBase.java:196)
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.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.NoSuchMethodError: 'int org.apache.commons.io.IOUtils.read(java.io.InputStream, byte[])'
at org.apache.tika.parser.pkg.ZipContainerDetector.detect(ZipContainerDetector.java:107)
at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:84)
at org.alfresco.repo.content.MimetypeMap.detectType(MimetypeMap.java:957)
at org.alfresco.repo.content.MimetypeMap.detectType(MimetypeMap.java:907)
at org.alfresco.repo.content.MimetypeMap.getMimetypeIfNotMatches(MimetypeMap.java:1024)
at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:338)
at org.alfresco.repo.rendition2.ContentTransformServiceImpl.failoverTransformers(ContentTransformServiceImpl.java:189)
at org.alfresco.repo.rendition2.ContentTransformServiceImpl.transform(ContentTransformServiceImpl.java:138)
at org.alfresco.repo.rendition2.LegacySynchronousTransformClient.transform(LegacySynchronousTransformClient.java:98)
at org.alfresco.repo.rendition2.SwitchingSynchronousTransformClient.transform(SwitchingSynchronousTransformClient.java:103)
at org.alfresco.repo.web.scripts.solr.NodeContentGet.execute(NodeContentGet.java:191)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
... 42 more
Everything work fine when excluding this docx4j dependency from the POM.
I even tried to delete the Java classes that use the docx library but nothing got better.
Can you help me with this? Someone got same issue? Thank you
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
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.