-
Notifications
You must be signed in to change notification settings - Fork 494
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
Error when trying to create a new Dataset (NullPointerException) #10557
Comments
I have installed:
|
Yes, sure enough, getGlobalId must be null: @faborg thanks for the details about your installation. Is it a new installation? Did you upgrade from Dataverse 6.1? Which PID provider are you using (out of the box, DataCite is selected). |
We definitely haven't seen this in 6.2 yet. The only thing different in your setup is a later Payara - the Guides talk about 6.2023.8 and I've run 6.2023.11 without issue. Any details to help us reproduce this would be very welcome. |
It's a fresh install (locally in VMs) and I'm using a FAKE DOI Provider. |
Is your FAKE provider configured with the new multi-pid-provider JVM/micro-profile options or the original/legacy single-pid-provider database settings? |
How do we switch between multi and single? I encountered the same issue when trying to save dataset right after traditional installation following the guide? |
I think new installs by default should be using the settings described in https://guides.dataverse.org/en/latest/installation/config.html#dataverse-pid-type. If you can see those when you do a bin/asadmin list-jvm-options from your /usr/local/payara6 dir, you should be using the new multi-pid way. If you have http://localhost:8080/api/admin/settings/ :DoiProvider and related things set, you have the legacy settings. Those shouldn't be needed and should be ignored if you have the multi-pid setup in place (although they would be used if the multi-pid settings are invalid - do you see anything in the log about legacy settings when you start up?) I'm asking so I know how to try and reproduce your issue - the code for new and legacy settings are different so it's possible we have a problem with one and not the other. We could also have an issue in the build script for first time setups. |
2024/05/15 |
bin/asadmin list-jvm-options: Got this: {"status":"ERROR","message":"Setting :DoiProvider not found"} |
Before the log error you sent above there should be a line with "CommandException, when attempting to update the dataset: " with some message. Do you see that? Can you report what it says? |
Here is the log right after a restart. |
It also includes a try of saving a new dataset |
OK - some issue with finding the PidProvider which then leads to a null PID as in the first log you shared. Do you have -Ddataverse.pid.default-provider=fake set? If not, that is probably it and we can look for why that isn't getting set by the installer. If so, I'm not sure what is happening. Doing a bin/asadmin set-log-levels edu.harvard.iq.dataverse.pidproviders.PidProviderFactoryBean=FINE and restarting should add info the the log about whether the fake provider is getting created properly or not. |
I got these: |
OK - so you need to run |
Did it and now I can save new dataset. Thanks! |
-Ddataverse.pid.providers=fake |
Cool. I do see that we're missing that command from the non-docker install. Not sure how it got missed, but I'll make a PR to add it and add a check to make sure a missing default gets flagged. Thanks for reporting this! |
I thought the first line would be enough. Thanks for helping! |
In a multipid setup that first line would be a list of several providers, so rather than guessing which is the default (first one?), we have an explicit default setting. Probably could just assume when there's only one though. |
That explains it. Thanks for clarifying. |
This works for me, too. Thanks a lot! I'll close this Issue. |
I realize @faborg closed this issue (which is fine) and that @qqmyers has a pull request to fix it: I went ahead and reproduced this on Dataverse 6.2 on Rocky 8.9 by running the installer manually (thank you, @donsizemore for gdcc/dataverse-ansible#350 ). When you finish running the installer, you see something like this (I didn't bother to put in a proper hostname):
It's quite easy to reproduce the bug. Just try to create a dataset: On the backend, yes the error is Stacktrace[2024-05-16T16:14:40.577+0000] [Payara 6.2023.8] [WARNING] [AS-EJB-00056] [jakarta.enterprise.ejb.container] [tid: _ThreadID=90 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1715876080577] [levelValue: 900] [[ A system exception occurred during an invocation on EJB EjbDataverseEngineInner, method: public java.lang.Object edu.harvard.iq.dataverse.EjbDataverseEngineInner.submit(edu.harvard.iq.dataverse.engine.command.Command,edu.harvard.iq.dataverse.engine.command.CommandContext) throws edu.harvard.iq.dataverse.engine.command.exception.CommandException]][2024-05-16T16:14:40.579+0000] [Payara 6.2023.8] [WARNING] [] [jakarta.enterprise.ejb.container] [tid: _ThreadID=90 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1715876080579] [levelValue: 900] [[ jakarta.ejb.EJBException: Cannot invoke "edu.harvard.iq.dataverse.pidproviders.PidProvider.generatePid(edu.harvard.iq.dataverse.DvObject)" because "pidProvider" is null [2024-05-16T16:14:40.588+0000] [Payara 6.2023.8] [SEVERE] [] [edu.harvard.iq.dataverse.DatasetPage] [tid: _ThreadID=90 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1715876080588] [levelValue: 1000] [[ [2024-05-16T16:14:40.590+0000] [Payara 6.2023.8] [WARNING] [] [jakarta.enterprise.resource.webcontainer.faces.lifecycle] [tid: _ThreadID=90 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1715876080590] [levelValue: 900] [[ [2024-05-16T16:14:40.598+0000] [Payara 6.2023.8] [SEVERE] [] [jakarta.enterprise.resource.webcontainer.faces.context] [tid: _ThreadID=90 _ThreadName=http-thread-pool::jk-connector(1)] [timeMillis: 1715876080598] [levelValue: 1000] [[ Again the PR that we hope will fix this is this one: |
When I try to create a new Dataset, after clicking on "Save Dataset" the form is grayed out and no data is saved. Is this a bug? Help would be highly appreciated.
The payara-log contains the following exception:
The text was updated successfully, but these errors were encountered: