Error after integrating tessaract-ocr

cancel
Showing results for 
Search instead for 
Did you mean: 
Yves1
Member II

Error after integrating tessaract-ocr

Hello

I'm using the Alfresco Community Edition 7.0. Everything works properly but when I integrate the tessaract-ocr software (https://www.contcentric.com/configuring-ocr-in-alfresco/ ) the service does not start anymore and I keep having this error in the alfresco.log file:

ClassNotFoundException: org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker

Here is the full log

2021-06-10 11:28:51,647 WARN [org.alfresco.heartbeat.datasender.HBDataSenderServiceBuilder] [main] Setting the Heartbeat sender cron with property 'heartbeat.sender.cronExpression' is no longer supported.
2021-06-10 11:28:52,657 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [main] Ignoring script patch (post-Hibernate): patch.db-V4.2-metadata-query-indexes
2021-06-10 11:28:52,657 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [main] Ignoring script patch (post-Hibernate): patch.db-V5.1-metadata-query-indexes
2021-06-10 11:28:52,657 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [main] Ignoring script patch (post-Hibernate): patch.db-V5.2-remove-jbpm-tables-from-db
2021-06-10 11:28:52,657 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] [main] Ignoring script patch (post-Hibernate): patch.db-V6.3-add-indexes-node-transaction
2021-06-10 11:28:52,795 INFO [org.alfresco.repo.admin] [main] Using database URL 'jdbc:postgresql://localhost:5432/alfresco' with user 'alfresco'.
2021-06-10 11:28:52,795 INFO [org.alfresco.repo.admin] [main] Connected to database PostgreSQL version 13.3 (Ubuntu 13.3-1.pgdg16.04+1)
2021-06-10 11:28:56,602 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2021-06-10 11:28:56,684 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
2021-06-10 11:28:59,294 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Starting 'email' subsystem, ID: [email, outbound]
2021-06-10 11:28:59,366 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Startup of 'email' subsystem, ID: [email, outbound] complete
2021-06-10 11:29:00,631 WARN [org.springframework.web.context.support.XmlWebApplicationContext] [main] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] for bean with name 'transformer.worker.ocr.tiff' defined in file [/opt/tomcat/apache-tomcat-9.0.46/shared/classes/alfresco/extension/Linux_tesseract-ocr-transform-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker
2021-06-10 11:29:00,751 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Stopping 'email' subsystem, ID: [email, outbound]
2021-06-10 11:29:00,755 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Stopped 'email' subsystem, ID: [email, outbound]
2021-06-10 11:29:01,343 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2021-06-10 11:29:01,344 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [main] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2021-06-10 11:29:01,368 ERROR [org.springframework.web.context.ContextLoader] [main] Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] for bean with name 'transformer.worker.ocr.tiff' defined in file [/opt/tomcat/apache-tomcat-9.0.46/shared/classes/alfresco/extension/Linux_tesseract-ocr-transform-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1542)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:693)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:663)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1670)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:924)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:692)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:689)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1881)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:582)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:829)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.ClassNotFoundException: org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:469)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1607)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1534)

Thanks.

1 Reply
cristinamr
Intermediate II

Re: Error after integrating tessaract-ocr

Hi.

The error says there's no such class loaded in your context:

Cannot find class [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] for bean with name 'transformer.worker.ocr.tiff' defined in file...

In fact that class was there in Alfresco previous version, but not on Alfresco 7 community. At least on that path.

Concerning the product:

 We have tested this with Alfresco versions 5.1.f and 5.2.e.

Source.

I have my doubts using an Alfresco 7 with that solution (no evidence that somebody else tested it).

Maybe you can contact to Contcentric directly and ask them for this compatibility.

Cheers,

Cristina.

--
Check our products: AQuA : https://aqua.venzia.es | Seidoc : https://seidoc.es