Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1324596

Summary: [GSS] [6.2.z] 6.2.2 unable to open/edit some assets with specific user
Product: [Retired] JBoss BPMS Platform 6 Reporter: Hiroko Miura <hmiura>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.0CC: etirelli, lpetrovi, rrajasek
Target Milestone: CR1   
Target Release: 6.2.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1324592 Environment:
Last Closed: 2020-03-27 20:00:56 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:
Bug Depends On: 1324592    
Bug Blocks: 1327763, 1327765    
Attachments:
Description Flags
sample project to reproduce the issue
none
deleting repository exception none

Description Hiroko Miura 2016-04-06 17:56:47 UTC
Created attachment 1144292 [details]
sample project to reproduce the issue

+++ This bug was initially created as a clone of Bug #1324592 +++

Description of problem:
After applying 6.2.2 patch onto 6.2.0, 
the following assets(at least) can't open/edit.

- Business Process
- Guided Decision Tables
- Guided Rule
- Test Scenarios

Regarding Business process, process designer is not opened but previously opened editor is sown instead.

Regarding the other assets, error message with blue characters

'No such file. Please check the file exists at the version selected.'

is shown and exception appear in server.log.

02:16:32,431 ERROR [org.guvnor.common.services.backend.exceptions.ExceptionUtilities] (http-/127.0.0.1:8080-2) Exception thrown: null: org.uberfire.java.nio.file.FileSystemNotFoundException
	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.getPath(JGitFileSystemProvider.java:790) [uberfire-nio2-jgit-0.7.5.Final-redhat-4.jar:0.7.5.Final-redhat-4]
	at org.uberfire.java.nio.file.Paths.get(Paths.java:76) [uberfire-nio2-api-0.7.5.Final-redhat-4.jar:0.7.5.Final-redhat-4]
	at org.uberfire.java.nio.file.Paths.get(Paths.java:60) [uberfire-nio2-api-0.7.5.Final-redhat-4.jar:0.7.5.Final-redhat-4]
	at org.guvnor.inbox.backend.server.security.InboxEntrySecurity.getInboxEntryRepository(InboxEntrySecurity.java:116) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.security.InboxEntrySecurity.canAccess(InboxEntrySecurity.java:77) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.security.InboxEntrySecurity.secure(InboxEntrySecurity.java:68) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.security.InboxEntrySecurity$Proxy$_$$_WeldClientProxy.secure(InboxEntrySecurity$Proxy$_$$_WeldClientProxy.java) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.InboxBackendImpl.readEntries(InboxBackendImpl.java:90) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.InboxBackendImpl.addToInbox(InboxBackendImpl.java:197) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.InboxBackendImpl.addToRecentOpened(InboxBackendImpl.java:183) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.InboxBackendImpl.recordOpeningEvent(InboxBackendImpl.java:146) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.InboxBackendImpl.recordOpeningEvent(InboxBackendImpl.java:120) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.guvnor.inbox.backend.server.InboxBackendImpl$Proxy$_$$_WeldClientProxy.recordOpeningEvent(InboxBackendImpl$Proxy$_$$_WeldClientProxy.java) [guvnor-inbox-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_79]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_79]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_79]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_79]
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:164) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:163) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:44) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:80) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.jboss.weld.event.EventImpl.fire(EventImpl.java:69) [weld-core-1.1.31.Final-redhat-1.jar:1.1.31.Final-redhat-1]
	at org.drools.workbench.screens.testscenario.backend.server.ScenarioTestEditorServiceImpl.constructContent(ScenarioTestEditorServiceImpl.java:205) [drools-wb-test-scenario-editor-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.drools.workbench.screens.testscenario.backend.server.ScenarioTestEditorServiceImpl.constructContent(ScenarioTestEditorServiceImpl.java:51) [drools-wb-test-scenario-editor-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.kie.workbench.common.services.backend.service.KieService.loadContent(KieService.java:92) [kie-wb-common-services-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.drools.workbench.screens.testscenario.backend.server.ScenarioTestEditorServiceImpl.loadContent(ScenarioTestEditorServiceImpl.java:183) [drools-wb-test-scenario-editor-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at org.drools.workbench.screens.testscenario.backend.server.ScenarioTestEditorServiceImpl$Proxy$_$$_WeldClientProxy.loadContent(ScenarioTestEditorServiceImpl$Proxy$_$$_WeldClientProxy.java) [drools-wb-test-scenario-editor-backend-6.3.0.Final-redhat-9.jar:6.3.0.Final-redhat-9]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_79]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_79]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_79]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_79]
	at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396) [errai-weld-integration-3.0.6.Final-redhat-1.jar:3.0.6.Final-redhat-1]
	at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:296) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142) [errai-bus-3.2.1.Final-redhat-2.jar:3.2.1.Final-redhat-2]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53) [uberfire-servlet-security-0.7.5.Final-redhat-4.jar:0.7.5.Final-redhat-4]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:45) [uberfire-servlet-security-0.7.5.Final-redhat-4.jar:0.7.5.Final-redhat-4]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]

This happens if there is an entry with dummy repository in user's inbox/recentViewed.

Version-Release number of selected component (if applicable):
6.2.2

How reproducible:


Steps to Reproduce:
1. In 6.2.0 business-central, clone attached repository (repository620.zip)
2. in Project Explorer, open project1 in cloned repository and open assets
   and confirm no error happens.

    testProcess  (Business Process)
    testGDT      (Guided Decision Table)
    testGRL      (Guided Rule)
    isAdultTest  (Test Scenario)
        
3. perform Build&Deploy and then start business process named 'testProcess'
   then confirm process status by Process Model via
   Process Management>Process Instances>Open a process instance>Options>Process Model

4. back to Project Explorer and see above 4 assets can be opened correctly
5. stop BPMS620, apply patch 6.2.2 and then restart it
6. login business central as a same user and open above assets again
    

Actual results:
unable to open process designer
error 'No such file...' is shown and these assets are no longer edited.


Expected results:
open and edit these asset without any problem


Additional info:
This issue is relevant to BZ#1317671.
If you login business central as the other user, you can manage these problematic assets without this issue.

Comment 3 Toni Rikkola 2016-04-13 07:19:26 UTC
Ok, managed to reproduce.

The example repository is not needed.

Steps are:
1. Create a repository "testrepository"
2. Add a project "testproject" and some asset "testdrlfile"
3. Delete "testrepository"
4. Go to authoring and try to open any asset.

Inbox code fails since it tries to load the deleted repository.

Working on a fix.

Comment 4 Toni Rikkola 2016-04-13 07:34:03 UTC
Works in latest master. Searching if there is a fix that can be cherry-picked.

Comment 8 Toni Rikkola 2016-04-13 12:27:25 UTC
Ok, I was wrong. This does affect master. Master just hid the error better, but when opening assets after a repository is deleted I get the same blue "No such file. Please check the file exists at the version selected." notification in asset screen.

Comment 11 Toni Rikkola 2016-04-14 14:04:37 UTC
And the fix is in 6.4.x:
https://github.com/droolsjbpm/guvnor/commit/c82bb76c1b1b8f395ae83a69f1b012cb6f701680

master PR still pending.

Comment 13 Toni Rikkola 2016-04-14 14:08:05 UTC
Wrong ticket, sorry.

Comment 17 jsoltes 2016-05-06 12:26:47 UTC
Created attachment 1154611 [details]
deleting repository exception

Comment 18 jsoltes 2016-05-06 12:37:18 UTC
I tried the steps in Comment 3 for both BPMS 6.2.2.GA and 6.2.3.CR1 and I am getting the following result. After deleting the repository, the following message appears: "Unable to complete your request. The following exception occurred: null." However, the repository is removed from the UI in business-central. After switching to Authoring perspective there is the same message again. (See the attachement). The testrepository and created asset stays there although it is not possible to open it until one changes to the default repository. Then it disappears.

Even though this is a different issue than originally described, I am still returning this to assigned as it could be possibly connected and also this issue makes it hard to verify that the original bug has been fixed.

Comment 19 Toni Rikkola 2016-05-11 12:38:00 UTC
Ok, managed to reproduce with 6.3.x branch. Fixing.

Comment 20 Toni Rikkola 2016-05-16 07:54:36 UTC
The remaining issue is not as severe as the original. The error is captured and reported on the client. The reporting is just poor "The following exception occurred: null." is not the most professional way to handle this situation, but it does not make the workbench unusable in anyway.

Comment 21 Toni Rikkola 2016-05-16 09:30:28 UTC
Investigated more. 
There are two problems:

#1 If you have a editor open for any asset that was in the deleted repository. The code that retrieves the version history adds an exception into the log. This is not visible in the UI.

#2 The "...exception occurred: null" is caused by the Project Explorer trying to retrieve something that does not exist. After deleting the repository, if you had it previously open in PE and go back to Authoring. You get this error popup and the PE still shows the deleted repository. Once you select any other repository everything is fine again.