Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root dataverse not shown when deploying on Payara 5 #6216

Closed
poikilotherm opened this issue Sep 25, 2019 · 2 comments
Closed

Root dataverse not shown when deploying on Payara 5 #6216

poikilotherm opened this issue Sep 25, 2019 · 2 comments
Assignees
Labels
Type: Bug a defect

Comments

@poikilotherm
Copy link
Contributor

poikilotherm commented Sep 25, 2019

This issue has been triaged a while ago: see #5907, #5933 and #4172

In the following, it doesn't matter if you are logged in or not - these problems occur way before the authz in DataversePage.init() can happen.

When deploying develop (6bebe7f) to Payara 5, the following screen is shown:

grafik

After switching http://github.com/poikilotherm/dataverse/blob/develop/src/main/webapp/dataverse_header.xhtml#L313 to <h:messages id="messages"/>, you'll see this error message:

grafik

As f:viewActions are not executed when validation fails, DataversePage.init() will not be executed. Thus you have an empty Dataverse object in DataversePage, which results in all kind of funny side effects (because if no dataverse was present, it would have been set to null by init()), including the "New Dataverse" title, etc (see result in the first picture).

This has been verified by removing all code from DatasetPage.init() and inserting a throw new RuntimeException - nothing happens. See also here and here

Next question: why is alias failing validation?
Answer: because setting the alias name in the empty new Dataverse() object at DataversePage causes validation constraints to fail: Dataverse.java

@poikilotherm poikilotherm self-assigned this Sep 25, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 25, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 25, 2019
When using alias and id via the Dataverse model class, on modern
versions of application servers, Bean validation does not allow
to use "null" as value on @nonblank model attributes.

Fixes IQSS#6216.
@poikilotherm
Copy link
Contributor Author

poikilotherm commented Sep 25, 2019

This has been attacked due to short notice availability of a pair programming partner here with knowledge about JSF. This was an evaluation to estimate options how to continue. Mentioning @djbrooke.

@scolapasta
Copy link
Contributor

I'm going to ahead and close this issue as we've resolved it for #6230. (using the ideas that were suggested here, thanks @poikilotherm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug a defect
Projects
None yet
Development

No branches or pull requests

2 participants