cancel
Showing results for 
Search instead for 
Did you mean: 

A namespace prefix is not registered - Simple OCR

anoopkr
Confirmed Champ
Confirmed Champ

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

32 REPLIES 32

douglascrp
World-Class Innovator
World-Class Innovator

Hello.

In order to avoid this error, you need to disable (comment or simply remove) the scheduled jobs definitions.

You only need the content model, and nothing more.

angel-borroy
Employee
Employee

Preserve the JAR for the Repository (alfresco.war).

anoopkr
Confirmed Champ
Confirmed Champ

Hi

My problem is still unresolved, someone kindly lend a hand.

Reg

anoopkr
Confirmed Champ
Confirmed Champ

Hi,

From the user home, I move to sites where my documents stored, and when I reach there where the OCRd items kept, this error pops up

2024-10-24T07:38:58,785 [] ERROR [framework.webscripts.ResourceWebScriptGet] [http-nio-8080-exec-4] Exception df97ecbc-6e57-464e-9545-0f45844405bf. Request /alfresco/api/-default-/public/alfresco/versions/1/nodes/4da04105-9039-4eca-abbb-8ff681dea9a7/children?maxItems=25&orderBy=isFolder desc,name ASC&include=path,properties,allowableOperations,permissions,aspectNames,isFavorite,definition&includeSource=true executed by anoop.kr returned status code 500 with message: A namespace prefix is not registered for uri http://www.keensoft.es/model/content/ocr/1.0 - Stack Trace: [org.alfresco.service.namespace.QName.toPrefixString(QName.java:424), org.alfresco.rest.api.impl.NodesImpl.mapFromNodeProperties(NodesImpl.java:1257), org.alfresco.rest.api.impl.NodesImpl.getFolderOrDocument(NodesImpl.java:915), org.alfresco.rest.api.impl.NodesImpl$2.get(NodesImpl.java:1357), org.alfresco.rest.api.impl.NodesImpl$2.get(NodesImpl.java:1348), java.base/java.util.AbstractList$Itr.next(AbstractList.java:371), org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper.processAdditionsToTheResponse(ResourceWebScriptHelper.java:145), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript$3.execute(AbstractResourceWebScript.java:220), org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript.execute(AbstractResourceWebScript.java:208), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript$1.execute(AbstractResourceWebScript.java:116), org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452), org.alfresco.rest.framework.webscripts.AbstractResourceWebScript.execute(AbstractResourceWebScript.java:133), org.alfresco.rest.framework.webscripts.ApiWebScript.execute(ApiWebScript.java:112), org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:506), org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:685), org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:721), org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:413), org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:309), 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:423), org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210), org.alfresco.repo.web.scripts.TenantWebScriptServlet.service(TenantWebScriptServlet.java:82), jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140), org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140), org.springframework.extensions.webscripts.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:177), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140), org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:75), jdk.internal.reflect.GeneratedMethodAccessor588.invoke(Unknown Source), java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.base/java.lang.reflect.Method.invoke(Method.java:569), org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:132), org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184), org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:244), jdk.proxy3/jdk.proxy3.$Proxy189.doFilter(Unknown Source), org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140), org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140), org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53), org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164), org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140), org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167), org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90), org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483), org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115), org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93), org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663), org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74), org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344), org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384), org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63), org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905), org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741), org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52), org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190), org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659), org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63), java.base/java.lang.Thread.run(Thread.java:840)]

Kindle see the log and guide me

Regards

douglascrp
World-Class Innovator
World-Class Innovator

I guess all you need to do is comment out all the OCR-related beans in this file, package it again, and deploy the jar.

By doing that, you will have the content model available to let alfresco start.

Hi,

Unfortunately it did not work.

Regards

angelborroy
Community Manager Community Manager
Community Manager

I have created this tool: https://github.com/aborroy/alfresco-model-extractor

It will allow you to extract the content model from original addons (like OCR or quotas) and create new JARs for your upgraded installation that contain only required Content Model.

Let me know if that helps.

Hyland Developer Evangelist

douglascrp
World-Class Innovator
World-Class Innovator

Angel being Angel.

Really useful tool... Thank you

Hi

That was incredible, the support you extended, you cant imagine how we felt seeing it. But I could not reach my target, the issue remains the same,could it be Error when I go the directory where ocrd files presentError when I go the directory where ocrd files presentCorresponding catalina.outCorresponding catalina.outsome thing else ? I am attaching  images of the error and corresponding catalina.out, kindly see it.

Ps: Everything looks okay when I browse through share application

Regards

 

 

 

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