runMigration.sh throws Exception when repository uses RDB

Solution Verified - Updated -

Issue

runMigration.sh comes with BRMS/BPMS 6.0.2 throws Exception when repository uses RDB.

[hfuruich@localhost bin]$ ./runMigration.sh -i /home/hfuruich/product/enterprise/brms-531/test/jboss-eap-6.0/bin
Migration started. Reading from inputJcrRepository ({/home/hfuruich/product/enterprise/brms-531/test/jboss-eap-6.0/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@21805932
    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: File system initialization failure.
    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: File system initialization failure.
    at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1060)
    at org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
    at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
    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.fs.FileSystemException: failed to initialize file system
    at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:210)
    at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
    ... 63 more
Caused by: javax.jcr.RepositoryException: JNDI name not found: java:jboss/datasources/brms
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:295)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:233)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
    at org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
    at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
    ... 64 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)
    at javax.naming.InitialContext.lookup(InitialContext.java:411)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:280)
    ... 68 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.

Environment

  • Red Hat JBoss BRMS
    • 6.0.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content