Search code examples
linuxdroolswildflyjbpmjgit

Error: Creating directories for /.niogit/system.git failed deploying jbpm-console.war on Wildfly-8.1.0.Final


Running Wildfly-8.1.0.Final on OpenJDK 1.7 on Centos 6.5 on Amazon EC2.
Getting an error when I try to deploy jbpm-console.war (droolsjbpm 6.2.0.Final).

12:42:35,314 ERROR [org.kie.workbench.backend.AppSetup] (MSC service thread 1-6) Error during update config: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void org.guvnor.structure.backend.config.ConfigurationServiceImpl.setup() on org.guvnor.structure.backend.config.ConfigurationServiceImpl@6b2e98c8
    at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:91) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:72) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:95) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.injection.producer.BeanInjectionTarget.postConstruct(BeanInjectionTarget.java:63) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:153) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:78) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.guvnor.structure.backend.config.ConfigurationServiceImpl$Proxy$_$$_WeldClientProxy.startBatch(Unknown Source) [guvnor-structure-backend-6.2.0.Final.jar:6.2.0.Final]
    at org.kie.workbench.backend.AppSetup.assertPlayground(AppSetup.java:101) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_75]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_75]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_75]
    at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_75]
    at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:89) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:72) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:95) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.injection.producer.BeanInjectionTarget.postConstruct(BeanInjectionTarget.java:63) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:78) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.kie.workbench.backend.AppSetup$Proxy$_$$_WeldClientProxy.toString(Unknown Source) [classes:]
    at org.uberfire.backend.server.cdi.SystemConfigProducer.runPostConstruct(SystemConfigProducer.java:122) [uberfire-backend-cdi-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.backend.server.cdi.SystemConfigProducer.afterDeploymentValidation(SystemConfigProducer.java:105) [uberfire-backend-cdi-0.5.0.Final.jar:0.5.0.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_75]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_75]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_75]
    at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_75]
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:125) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:128) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:102) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:63) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:35) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:396) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:85) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:93) [wildfly-weld-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_75]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_75]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_75]
    at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_75]
    at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:89) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    ... 47 more
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Creating directories for /.niogit/system.git failed
    at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:95) [org.eclipse.jgit-3.3.2.201404171909-r.jar:3.3.2.201404171909-r]
    at org.uberfire.java.nio.fs.jgit.util.JGitUtil.newRepository(JGitUtil.java:104) [uberfire-nio2-jgit-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.newFileSystem(JGitFileSystemProvider.java:586) [uberfire-nio2-jgit-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:117) [uberfire-nio2-api-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:83) [uberfire-nio2-api-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.io.impl.AbstractIOService.newFileSystem(AbstractIOService.java:225) [uberfire-io-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.backend.server.cdi.SystemConfigProducer$2.create(SystemConfigProducer.java:237) [uberfire-backend-cdi-0.5.0.Final.jar:0.5.0.Final]
    at org.uberfire.backend.server.cdi.SystemConfigProducer$2.create(SystemConfigProducer.java:172) [uberfire-backend-cdi-0.5.0.Final.jar:0.5.0.Final]
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
    at org.jboss.weld.proxies.FileSystem$1366014920$Proxy$_$$_WeldClientProxy.getRootDirectories(Unknown Source) [weld-core-impl-2.1.2.Final.jar:]
    at org.guvnor.structure.backend.config.ConfigurationServiceImpl.setup(ConfigurationServiceImpl.java:106) [guvnor-structure-backend-6.2.0.Final.jar:6.2.0.Final]
    ... 52 more
Caused by: java.io.IOException: Creating directories for /.niogit/system.git failed
    at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:315) [org.eclipse.jgit-3.3.2.201404171909-r.jar:3.3.2.201404171909-r]
    at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:270) [org.eclipse.jgit-3.3.2.201404171909-r.jar:3.3.2.201404171909-r]
    at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:92) [org.eclipse.jgit-3.3.2.201404171909-r.jar:3.3.2.201404171909-r]
    ... 64 more


Wildfly is being started via /etc/init.d/wildfly and runs the server under the user name 'wildfly'.
The ls -all from the $JBOSS_HOME/bin directory is:

total 188
drwxrwxrwx  9 wildfly root     4096 Apr  7 18:50 .
drwxr-xr-x 10 wildfly root     4096 Apr  6 13:38 ..
-rwxrwxrwx  1 wildfly root     2044 May 30  2014 add-user.bat
-rwxrwxrwx  1 wildfly root     2444 May 30  2014 add-user.properties
-rwxrwxrwx  1 wildfly root     2121 May 30  2014 add-user.sh
-rwxrwxrwx  1 wildfly root     2637 May 30  2014 appclient.bat
-rwxrwxrwx  1 wildfly root     1836 May 30  2014 appclient.conf
-rwxrwxrwx  1 wildfly root     2459 May 30  2014 appclient.conf.bat
-rwxrwxrwx  1 wildfly root     3475 May 30  2014 appclient.sh
drwxrwxrwx  2 wildfly root     4096 Apr  6 13:38 client
-rwxrwxrwx  1 wildfly root     4924 May 30  2014 domain.bat
-rwxrwxrwx  1 wildfly root     2483 May 30  2014 domain.conf
-rwxrwxrwx  1 wildfly root     3138 May 30  2014 domain.conf.bat
-rwxrwxrwx  1 wildfly root     8724 May 30  2014 domain.sh
drwxrwxrwx  6 wildfly wildfly  4096 Apr  6 15:34 .index
drwxrwxrwx  2 wildfly root     4096 Apr  6 13:38 init.d
-rwxrwxrwx  1 wildfly root     2029 May 30  2014 jboss-cli.bat
-rwxrwxrwx  1 wildfly root     1852 May 30  2014 jboss-cli-logging.properties
-rwxrwxrwx  1 wildfly root      472 May 30  2014 .jbossclirc
-rwxrwxrwx  1 wildfly root     2501 May 30  2014 jboss-cli.sh
-rwxrwxrwx  1 wildfly root     1559 May 30  2014 jboss-cli.xml
-rwxrwxrwx  1 wildfly root     1664 May 30  2014 jconsole.bat
-rwxrwxrwx  1 wildfly root     2134 May 30  2014 jconsole.sh
-rwxrwxrwx  1 wildfly root     1936 May 30  2014 jdr.bat
-rwxrwxrwx  1 wildfly root     1898 May 30  2014 jdr.sh
drwxrwxrwx  7 wildfly wildfly  4096 Apr  8 11:29 .niogit
drwxrwxrwx  3 wildfly wildfly  4096 Apr  6 15:11 repositories
-rwxrwxrwx  1 wildfly root      412 May 30  2014 run.bat
-rwxrwxrwx  1 wildfly root      441 May 30  2014 run.sh
drwxrwxrwx  2 wildfly wildfly  4096 Apr  6 15:11 .security
drwxrwxrwx  3 wildfly root     4096 Apr  6 13:38 service
-rwxrwxrwx  1 wildfly root     7928 May 30  2014 standalone.bat
-rwxrwxrwx  1 wildfly root     2310 May 30  2014 standalone.conf
-rwxrwxrwx  1 wildfly root     2689 May 30  2014 standalone.conf.bat
-rwxrwxrwx  1 wildfly root    10191 May 30  2014 standalone.sh
-rwxrwxrwx  1 wildfly root     2030 May 30  2014 vault.bat
-rwxrwxrwx  1 wildfly root     2280 May 30  2014 vault.sh
-rwxrwxrwx  1 wildfly root     1495 May 30  2014 wsconsume.bat
-rwxrwxrwx  1 wildfly root     2175 May 30  2014 wsconsume.sh
-rwxrwxrwx  1 wildfly root     1434 May 30  2014 wsprovide.bat
-rwxrwxrwx  1 wildfly root     1997 May 30  2014 wsprovide.sh


The ls -all for the .niogit subdirectory is:

drwxrwxrwx 7 wildfly wildfly 4096 Apr  8 11:29 .
drwxrwxrwx 9 wildfly root    4096 Apr  7 18:50 ..
drwxrwxrwx 7 wildfly wildfly 4096 Apr  6 15:17 jbpm-playground.git
drwxrwxrwx 7 wildfly wildfly 4096 Apr  6 15:17 plugins.git
drwxrwxrwx 7 wildfly wildfly 4096 Apr  6 16:41 system.git
drwxrwxrwx 7 wildfly wildfly 4096 Apr  6 15:17 uf-playground.git


Wildfly is using the standalone-full.xml startup configuration file. It is the base 6.2.0.Final version, except that I have changed from H2 persistence to Postgresql 9.4 persistence. The persistence functionality is working well and does not seem to be related to this error.
The only other .war that is deployed in Wildfly is kie-server-6.2.0.Final-ee7.war, which deploys without error.
The Postgresql driver is set up as a Wildfly module, and is working fine.
Update: 4/8/2015 5:41pm ET - The Creating Directories error was due to the fact that it wasn't starting with base directory $JBOSS_HOME/bin. There was a log error indicating that M2_HOME was not set. After setting M2_HOME and M3_HOME in my /etc/init.d/wildfly, and setting M2_REPO and M3_REPO, and setting the appropriate permissions for the 'wildfly' user, the M2_HOME warning went away. However, the Creating Directories error remained. After looking at the error message literally, I created .niogit and .index subdirectories off of the root directory '/'. Yes, '/'. I gave permissions to these directories to the 'wildfly' user. Sure enough, upon a restart of the wildfly service, the system successfully populated and used the /.niogit and /.index subdirectories. Next, it complained about being able to write 'repositories/kie'. I created this sub-directory off of the root directory, and set permissions and this error went away as well.

So, now the only remaining question is: what is the proper way to configure the base directory to be used for .niogit? .index? repositories/kie?

Neither M2_REPO nor M3_REPO are working, and I can't find the answer in the 6.2.0.Final documentation.

Any ideas?


Solution

  • The base directory for .niogit is defined by org.uberfire.nio.git.dir.

    The base directory for .index is defined by org.uberfire.metadata.index.dir.

    The base directory for repositories/kie is defined by org.guvnor.m2repo.dir.

    Create a base directory for all of these. In this example, I call the base directory /opt/mybasedir. Give the 'wildfly' user read, write, execute permissions on this base directory.

    If you are running Wildfly in domain mode, you can define these parameters in host.xml. I am running in Standalone mode, so I updated /etc/init.d/wildfly:

    if [ -r /etc/rc.d/init.d/functions ]; then daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG -Dfile.encoding=UTF-8 -Dorg.kie.demo=true -Dorg.uberfire.nio.git.dir=/opt/mybasedir -Dorg.uberfire.metadata.index.dir=/opt/mybasedir -Dorg.guvnor.m2repo.dir=/opt/mybasedir >> $JBOSS_CONSOLE_LOG 2>&1 & else su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG -Dfile.encoding=UTF-8 -Dorg.kie.demo=true -Dorg.uberfire.nio.git.dir=/opt/mybasedir -Dorg.uberfire.metadata.index.dir=/opt/mybasedir -Dorg.guvnor.m2repo.dir=/opt/mybasedir " >> $JBOSS_CONSOLE_LOG 2>&1 & fi