Bug 1132740 - Jcr2vfs migration fails with ClassNotFoundException: org.apache.pdfbox.io.RandomAccess
Summary: Jcr2vfs migration fails with ClassNotFoundException: org.apache.pdfbox.io.Ran...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Migration Tool
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.1.0
Assignee: Edson Tirelli
QA Contact: Tibor Zimanyi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-22 00:47 UTC by Hisao Furuichi
Modified: 2020-03-27 20:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:01:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
setting file which I used to reproduce the issue (7.91 KB, text/plain)
2014-08-26 08:08 UTC, Hisao Furuichi
no flags Details

Description Hisao Furuichi 2014-08-22 00:47:19 UTC
Description of problem:
When migrating from JCR backend, ClassNotFoundExeption occurs.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. cd jboss-bpms-brms-6.0.2.GA-redhat-5-migration/bin
2. ./runMigration.sh  -i $REPOSITORY_PATH

Actual results:
===
Migration started. Reading from inputJcrRepository ({/home/hfuruich/product/enterprise/brms-531/test_standalone/brms-standalone-5.3.1/jboss-as/bin}).
  Module migration started
org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.drools.guvnor.server.repository.RepositoryStartupService.create() on org.drools.guvnor.server.repository.ProductionRepositoryStartupService@445887e8
	at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:404)
	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:178)
	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:298)
	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:101)
	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
	at org.drools.guvnor.server.repository.ProductionRepositoryStartupService$Proxy$_$$_WeldClientProxy.newSession(ProductionRepositoryStartupService$Proxy$_$$_WeldClientProxy.java)
	at org.drools.guvnor.server.repository.RulesRepositoryManager.getRulesRepository(RulesRepositoryManager.java:78)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137)
	at org.jboss.weld.bean.ProducerMethod$ProducerMethodProducer.produce(ProducerMethod.java:136)
	at org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:319)
	at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307)
	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:101)
	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
	at org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.listModules(RulesRepository$Proxy$_$$_WeldClientProxy.java)
	at org.drools.guvnor.server.RepositoryModuleOperations.listModules(RepositoryModuleOperations.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
	at org.drools.guvnor.server.RepositoryModuleOperations$Proxy$_$$_WeldClientProxy.listModules(RepositoryModuleOperations$Proxy$_$$_WeldClientProxy.java)
	at org.drools.guvnor.server.RepositoryModuleService.listModules(RepositoryModuleService.java:109)
	at org.drools.guvnor.server.RepositoryModuleService.listModules(RepositoryModuleService.java:102)
	at org.drools.guvnor.server.RepositoryModuleService$Proxy$_$$_WeldClientProxy.listModules(RepositoryModuleService$Proxy$_$$_WeldClientProxy.java)
	at org.drools.workbench.jcr2vfsmigration.migrater.ModuleMigrater.migrateAll(ModuleMigrater.java:33)
	at org.drools.workbench.jcr2vfsmigration.migrater.ModuleMigrater$Proxy$_$$_WeldClientProxy.migrateAll(ModuleMigrater$Proxy$_$$_WeldClientProxy.java)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater.migrateAll(Jcr2VfsMigrater.java:89)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.migrateAll(Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.java)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.migrate(Jcr2VfsMigrationApp.java:64)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.run(Jcr2VfsMigrationApp.java:52)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.main(Jcr2VfsMigrationApp.java:37)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:174)
	at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:402)
	... 42 more
Caused by: org.drools.repository.RulesRepositoryException: javax.jcr.RepositoryException: Invalid repository configuration file: /home/hfuruich/product/enterprise/brms-531/test_standalone/brms-standalone-5.3.1/jboss-as/bin/repository/repository.xml
	at org.drools.guvnor.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:112)
	at org.drools.guvnor.server.repository.RepositoryStartupService.create(RepositoryStartupService.java:69)
	... 52 more
Caused by: javax.jcr.RepositoryException: Invalid repository configuration file: /home/hfuruich/product/enterprise/brms-531/test_standalone/brms-standalone-5.3.1/jboss-as/bin/repository/repository.xml
	at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:238)
	at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
	at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
	at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
	at org.drools.repository.JCRRepositoryConfigurator.login(JCRRepositoryConfigurator.java:95)
	at org.drools.repository.RulesRepositoryConfigurator.login(RulesRepositoryConfigurator.java:95)
	at org.drools.guvnor.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:108)
	... 53 more
Caused by: org.apache.jackrabbit.core.config.ConfigurationException: Property textFilterClasses of class org.apache.jackrabbit.core.query.lucene.SearchIndex can not be set to "org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"
	at org.apache.jackrabbit.core.config.BeanConfig.setProperty(BeanConfig.java:279)
	at org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:203)
	at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$1.getQueryHandler(RepositoryConfigurationParser.java:631)
	at org.apache.jackrabbit.core.config.RepositoryConfig.getQueryHandler(RepositoryConfig.java:1032)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:174)
	at org.apache.jackrabbit.core.RepositoryImpl.getSystemSearchManager(RepositoryImpl.java:630)
	at org.apache.jackrabbit.core.RepositoryImpl.access$100(RepositoryImpl.java:124)
	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1860)
	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doPostInitialize(RepositoryImpl.java:2095)
	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:2000)
	at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:533)
	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:342)
	at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
	at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
	... 59 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.jackrabbit.core.config.BeanConfig.setProperty(BeanConfig.java:255)
	... 72 more
Caused by: java.lang.NoClassDefFoundError: org/apache/pdfbox/io/RandomAccess
	at org.apache.jackrabbit.core.query.lucene.JackrabbitParser.setTextFilterClasses(JackrabbitParser.java:153)
	at org.apache.jackrabbit.core.query.lucene.SearchIndex.setTextFilterClasses(SearchIndex.java:1892)
	... 77 more
Caused by: java.lang.ClassNotFoundException: org.apache.pdfbox.io.RandomAccess
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 79 more
Migration ended with errors. Written into outputVfsRepository ({/home/hfuruich/product/enterprise/bpms-602/migration/jboss-bpms-brms-6.0.2.GA-redhat-5-migration/bin/outputVfs}).

Error occurred. Check if $JAVA_HOME (/home/hfuruich/tool/jdk/oracle/jdk1.7.0_17) is correct.
===

Expected results:
No such Exception.

Additional info:
It looks like pdfbox-app-18.6.jar is missing. If I place it under libs directory, I can complete migration without any errors.

Comment 1 Petr Široký 2014-08-22 18:45:56 UTC
Hi Hisao,

based on the following message: 
javax.jcr.RepositoryException: Invalid repository configuration file: /home/hfuruich/product/enterprise/brms-531/test_standalone/brms-standalone-5.3.1/jboss-as/bin/repository/repository.xml 

it seems the problem is related to the Jackrabbit configuration file. Would it be possible to attach that file, so we can easily reproduce the issue?

(I tried to access the https://access.redhat.com/support/cases/01168179 for more info but it gives me redirect loop.)

Comment 3 Hisao Furuichi 2014-08-26 08:08:37 UTC
Created attachment 930780 [details]
setting file which I used to reproduce the issue

Comment 4 Hisao Furuichi 2014-08-26 08:11:29 UTC
Hi, Petr.

I attached one when I reproduce the issue.
Thx

Comment 6 Jan 2014-08-26 13:31:15 UTC
Pushed fix to master:
https://github.com/droolsjbpm/drools-wb/commit/154b49b0c59d55076fb7dac545823a829d50e4c2

Fix adds the pdfbox-app.jar (verion 1.8.6) to the tool's lib directory.

Comment 9 Petr Široký 2015-01-27 15:11:46 UTC
The migration tool was partly rewritten recently, so the fix for this needed to be re-applied. It should be now fixed both on master and 6.2.x.

master:
https://github.com/droolsjbpm/drools-wb/commit/4f7b75ce79bc26f9b253800d27f5cc1b29672532

6.2.x:
https://github.com/droolsjbpm/drools-wb/commit/e5e87429470cf5ee0b2690e254fe9bdcdd2b9a60

Comment 12 Tibor Zimanyi 2015-02-18 14:14:13 UTC
Verified. The library pdfbox-1.8.6.jar is included in the build.


Note You need to log in before you can comment on or make changes to this bug.