cancel
Showing results for 
Search instead for 
Did you mean: 

A namespace prefix is not registered - Simple OCR

anoopkr
Champ on-the-rise
Champ on-the-rise

Hi,

In our 6.2 installation we have or rather had this OCR module (2.3.1) it worked flawlessly. We are now migrating the 6.2 to latest version, we did it through version 7 and all are working (seemingly) fine, except, in Workspace application and error comes at certain entries, "This item no longer exists or you don't have permission to view it. ", the error log says  " A namespace prefix is not registered for uri http://www.keensoft.es/model/content/ocr/1.0". We had removed the jar files and global-properties entries related to OCR and all the folder rules before taking the backup of both content store and DB in 6.2 and we suspect this could be the error. Someone please help to tackle this issue, apart from this everything looks okay.

An excerpt from the log file.

Caused by: org.alfresco.scripts.ScriptException: 09090057 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': A namespace prefix is not registered for uri http://www.keensoft.es/model/content/ocr/1.0
Caused by: org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri http://www.keensoft.es/model/content/ocr/1.0
2024-10-09 04:52:07,076 WARN [org.alfresco.repo.module.ModuleServiceImpl] [main] A previously-installed module 'simple-ocr-repo' (version 2.3.1) is not present in your distribution.
2024-10-09 05:13:13,023 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-7] Exception from executeScript: 09090017 Wrapped Exception (with status template): 09090054 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': A namespace prefix is not registered for uri http://www.keensoft.es/model/content/ocr/1.0
org.springframework.extensions.webscripts.WebScriptException: 09090017 Wrapped Exception (with status template): 09090054 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': A namespace prefix is not registered for uri http://www.keensoft.es/model/content/ocr/1.0

Regards

ANOOP KR

 

1 ACCEPTED ANSWER

Please, use the last version of the Alfresco Model Extractor app:

https://github.com/aborroy/alfresco-model-extractor/releases/tag/0.2.0

The previous one (0.1.0) was creating the JAR with an incorrect module version.

Create again the JAR and apply it again to your Alfresco deployment.

Hyland Developer Evangelist

View answer in original post

24 REPLIES 24

angel-borroy
Employee
Employee

There are nodes in your repository with the custom Content Model applied (http://www.keensoft.es/model/content/ocr/1.0). You can delete these nodes or maintain the previous Content Model in your new deployment.

Hi,

Thanks for the quick reply, We are no experts is Alfresco but Linux admins, can you elaborate a little ?

Regards.

 

anoopkr
Champ on-the-rise
Champ on-the-rise

Hi,

We would rather like to delete the model, because that OCR solution does not work in 23.X, that is why we tried to delete it. BTW is it possible to apply docker for the OCR solution ? Our installation is done through zip files, using Angel Borroy's scripts, because we could not find another OCR solution rather than the docker one.

 

Regards

You cannot delete the model, but you can apply it creating a new module containing the definition (https://github.com/keensoft/alfresco-simple-ocr/blob/master/simple-ocr-repo/src/main/resources/alfre...).

You can use the OCR module for ACS 7.x or later available in https://github.com/aborroy/alf-tengine-ocr

This module supports both ZIP Distribution files and Docker deployment.

Is there a way to just copy the data (+db) leaving all these complexities behind, so that we can have the latest server as it is just installed and populated with the data ? And all the office, OCR, etc can be added later ?

Regards

Hi,

If I delete the nodes, will it solve the issue we mentioned ? If so can you tell me how ? Then I can follow the link you provided for OCR

Regards

Hi,

Pls let me know how to delete the nodes.

 

Regards

douglascrp
World-Class Innovator
World-Class Innovator

You will have to keep the jar file or deploy only the content model in a custom project to delete the nodes.

You can use a simple search and delete using share, or create a custom javascript to do that.

But if you need the documents that got the OCR applied, it might be better to simply search and remove the ocr:ocrd aspect only, as by doing that, all the documents will be kept in the repository.

As soon as the aspect is removed from all the documents, it will be safe to remove the jar file.

Hi,

Many thanks for the response, If I keep the jar in place it gives me errors and Alfresco would not let me to log-in. Actually all I need the data intact that I can transfer to a newer version, OCR and other services I don't care, at least for time being. Is it possible ? Other than OCR we had a few others as well, like "folder quota" etc, they too are making issues, I hope following OCR I could solve other issues as well. We are not experts in alfresco or java, but in the past we have somehow resolved all the issues by googling and using forums, so the abstract answers I get are a bit difficult to comprehend and I am perfectly aware that an elaborate answer is not possible as well.

Regards