Bug 1123725
Summary: | Deleting a repository in a cluster causes java.lang.IllegalArgumentException:Parameter named 'resource' is not instance of clazz 'RuntimeResource'! | ||
---|---|---|---|
Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Toshiya Kobayashi <tkobayas> |
Component: | Business Central | Assignee: | Alexandre Porcelli <porcelli> |
Status: | CLOSED EOL | QA Contact: | Radovan Synek <rsynek> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.0.2 | CC: | alazarot, cray, fspolti, kverlaen, mwinkler |
Target Milestone: | ER5 | ||
Target Release: | 6.1.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-27 20:09:01 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Toshiya Kobayashi
2014-07-28 06:35:17 UTC
(Analysis) - When you delete a repo, RepositoryServiceImpl.removeRepository() fails during ioService.delete() with IllegalStateException so the latter part (de-associating the repo from the OrganizationalUnit) is not executed. https://github.com/uberfire/uberfire/blob/0.3.x/uberfire-backend/uberfire-backend-server/src/main/java/org/uberfire/backend/server/repositories/RepositoryServiceImpl.java#L253 ~~~ 4:32:50,730 DEBUG [org.jboss.errai.bus.server.io.AbstractRPCMethodCallback] (http-localhost.localdomain/127.0.0.1:8080-1) RPC endpoint threw exception:: java.lang.IllegalStateException: FileSystem is close. at org.uberfire.java.nio.fs.jgit.JGitFileSystem.checkClose(JGitFileSystem.java:358) [uberfire-nio2-jgit-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.java.nio.fs.jgit.JGitFileSystem.getRootDirectories(JGitFileSystem.java:156) [uberfire-nio2-jgit-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.io.impl.cluster.FileSystemSyncLock$1.<init>(FileSystemSyncLock.java:37) [uberfire-io-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.io.impl.cluster.FileSystemSyncLock.buildContent(FileSystemSyncLock.java:36) [uberfire-io-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.commons.cluster.LockExecuteNotifyAsyncReleaseTemplate.sendMessage(LockExecuteNotifyAsyncReleaseTemplate.java:7) [uberfire-commons-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.commons.cluster.BaseLockExecuteNotifyReleaseTemplate.execute(BaseLockExecuteNotifyReleaseTemplate.java:22) [uberfire-commons-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.commons.cluster.LockExecuteNotifyAsyncReleaseTemplate.execute(LockExecuteNotifyAsyncReleaseTemplate.java:3) [uberfire-commons-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.io.impl.cluster.IOServiceClusterImpl.delete(IOServiceClusterImpl.java:424) [uberfire-io-0.3.3-redhat-4.jar:0.3.3-redhat-4] at org.uberfire.backend.server.repositories.RepositoryServiceImpl.removeRepository(RepositoryServiceImpl.java:253) [uberfire-backend-server-0.3.3-redhat-4.jar:0.3.2-SNAPSHOT] at org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.removeRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java) [uberfire-backend-server-0.3.3-redhat-4.jar:0.3.2-SNAPSHOT] ~~~ - So the OrganizationalUnit still retains the deleted repo name and it will results in adding 'null' in OrganizationalUnit.getRepositories() when the OrganizationUnit is loaded. https://github.com/uberfire/uberfire/blob/0.3.x/uberfire-backend/uberfire-backend-server/src/main/java/org/uberfire/backend/server/organizationalunit/OrganizationalUnitFactoryImpl.java#L25 - If OrganizationalUnit.getRepositories() includes 'null' in the list, it will results in the IllegalArgumentException Parameter named 'resource' is not instance of clazz 'RuntimeResource'! https://github.com/uberfire/uberfire/blob/0.3.x/uberfire-security/uberfire-security-api/src/main/java/org/uberfire/security/impl/authz/RuntimeResourceManager.java#L60 Workaround: - Delete a OrganizationUnit in problem ([Administration]->[Manage Organizational Units]-> "Delete" button in Organizational Unit Manager) - Create a OrganizationUnit again with the same name ("Add" button in Organizational Unit Manager) - Associate repositories for the OrganizationUnit (Use list-box in Organizational Unit Manager) Fix pushed: (0.5.x) https://github.com/uberfire/uberfire/commit/09896f064225e9048d1eb692fe53a7cdf3864927 (master) https://github.com/uberfire/uberfire-extensions/commit/78d2a678d07c70023bd777aee025bac9202cd9b1 (master) https://github.com/droolsjbpm/kie-uberfire-extensions/commit/02237b03c (6.2.x) https://github.com/droolsjbpm/kie-uberfire-extensions/commit/257946c01 (master) https://github.com/droolsjbpm/guvnor/commit/e02c6aa70 (6.2.x) https://github.com/droolsjbpm/guvnor/commit/802a40884 (master) https://github.com/droolsjbpm/kie-wb-common/commit/da0ef923b (6.2.x) https://github.com/droolsjbpm/kie-wb-common/commit/3774cd7e7 (master) https://github.com/droolsjbpm/kie-wb-distributions/commit/cc5763e5c (6.2.x) https://github.com/droolsjbpm/kie-wb-distributions/commit/8b96b972c Make sure you have the following properties set in your nodes: <property name="jboss.node.name" value="nodeOne" boot-time="false"/> <property name="org.uberfire.nio.git.dir" value="/tmp/jbpm/nodeone" boot-time="false"/> <property name="org.uberfire.cluster.id" value="bpms-lock" boot-time="false"/> <property name="org.uberfire.cluster.zk" value="localhost:2188" boot-time="false"/> <property name="org.uberfire.cluster.local.id" value="nodeOne_11" boot-time="false"/> <property name="org.uberfire.cluster.vfs.lock" value="vfs-lock" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.port" value="8001" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.hostport" value="8001" boot-time="false"/> <property name="org.uberfire.nio.git.daemon.port" value="9418" boot-time="false"/> <property name="org.uberfire.nio.git.daemon.hostport" value="9418" boot-time="false"/> <property name="org.uberfire.metadata.index.dir" value="/tmp/jbpm/nodeone" boot-time="false"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="/tmp/jbpm/nodeone" boot-time="false"/> <property name="org.uberfire.cluster.autostart" value="true" boot-time="false"/> Double check org.uberfire.nio.git.daemon.hostport, org.uberfire.nio.git.ssh.hostport and org.uberfire.cluster.autostart! Verified with BPMS-6.1.0.ER5 |