NullPointerException: date must not be null

41 views
Skip to first unread message

Jacek Chudzik

unread,
Aug 18, 2025, 8:17:57 AMAug 18
to Dataverse Users Community
Hello,

while publishing new dataset in payara log there was a null pointer exception regarding a date field.

Dataset was published and I can find it in the DOI provider site (Datacite) with - it seems - all dates in places.

Do you have any suggestions as to what might have gone wrong here? Or - as dataset was published - should I just ignore that and observe? 

---


[#|2025-08-18T11:42:43.504+0200|WARNING|Payara 6.2023.8|edu.harvard.iq.dataverse.pidproviders.doi.datacite.DataCiteDOIProvider|_ThreadID=214;_ThreadName=__ejb-thread-pool1;_TimeMillis=1755510163504;_LevelValue=900;|
  Identifier not created: create failed
java.lang.NullPointerException: date must not be null
at java.base/java.util.Objects.requireNonNull(Objects.java:235)
at java.base/java.util.Calendar.setTime(Calendar.java:1792)
at java.base/java.text.SimpleDateFormat.format(SimpleDateFormat.java:978)
at java.base/java.text.SimpleDateFormat.format(SimpleDateFormat.java:971)
at java.base/java.text.DateFormat.format(DateFormat.java:378)
at edu.harvard.iq.dataverse.pidproviders.doi.XmlMetadataTemplate.writeDates(XmlMetadataTemplate.java:749)
at edu.harvard.iq.dataverse.pidproviders.doi.XmlMetadataTemplate.generateXML(XmlMetadataTemplate.java:128)
at edu.harvard.iq.dataverse.pidproviders.doi.XmlMetadataTemplate.generateXML(XmlMetadataTemplate.java:84)
at edu.harvard.iq.dataverse.pidproviders.doi.datacite.DOIDataCiteRegisterService.getMetadataFromDvObject(DOIDataCiteRegisterService.java:169)
at edu.harvard.iq.dataverse.pidproviders.doi.datacite.DOIDataCiteRegisterService.reserveIdentifier(DOIDataCiteRegisterService.java:62)
at edu.harvard.iq.dataverse.pidproviders.doi.datacite.DataCiteDOIProvider.createIdentifier(DataCiteDOIProvider.java:93)
at edu.harvard.iq.dataverse.engine.command.impl.AbstractDatasetCommand.registerExternalIdentifier(AbstractDatasetCommand.java:185)
at edu.harvard.iq.dataverse.engine.command.impl.FinalizeDatasetPublicationCommand.execute(FinalizeDatasetPublicationCommand.java:105)
at edu.harvard.iq.dataverse.engine.command.impl.FinalizeDatasetPublicationCommand.execute(FinalizeDatasetPublicationCommand.java:51)
at edu.harvard.iq.dataverse.EjbDataverseEngineInner.submit(EjbDataverseEngineInner.java:36)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:588)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:408)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4835)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:653)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:834)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:603)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at jdk.internal.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:603)
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:72)
at org.jboss.weld.module.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at jdk.internal.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:375)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4807)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4795)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:90)
at jdk.proxy75/jdk.proxy75.$Proxy347.submit(Unknown Source)
at edu.harvard.iq.dataverse.__EJB31_Generated__EjbDataverseEngineInner__Intf____Bean__.submit(Unknown Source)
at edu.harvard.iq.dataverse.EjbDataverseEngine.submit(EjbDataverseEngine.java:283)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:588)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:408)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4835)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:653)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:834)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:603)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at jdk.internal.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:603)
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:72)
at org.jboss.weld.module.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at jdk.internal.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:375)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4807)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4795)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:90)
at jdk.proxy75/jdk.proxy75.$Proxy384.submit(Unknown Source)
at edu.harvard.iq.dataverse.__EJB31_Generated__EjbDataverseEngine__Intf____Bean__.submit(Unknown Source)
at edu.harvard.iq.dataverse.DatasetServiceBean.callFinalizePublishCommandAsynchronously(DatasetServiceBean.java:964)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:588)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:408)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4835)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:653)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:834)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:603)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at jdk.internal.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:603)
at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
at org.jboss.weld.module.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at jdk.internal.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:888)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:833)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:375)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4807)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4795)
at com.sun.ejb.containers.EjbAsyncTask.call(EjbAsyncTask.java:101)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
|#]

[#|2025-08-18T11:42:43.506+0200|INFO|Payara 6.2023.8|edu.harvard.iq.dataverse.engine.command.impl.AbstractDatasetCommand|_ThreadID=214;_ThreadName=__ejb-thread-pool1;_TimeMillis=1755510163506;_LevelValue=800;|
  Call to globalIdServiceBean.createIdentifier failed: java.lang.NullPointerException: date must not be null|#]

James Myers

unread,
Aug 18, 2025, 8:52:40 AMAug 18
to dataverse...@googlegroups.com

I can’t match the log’s line number to the current code, so I don’t know which specific field is the problem. Overall, my guess would be that one of the date ranges only has a start or end date, but not both and the code may be failing due to that. Since this is occurring during the code to generate the metadata for DataCite, I’d guess that the overall update for DataCite is failing. If all of the metadata was entered when creating the dataset, it’s possible that you won’t notice any difference in Fabrica (is the DOI now findable?). In any case, I think it’s worth finding and addressing rather than just letting it go.

 

-- Jim

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dataverse-community/d4092b82-5943-4cae-aee4-aa3418cf2707n%40googlegroups.com.

Jacek Chudzik

unread,
Aug 19, 2025, 6:48:17 AMAug 19
to Dataverse Users Community
Sorry, I didn't mention that this is on Dataverse 6.4.

In Datacite Fabrica everything seems ok. In DataCite JSON I can see dates like:
"dates": [ { "date": "2025-08-05", "dateType": "Submitted" }, { "date": "2025-08-18", "dateType": "Available" }, { "date": "2025-08-18", "dateType": "Updated" }, { "date": "2025", "dateType": "Issued" } ],
and also:
"publicationYear": 2025.

Yes, the doi is findable ( "state": "findable").

I do not see the issue with the dates in dataset itself like missing start or end date. 

The error is from the instance that publishes not too often, so I just ask curators to let me know on next publishing.

Maybe I should search in db for date fields with null?

Regards,
Jacek

James Myers

unread,
Aug 19, 2025, 10:07:21 AMAug 19
to dataverse...@googlegroups.com

With the version number, I can see that the problem is here: https://github.com/IQSS/dataverse/blob/906f874f9fd56241c41e6c2c2f6989c4406f5909/src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/XmlMetadataTemplate.java#L748-L754 and involves the release date. A bug and fix for v6.5 are described in this issue (which also had a DataCite config issue) and this PR. TLDR: Some publication failures caused a draft dataset to have a 1.0 version in the database even though publication failed and, once that happened, the codeblock I showed above was incorrectly assuming that the draft version had a release date causing the null pointer.

 

This shouldn’t happen for a normal dataset where no publication failure has ever occurred and shouldn’t happen when publishing versions after 1.0. I would have thought that DataCite would not have the latest metadata due to this bug, but, given that the DataCite entry looks OK, I guess it is something you can just watch for in other datasets. The problem should go away as of v6.5.

 

--Jim

Jacek Chudzik

unread,
Aug 20, 2025, 3:36:28 PMAug 20
to Dataverse Users Community
Thank you, Jim. I think that in a month we will switch to v6.5 or 6.6.

Regards,
Jacek
Reply all
Reply to author
Forward
0 new messages