Error: Creating directories for /.niogit/system.git failed deploying jbpm-console.war on Wildfly-8.1.0.Final
Error: Creating directories for /.niogit/system.git failed deploying jbpm-console.war on Wildfly-8.1.0.Final
运行 Wildfly-8.1.0.Final 在 OpenJDK 1.7 在 Centos 6.5 在 Amazon EC2.
当我尝试部署 jbpm-console.war (droolsjbpm 6.2.0.Final).
时出现错误
</p>
<pre><code>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.create(SystemConfigProducer.java:237) [uberfire-backend-cdi-0.5.0.Final.jar:0.5.0.Final]
at org.uberfire.backend.server.cdi.SystemConfigProducer.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.FileSystem66014920$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 是:
</p>
<pre><code>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 是:
</p>
<pre><code>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 启动配置文件。是base 6.2.0.Final版本,只是我从H2持久化改成了Postgresql 9.4持久化。持久性功能运行良好,似乎与此错误无关。
在 Wildfly 中部署的唯一其他 .war 是 kie-server-6.2.0.Final-ee7.war,它部署时没有错误。
Postgresql 驱动程序设置为 Wildfly 模块,并且运行良好。
更新:4/8/2015 5:41pm ET - 创建目录错误是由于它不是从基本目录 $JBOSS_HOME/bin 开始的。有一个日志错误指示未设置 M2_HOME。在我的/etc/init.d/wildfly中设置了M2_HOME和M3_HOME,设置了M2_REPO和M3_REPO,并为[=]设置了合适的权限45=]用户,M2_HOMEwarning走了。但是,创建目录错误仍然存在。从字面上看错误消息后,我从根目录“/”创建了 .niogit 和 .index 子目录。是的, '/'。我将这些目录的权限授予了 'wildfly' 用户。果然,在重启 wildfly 服务后,系统成功填充并使用了 /.niogit 和 /.index 子目录。接下来,它抱怨无法写入 'repositories/kie'。我从根目录创建了这个子目录,并设置了权限,这个错误也消失了。
那么,现在唯一剩下的问题是:配置用于 .niogit 的基本目录的正确方法是什么? 。指数? repositories/kie?
M2_REPO 和 M3_REPO 都不起作用,我在 6.2.0.Final 文档中找不到答案。
有什么想法吗?
.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
我在 Debian 上部署 Wildfly 和 jBPM 时遇到了类似的问题。我解决了它
在 /opt/wildfy/standalone/configuration/standalone.xml 中添加 属性 的 JBoss 系统到
然后可以部署业务中心 war 文件并且 jBPM 可用。
问题只在我尝试 运行 wildfly 作为 systemd 的服务时出现。从控制台以 root 身份启动它时没有问题。
与 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"/>
运行 Wildfly-8.1.0.Final 在 OpenJDK 1.7 在 Centos 6.5 在 Amazon EC2.
当我尝试部署 jbpm-console.war (droolsjbpm 6.2.0.Final).
</p>
<pre><code>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.create(SystemConfigProducer.java:237) [uberfire-backend-cdi-0.5.0.Final.jar:0.5.0.Final]
at org.uberfire.backend.server.cdi.SystemConfigProducer.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.FileSystem66014920$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 是:
</p>
<pre><code>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 是:
</p>
<pre><code>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 启动配置文件。是base 6.2.0.Final版本,只是我从H2持久化改成了Postgresql 9.4持久化。持久性功能运行良好,似乎与此错误无关。
在 Wildfly 中部署的唯一其他 .war 是 kie-server-6.2.0.Final-ee7.war,它部署时没有错误。
Postgresql 驱动程序设置为 Wildfly 模块,并且运行良好。
更新:4/8/2015 5:41pm ET - 创建目录错误是由于它不是从基本目录 $JBOSS_HOME/bin 开始的。有一个日志错误指示未设置 M2_HOME。在我的/etc/init.d/wildfly中设置了M2_HOME和M3_HOME,设置了M2_REPO和M3_REPO,并为[=]设置了合适的权限45=]用户,M2_HOMEwarning走了。但是,创建目录错误仍然存在。从字面上看错误消息后,我从根目录“/”创建了 .niogit 和 .index 子目录。是的, '/'。我将这些目录的权限授予了 'wildfly' 用户。果然,在重启 wildfly 服务后,系统成功填充并使用了 /.niogit 和 /.index 子目录。接下来,它抱怨无法写入 'repositories/kie'。我从根目录创建了这个子目录,并设置了权限,这个错误也消失了。
那么,现在唯一剩下的问题是:配置用于 .niogit 的基本目录的正确方法是什么? 。指数? repositories/kie?
M2_REPO 和 M3_REPO 都不起作用,我在 6.2.0.Final 文档中找不到答案。
有什么想法吗?
.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
我在 Debian 上部署 Wildfly 和 jBPM 时遇到了类似的问题。我解决了它 在 /opt/wildfy/standalone/configuration/standalone.xml 中添加 属性 的 JBoss 系统到
然后可以部署业务中心 war 文件并且 jBPM 可用。
问题只在我尝试 运行 wildfly 作为 systemd 的服务时出现。从控制台以 root 身份启动它时没有问题。
与 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"/>