Hi all,
I'm trying to upgrade my Alfresco Content Services from 5.2 to 23.2, but I'm stuck with the error in the subject while starting Tomcat. I want to underline that Share runs correctly and I can work on my documents. The problems start when using Digital Workspace. This is how I ended up with it:
- I migrated data from my old 5.2 production installation to the new 23.2 one (both DB and contentstore)
- These data include a model which is supposed to disappear as we decided to move a third party customization to a different system
- Following this thread https://connect.hyland.com/t5/alfresco-forum/a-namespace-prefix-is-not-registered-simple-ocr/m-p/483062 I used alfresco-model-extractor_linux_amd64 from Angel Borroy to extract the custom models from the AMPs provided by the third party company.
- I put the jar files produced by the binary into the webapps/alfresco/WEB-INF/lib directory so that Tomcat could load the models at bootstrap
Unluckily Tomcat returned this stack trace:
Error creating bean with name 'choc-alfresco' defined in URL [jar:file:/opt/apache-tomcat-10.1.24/webapps/alfresco/WEB-INF/lib/models-choc.jar!/alfresco/module/choc-alfresco/module-context.xml]: 07250001 Could not import bootstrap model 'alfresco/module/choc-alfresco/model/invoiceModel.xml'
...
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 07250001 Could not import bootstrap model 'alfresco/module/choc-alfresco/model/invoiceModel.xml'
...
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 07250000 Failed to compile model 'inv:model'
...
Caused by: org.alfresco.service.namespace.NamespaceException: URI http://www.pec.it/model/pec/1.0 cannot be imported as it is not defined (with prefix pec
After some investigations, I concluded that the jar files generated by the binary may be corrupted because if I try to extract them with "jar xf" I get this error:
java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
at java.base/java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:529)
at java.base/java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:153)
at jdk.jartool/sun.tools.jar.Main.extract(Main.java:1395)
at jdk.jartool/sun.tools.jar.Main.run(Main.java:397)
at jdk.jartool/sun.tools.jar.Main.main(Main.java:1721)
So I decided to replicate "by hand" what the binary model-extractor is supposed to do, that is create a directory structure where to put the files relative to the model, then fill the structures with the relevant files.
This time, after having copied the jar files into webapps/alfresco/WEB-INF/lib, Alfresco didn't complain about the Namespace, but about other xml files which it expects to find in the directory structure, e.g.:
...
Caused by: java.io.FileNotFoundException: class path resource [alfresco/module/choc/webscript-context.xml] cannot be opened because it does not exist
So I started to move the files extracted from the AMP inside the requested directories and I finally got this error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enterpriseConfigurationDataCollector' defined in URL [jar:file:/opt/apache-tomcat-10.1.24/webapps/alfresco/WEB-INF/lib/alfresco-enterprise-repository-23.2.0.63.jar!/alfresco/enterprise/heartbeat/heartbeat-enterprise-repo-collector-context.xml]: Cannot resolve reference to bean 'querySetConfigService' while setting bean property 'querySetConfigService'
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'querySetConfigService' defined in URL [jar:file:/opt/apache-tomcat-10.1.24/webapps/alfresco/WEB-INF/lib/alfresco-enterprise-repository-23.2.0.63.jar!/alfresco/enterprise/query-set-context.xml]: Cannot resolve reference to bean 'populateRqaService' while setting bean property 'populateRqaService'
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'populateRqaService' defined in URL [jar:file:/opt/apache-tomcat-10.1.24/webapps/alfresco/WEB-INF/lib/alfresco-enterprise-repository-23.2.0.63.jar!/alfresco/enterprise/query-set-context.xml]: Cannot resolve reference to bean 'populateRqaTableWorkerFactory' while setting bean property 'workerObjectProvider'
...
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rqaWorkerConfig' defined in URL [jar:file:/opt/apache-tomcat-10.1.24/webapps/alfresco/WEB-INF/lib/alfresco-enterprise-repository-23.2.0.63.jar!/org/alfresco/enterprise/repo/queryaccelerator/population/config/RqaWorkerConfig.class]: Unsatisfied dependency expressed through constructor parameter 0: Cannot find class [it.maw.choc.model.ChocUtil] for bean with name 'choc.util.init' defined in URL [jar:file:/opt/apache-tomcat-10.1.24/webapps/alfresco/WEB-INF/lib/models-choc.jar!/alfresco/module/choc-alfresco/module-context.xml]
...
Caused by: java.lang.ClassNotFoundException: it.maw.choc.model.ChocUtil
As far as I can tell I'm now able to load the model, but then Alfresco tries to look for the classes which implement the model itself, that is exactly what I'm trying to avoid, since I want only to load the model in order not to have Alfresco complaining about namespaces definitions.
Is there another way to solve this problem? I'm perfectly fine also to migrate data from 5.2 to 7.4 and then to 23.2 if it can help.
Thanks in advance for any hints/suggestions.
Regards,
Marco