CMDBuild Forum

Attachment Description Not Saved

I have Alfresco running and I am able to attach documents without issue, except that the “Description” field appears not be saved. It is blank. DMS settings attached. Any help would be greatly appreciated. Thank you.

Capture

Hi,
what version of CMDBuild are you using?

Greetings,

I am using the latest version on SourceForge (Version 2.0-3.1a)

Can you please access your alfresco and check if the description is also blank there?

In Alfresco it says “No Description” and “No Tags”.

Can you please try to change the configuration of alfresco in CMDBuild and change the cmis version to 1.1 in the path, so from http://localhost:8085/alfresco/api/-default-/public/cmis/versions/1.0/atom to http://localhost:8085/alfresco/api/-default-/public/cmis/versions/1.1/atom and try adding a new attachment to see if it works.

If I change it to 1.1 I receive the following error when clicking the “Save” button for adding an attachment:

{“success”:false,“messages”:[{“level”:“ERROR”,“show_user”:false,“message”:“org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Type ‘P:cmdbuild:classifiable’ is unknown!”}]}

Have you configured alfresco by following the documentation available on the website? Because that error appears when the alfresco extensions are not correctly configured. You can check chapter 5 in the CMDBuild technical manual https://www.cmdbuild.org/file/manuali/technical-manual-in-english

I created the two files in Chapter 5 as shown. When I log into Openmaint I receive this error:

com.google.common.util.concurrent.UncheckedExecutionException: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found, caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found

When I try to add an attachment I receive this error:

{“success”:false,“messages”:[{“level”:“ERROR”,“show_user”:false,“message”:“com.google.common.util.concurrent.UncheckedExecutionException: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found, caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found”}]}

And what version of alfresco are you using?

It seems that Alfresco is actually starting in error when I add those two files from the manual. Here is the first part of error log:

2019-11-22 21:02:46,955 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:alfresco/application-context.xml]
Offending resource: ServletContext resource [/WEB-INF/web-application-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:alfresco/extension/*-context.xml]
Offending resource: class path resource [alfresco/application-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from file [/media/emtbrian2000/Storage/alfresco-community/tomcat/shared/classes/alfresco/extension/cmdbuild-model-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 107; Attribute “dependson” must be declared for element type “bean”.

looking at the error it appears that there is something wrong with your xml file, probably a syntax error, could you please try to delete your cmdbuild-model-context.xml file and try again?
Otherwise can you attach here that xml file so I can verify the validity of it?
Thanks

Absolutely. Please find the attached xml. I had to rename to a .txt or it would not let me upload it here.cmdbuild-model-context.txt (424 Bytes) Thank you very much!

Hi again, i’ve tried launching my alfresco with your cmdbuild-model-context file and i got the same error, there might be a problem with the " symbol being encoded strangely when you copy pasted or wrote it, i’ll attach my cmdbuild-model-context so that you can try with it, just override your current one with this version when alfresco is turned off and try again launching it, let me know if it works:
cmdbuild-model-context.xml (501 Bytes)

Nevermind, I just spotted the error, in your xml file you forgot a ‘-’ in the 6th line where there is written
dependson=“dictionaryBootstrap”
In both the documentation and in my file it’s
depends-on=“dictionaryBootstrap”

Hope this solves the issue!

1 Like

Thank you very much. I replaced my file with yours and this is the error in my Alfresco log:

2019-11-26 08:20:17,536 ERROR [org.springframework.web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘example.dictionaryBootstrap’ defined in file [/media/emtbrian2000/Storage/alfresco-community/tomcat/shared/classes/alfresco/extension/cmdbuild-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 10260000 Could not find bootstrap model ‘alfresco/extension/cmdbuild-model.xml’

I changed the cmdbuild-model-context.xml line 9 to:

alfresco/extension/cmdbuildModel.xml

This solved my problem and it appears to be working correctly in OpenMaint. The technical manual says that it should be cmdbuildModel.xml and so I created the file with that name and not cmdbuild-model.xml.

Thank you very much for your help!

2 Likes

Glad we solved, thanks for the report on the typing mistake in the manual, I will update it now to fix the error!