Bug 1007894 - Not much friendly maven error message appears when there is some problem with project (e.g. with dependencies)
Summary: Not much friendly maven error message appears when there is some problem with...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER1
: 6.0.1
Assignee: Roger Martínez
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On:
Blocks: bpms6_ux, brms6_ux
TreeView+ depends on / blocked
 
Reported: 2013-09-13 14:06 UTC by Radovan Synek
Modified: 2015-12-10 10:55 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Summary: A simple error with a Project (for example, missing dependencies) can cause an unfriendly Maven error message being provided to the user, with no details of the actual error. Cause: 1.- Depedency fields were not mandatory 2.- Adding a non existing depedency manually produced a ugly exception to the client. Consequence: Poor feedback to the client. Fix: 1.- Depedency fields are now mandatory 2.- Adding a non existing dependecy produces a friendly error in the user console, no exception is thrown to the client. Result: Improved feedback to the user about the error.
Clone Of:
Environment:
Last Closed: 2014-08-06 19:57:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
screen shot (37.97 KB, image/png)
2013-09-17 07:52 UTC, Radovan Synek
no flags Details
fix performed: example of friendly error in the user console (12.35 KB, image/png)
2013-10-16 10:17 UTC, Roger Martínez
no flags Details
second screen shot (64.93 KB, image/png)
2013-12-04 15:47 UTC, Radovan Synek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1042789 0 high CLOSED Inform a user that a kjar cannot be uploaded due to missing dependencies instead of throwing IllegalArgumentException: n... 2021-02-22 00:41:40 UTC

Internal Links: 1042789

Description Radovan Synek 2013-09-13 14:06:57 UTC
Description of problem:
Look at the screen shot. This error message provides no help to user without knowledge what is maven, pom.xml and how it works. It says what's wrong in pom.xml - which is some file the user shouldn't have to know it's connected with this screen. And it's very easy to get this error, see the following steps.

steps to reproduce:
1. open any project
2. navigate to Project Screen -> dependencies
3. add dependency (custom one, not from repository)
4. fill in only artifactId
5. save, build & deploy

version:
BRMS-6.0.0.ER2

Comment 1 Edson Tirelli 2013-09-16 20:39:25 UTC
Radovan, I think it is missing the screenshot attachment?

Comment 2 Prakash Aradhya 2013-09-17 02:19:16 UTC
Internal Whiteboard: Beta Blocker → Blocker
Not critical for Beta, but need to address for GA

Comment 3 Radovan Synek 2013-09-17 07:52:08 UTC
Created attachment 798655 [details]
screen shot

Sorry Edson, I forgot to attach it.

Comment 11 Roger Martínez 2013-10-15 18:59:57 UTC
Fixed. Basically two changes are performed:

1.- Depedency fields (groupId artifactId, versionID) are now mandatory.
2.- Adding a non existing dependecy produces a friendly error in the user console, no exception is thrown to the client.

Commits to master
-----------------
- https://github.com/droolsjbpm/kie-wb-common/commit/386ac3f8354b0f406446d8288a103b9d1e71c8c9
- https://github.com/droolsjbpm/drools/commit/4749ccec30e6245b69cff3b1090235b52ef2b01c

Commits to 6.0.x
-----------------
- https://github.com/droolsjbpm/kie-wb-common/commit/978312dfd4f106a252abc6c492d03f3851ce8169

- https://github.com/droolsjbpm/drools/commit/65a561a009db9366f15db34d60bbe2c070d68ac7

Comment 12 Roger Martínez 2013-10-16 10:17:22 UTC
Created attachment 812857 [details]
fix performed: example of friendly error in the user console

Comment 13 Radovan Synek 2013-12-04 15:46:33 UTC
I am afraid that what I got by simply following the steps to reproduce from the description of this issue does not look like the user friendly error message in Problems panel, but more like the same error screen as originally reported. A new screen shot attached.

Comment 14 Radovan Synek 2013-12-04 15:47:22 UTC
Created attachment 832715 [details]
second screen shot

Comment 15 Pedro Zapata 2013-12-05 16:08:51 UTC
No error can be created for any possible unexpected condition. The only way to reduce this is make sure the UI validates most of the possible outcomes, but the latest resort will always print the underlying exception, since it's the only available piece of information.

Comment 16 Roger Martínez 2013-12-09 23:41:35 UTC
@Radovan: Agree, it's still happening :S

@Pedro: Agree, the UI was improved and fields cannot be empty. But you can add a GAV into the project pointing to an artifact that does not exist. Then, the UI will pass validations (as the fields are not empty), but when the server side compiles the project then it throws an exception to the client. This exception cannot be more friendly as it's important to show to the user the root cause, but it should not appear as an error popup screen, it should appear in Problems section.

Comment 17 Edson Tirelli 2013-12-12 15:56:43 UTC
Further work on this ticket, if any, is postponed to 6.0.1.

Comment 18 Roger Martínez 2014-01-10 22:25:44 UTC
Fixed in master branch only, as this issue does not have the bloquer+ flag.

The fix is based on catching maven build exceptions and build an instance of BuildMessages on the fly with the exception details information. Then, the exception is not shown in a popup, it's displayed in problems widget.

Commit in master -> https://github.com/droolsjbpm/guvnor/commit/8fd816e118ba64d0b9f268f34ae69f61895b5df0

Comment 20 Radovan Synek 2014-01-15 08:58:53 UTC
Please notice that the doc text provided applies to 6.0.1, as this issue is not fixed for 6.0.0 and therefore it's known issue for 6.0.0, not bug fix. Removing Fix and Result from 6.0.0 release notes should be sufficient.

Comment 22 Radovan Synek 2014-02-21 11:35:47 UTC
Verified with BRMS-6.0.1.ER1

Comment 23 Radovan Synek 2014-03-18 14:29:54 UTC
qe_test_coverage:UX problem.


Note You need to log in before you can comment on or make changes to this bug.