【问题标题】:Error: Creating directories for /.niogit/system.git failed deploying jbpm-console.war on Wildfly-8.1.0.Final错误:为 /.niogit/system.git 创建目录在 Wildfly-8.1.0.Final 上部署 jbpm-console.war 失败
【发布时间】:2015-04-08 18:16:58
【问题描述】:

在 Amazon EC2 上的 Centos 6.5 上的 OpenJDK 1.7 上运行 Wildfly-8.1.0.Final。
当我尝试部署 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 正在通过 /etc/init.d/wildfly 启动,并以用户名“wildfly”运行服务器。
$JBOSS_HOME/bin 目录中的 ls -all 是:

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


.niogit 子目录的 ls -all 是:

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 使用的是standalone-full.xml 启动配置文件。它是基本的 6.2.0.Final 版本,只是我已经从 H2 持久性更改为 Postgresql 9.4 持久性。持久性功能运行良好,似乎与此错误无关。
在 Wildfly 中部署的唯一其他 .war 是 kie-server-6.2.0.Final-ee7.war,它的部署没有错误。
Postgresql 驱动程序设置为 Wildfly 模块,并且工作正常。
更新:美国东部时间 2015 年 4 月 8 日下午 5:41 - 创建目录错误是由于它不是从基本目录 $JBOSS_HOME/bin 开始的。出现日志错误,表明未设置 M2_HOME。在我的 /etc/init.d/wildfly 中设置 M2_HOME 和 M3_HOME,设置 M2_REPO 和 M3_REPO,并为“wildfly”用户设置适当的权限后,M2_HOME 警告消失了。但是,创建目录错误仍然存​​在。在逐字查看错误消息后,我在根目录“/”之外创建了 .niogit 和 .index 子目录。是的, '/'。我将这些目录的权限授予“wildfly”用户。果然,重新启动 wildfly 服务后,系统成功填充并使用了 /.niogit 和 /.index 子目录。接下来,它抱怨能够编写'repositories/kie'。我从根目录创建了这个子目录,并设置了权限,这个错误也消失了。

所以,现在剩下的唯一问题是:配置用于 .niogit 的基本目录的正确方法是什么? 。指数?存储库/kie?

M2_REPO 和 M3_REPO 都不起作用,我在 6.2.0.Final 文档中找不到答案。

有什么想法吗?

【问题讨论】:

    标签: linux drools wildfly jbpm jgit


    【解决方案1】:

    .niogit 的基目录由 org.uberfire.nio.git.dir 定义。

    .index 的基本目录由 org.uberfire.metadata.index.dir 定义。

    repositories/kie 的基本目录由 org.guvnor.m2repo.dir 定义。

    为所有这些创建一个基本目录。在此示例中,我将基本目录称为 /opt/mybasedir。授予“wildfly”用户对该基本目录的读、写、执行权限。

    如果您在域模式下运行 Wildfly,您可以在 host.xml 中定义这些参数。我在独立模式下运行,所以我更新了 /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

    【讨论】:

      【解决方案2】:

      我在 Debian 上部署 Wildfly 和 jBPM 时遇到了类似的问题。我解决了 在 /opt/wildfy/standalone/configuration/standalone.xml 中添加 JBoss 的系统属性到

      然后可以部署业务中心战争文件并且 jBPM 可用。

      仅当我尝试使用 systemd 将 wildfly 作为服务运行时才会出现此问题。从控制台以 root 身份启动它时没有问题。

      【讨论】:

        【解决方案3】:

        Wildfly 和 jBPM 也存在类似问题(jbpm java.nio.file.NoSuchFileException: /.niogit/system/system.lock)。

        在以前的答案和 Wildfly 管理员指南的帮助下,这对我有用:

        sudo mkdir /opt/wildfly/standalone/otherbase
        sudo chown -RH wildfly: /opt/wildfly/standalone/otherbase
        sudo editor-of-choice /opt/wildfy/standalone/configuration/standalone.xml
        Go to section <system-properties>
        Add <property name="org.uberfire.nio.git.dir" value="${jboss.server.base.dir}/otherbase"/>
        

        【讨论】:

          猜你喜欢
          • 2014-11-17
          • 2014-12-11
          • 2014-10-11
          • 2014-08-16
          • 2015-12-12
          • 2015-10-04
          • 1970-01-01
          • 2014-06-22
          • 2023-03-18
          相关资源
          最近更新 更多