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

Multi-file downloads not working in the UI in 6.1 with "CC BY 4.0", possibly other licenses #10251

Closed
lmaylein opened this issue Jan 22, 2024 · 42 comments · Fixed by #10264
Closed
Labels
Type: Bug a defect
Milestone

Comments

@lmaylein
Copy link
Contributor

After upgrading from Dataverse 5.14 to 6.1 (via 6.0), the zip download (standalone zipper) is no longer available in our dataverse installation https://heidata.uni-heidelberg.de. What could have gone wrong during the upgrade?
I have set http://localhost:8080/api/admin/settings/:CustomZipDownloadServiceUrl again. But this did not help.

BTW: There are a lot of such messages in our server.log:

[2024-01-22T13:23:35.522+0100] [Payara 6.2023.8] [INFO] [] [edu.harvard.iq.dataverse.search.SearchIncludeFragment] [tid: _ThreadID=101 _ThreadName=http-thread-pool::jk-connector
(1)] [timeMillis: 1705926215522] [levelValue: 800] [[ Search Syntax Error: Error from server at http://localhost:8983/solr/collection1: Query contains too many nested clauses; maxClauseCount is set to 1024]]

And then I find these messages in the server.log. However, they are not related in terms of time.

[2024-01-22T13:35:57.060+0100] [Payara 6.2023.8] [SEVERE] [] [jakarta.enterprise.resource.webcontainer.faces.context] [tid: _ThreadID=103 ThreadName=http-thread-pool::jk-connector(3)] [timeMillis: 1705926957060] [levelValue: 1000] [[
jakarta.ejb.EJBException: Cannot invoke "String.equals(Object)" because "downloadType" is null
jakarta.ejb.EJBException: Cannot invoke "String.equals(Object)" because "downloadType" is null
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:723)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:652)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:482)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4601)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2134)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2104)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:90)
at jdk.proxy73/jdk.proxy73.$Proxy411.writeGuestbookAndStartBatchDownload(Unknown Source)
at edu.harvard.iq.dataverse.EJB31_Generated__FileDownloadServiceBean__Intf____Bean.writeGuestbookAndStartBatchDownload(Unknown Source)
at edu.harvard.iq.dataverse.FileDownloadHelper.writeGuestbookAndStartDownload(FileDownloadHelper.java:88)
at edu.harvard.iq.dataverse.FileDownloadHelper$Proxy$
$$_WeldClientProxy.writeGuestbookAndStartDownload(Unknown Source)
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:568)
at jakarta.el.ELUtil.invokeMethod(ELUtil.java:227)
at jakarta.el.BeanELResolver.invoke(BeanELResolver.java:481)
at jakarta.el.CompositeELResolver.invoke(CompositeELResolver.java:198)
at org.glassfish.expressly.parser.AstValue.invoke(AstValue.java:245)
at org.glassfish.expressly.MethodExpressionImpl.invoke(MethodExpressionImpl.java:248)
at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:70)
at jakarta.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:111)
at jakarta.faces.event.ActionEvent.processListener(ActionEvent.java:72)
at jakarta.faces.component.UIComponentBase.broadcast(UIComponentBase.java:481)
at jakarta.faces.component.UICommand.broadcast(UICommand.java:197)
at jakarta.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:858)
at jakarta.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1332)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:56)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:72)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:159)
at jakarta.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:691)
at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:449)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:331)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:372)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "downloadType" is null
at edu.harvard.iq.dataverse.FileDownloadServiceBean.redirectToDownloadAPI(FileDownloadServiceBean.java:319)
at edu.harvard.iq.dataverse.FileDownloadServiceBean.writeGuestbookAndStartBatchDownload(FileDownloadServiceBean.java:128)
at edu.harvard.iq.dataverse.FileDownloadServiceBean.writeGuestbookAndStartBatchDownload(FileDownloadServiceBean.java:97)
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:568)
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.GeneratedMethodAccessor229.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
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.GeneratedMethodAccessor209.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
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)
... 63 more
]]

@lmaylein lmaylein added the Type: Bug a defect label Jan 22, 2024
@lmaylein lmaylein changed the title No zipdlownload after upgrade from 5.14 to 6.1 No zipdownload after upgrade from 5.14 to 6.1 Jan 22, 2024
@donsizemore
Copy link
Contributor

@lmaylein just to double-check, does your Solr jetty.xml increase requestHeaderSize from 8192 to 102400?

@lmaylein
Copy link
Contributor Author

@donsizemore:
Yes:

grep requestHeaderSize /usr/local/solr/solr-9.3.0/server/etc/jetty.xml 
    <Set name="requestHeaderSize"><Property name="solr.jetty.request.header.size" default="102400" /></Set>

@landreev
Copy link
Contributor

... However, they are not related in terms of time.

As in, not related to the other, solr error message?
But does it look like that second exception stack trace ("downloadType" is null, etc.) is related to an attempt to run the zipper?

@lmaylein
Copy link
Contributor Author

But does it look like that second exception stack trace ("downloadType" is null, etc.) is related to an attempt to run the zipper?

At least it doesn't always appear when I try to download several files at the same time.

@lmaylein
Copy link
Contributor Author

I have just found another dataset where the download worked. Maybe the problem is related to this error message:

[2024-01-22T14:51:44.048+0100] [Payara 6.2023.8] [INFO] [] [edu.harvard.iq.dataverse.DatasetVersion] [tid: _ThreadID=105 _ThreadName=http-thread-pool::jk-connector(5)] [timeMillis: 1705931504048] [levelValue: 800] [[
  Terms of Use and Access are invalid. You must enable request access or add terms of access in datasets with restricted files.]]

Examples:

@qqmyers
Copy link
Member

qqmyers commented Jan 22, 2024

FWIW: The bug in the stacktrace above is that some download path has a null downloadType and

if (downloadType.equals("GlobusTransfer")) {
assumes it is non-null. I added that with the Globus PR. It would be easy to make that null-safe. I'm not sure how that relates to intermittent external zipper problems though.

@lmaylein
Copy link
Contributor Author

lmaylein commented Jan 22, 2024

At least the download seems to work for all datasets with "Custom Dataset Terms" and a value at "Terms of Use".

@landreev
Copy link
Contributor

Very interesting. Also, it sounds like it may not be related to the zipper specifically(?).

@landreev
Copy link
Contributor

Is there anything in the server.log immediately after an attempt to download multiple files in datasets where it isn't working?
(I am assuming that there's a possibility that the null downloadType issue is not related)

@lmaylein
Copy link
Contributor Author

lmaylein commented Jan 22, 2024

Very interesting. Also, it sounds like it may not be related to the zipper specifically(?).

At least we have not found any other errors so far.

@lmaylein
Copy link
Contributor Author

Is there anything in the server.log immediately after an attempt to download multiple files in datasets where it isn't working?
(I am assuming that there's a possibility that the null downloadType issue is not related)

Immediately after the download attempt, I cannot find any message at all in the server.log. Nothing that has any relation to the time of the download attempt.
In this case, there is also no record of a /cgi-bin/zipdownload request in the log of the Apache httpd server.

@lmaylein
Copy link
Contributor Author

When clicking on "Download" the browser initiates three requests:

POST https://heidata.uni-heidelberg.de/dataset.xhtml?persistentId=doi:10.11588/data/DDJFGS (Status 200)
POST data:

jakarta.faces.partial.ajax=true
jakarta.faces.source=datasetForm:tabView:filesTable:j_idt1390
jakarta.faces.partial.execute=@all
jakarta.faces.partial.render=datasetForm
datasetForm:tabView:filesTable:j_idt1390=datasetForm:tabView:filesTable:j_idt1390
datasetForm=datasetForm
datasetForm:validateFilesOutcome=Pass
datasetForm:validTermsofAccess=true
datasetForm:datasetLockedForAnyReasonVariable=false
datasetForm:datasetStateChangedVariable=false
datasetForm:tabView:filesTable:searchFiles
datasetForm:tabView:filesTable_selection=file://18baae390c0-603cabd57fa4,file://18baae39067-fa3e0f20dd3f,file://18baae39903-600ad24a616c,file://18baae39004-7df58b0544e9
datasetForm:tabView_activeIndex=0
datasetForm:termsofAccessHidden
datasetForm:fileAccessRequestHidden=false
datasetForm:termsAccessInput
sharrre-total=0
datasetForm:fileTagsMenuDS_focus
datasetForm:fileTagAddNewDS
datasetForm:options=1
jakarta.faces.ViewState=-8410702679795902794:6625731034056921443

GET https://heidata.uni-heidelberg.de/jakarta.faces.resource/faces.js.xhtml?ln=jakarta.faces (Status 200)

POST https://heidata.uni-heidelberg.de/dataset.xhtml?persistentId=doi:10.11588/data/DDJFGS (Status 200)
POST data:

jakarta.faces.partial.ajax=true
jakarta.faces.source=datasetForm:tabView:j_idt1961
jakarta.faces.partial.execute=datasetForm:tabView:j_idt1961
jakarta.faces.partial.render=datasetForm:tabView:versionsTable
datasetForm:tabView:j_idt1961=datasetForm:tabView:j_idt1961
datasetForm=datasetForm
datasetForm:validateFilesOutcome=Pass
datasetForm:validTermsofAccess=true
datasetForm:datasetLockedForAnyReasonVariable=false
datasetForm:datasetStateChangedVariable=false
datasetForm:tabView:filesTable:searchFiles
datasetForm:tabView:filesTable_selection=file://18baae390c0-603cabd57fa4,file://18baae39067-fa3e0f20dd3f,file://18baae39903-600ad24a616c,file://18baae39004-7df58b0544e9
datasetForm:tabView_activeIndex=0
datasetForm:termsofAccessHidden
datasetForm:fileAccessRequestHidden=false
datasetForm:termsAccessInput
sharrre-total=0
datasetForm:fileTagsMenuDS_focus
datasetForm:fileTagAddNewDS
datasetForm:options=1
jakarta.faces.ViewState=-8410702679795902794:6625731034056921443

If I do the same with a dataset where the download works (Custom Dataset Terms), I get the same three requests, but then the modal window appears with the dataset terms, which is not the case with the other datasets.

@landreev
Copy link
Contributor

Thank you.
I'm guessing the answer is "no", but could you please confirm whether an entry is created in the database table customzipservicerequest when an unsuccessful attempt to download multiple files is made?

@landreev
Copy link
Contributor

landreev commented Jan 22, 2024

When it comes to multi-file downloads working in some datasets vs. not working in others - is it just a matter of "working when the terms-of-use popup is required; not working otherwise"?

@lmaylein
Copy link
Contributor Author

I'm guessing the answer is "no", but could you please confirm whether an entry is created in the database table customzipservicerequest when an unsuccessful attempt to download multiple files is made?

Correct. No entry was created the database table.

@lmaylein
Copy link
Contributor Author

When it comes to multi-file downloads working in some datasets vs. not working in others - is it just a matter of "working when the terms-of-use popup is required; not working otherwise"?

It seems so. But I'm not sure whether a popup shouldn't also appear in the other cases (e.g. https://doi.org/10.11588/data/DDJFGS).

I have also checked the browser console to see if a JavaScript error is being logged there. But this is not the case.

@lmaylein
Copy link
Contributor Author

These messages apparently also appeared in our payara5 (dataverse 5.14) server.log:

_[2024-01-18T09:51:28.343+0100] [Payara 5.2022.3] [INFO] [] [edu.harvard.iq.dataverse.DatasetVersion] [tid: _ThreadID=105 ThreadName=http-thread-pool::jk-
connector(2)] [timeMillis: 1705567888343] [levelValue: 800] [[
Terms of Use and Access are invalid. You must enable request access or add terms of access in datasets with restricted files.]]

@lmaylein
Copy link
Contributor Author

Funnily enough, after pressing the download button (where nothing happens in the user interface), the image for the license button is loaded (which would presumably be displayed in the popup):

GET https://licensebuttons.net/l/by/4.0/88x31.png

@lmaylein
Copy link
Contributor Author

lmaylein commented Jan 23, 2024

... and after pressing the download button, the the relevant

<div id="datasetForm:guestbookAndTermsPopup">

seems to be filled with the correct content (e.g. buttons) but it is still hidden. If I force my browser to show this dialog, the "Accept" button works and the data is downloaded.

@lmaylein
Copy link
Contributor Author

Since this message from the server log refers to the guestbook-terms-popup, it probably does have something to do with the problem:

[2024-01-23T12:59:10.907+0100] [Payara 6.2023.8] [WARNING] [] [jakarta.enterprise.resource.webcontainer.faces.lifecycle] [tid: _ThreadID=102 _ThreadName=http-thread-pool::jk-connector(2)] [timeMillis: 1706011150907] [levelValue: 900] [[
  /guestbook-terms-popup-fragment.xhtml @279,59 actionListener="#{fileDownloadHelper.writeGuestbookAndStartDownload(guestbookResponse, false)}": jakarta.ejb.EJBException: Cannot invoke "String.equals(Object)" because "downloadType" is null
jakarta.el.ELException: /guestbook-terms-popup-fragment.xhtml @279,59 actionListener="#{fileDownloadHelper.writeGuestbookAndStartDownload(guestbookResponse, false)}": jakarta.ejb.EJBException: Cannot invoke "String.equals(Object)" because "downloadType" is null
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:76)
	at jakarta.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:111)
	at jakarta.faces.event.ActionEvent.processListener(ActionEvent.java:72)
	at jakarta.faces.component.UIComponentBase.broadcast(UIComponentBase.java:481)
	at jakarta.faces.component.UICommand.broadcast(UICommand.java:197)
	at jakarta.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:858)
	at jakarta.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1332)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:56)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:72)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:159)
	at jakarta.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:691)
	at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:449)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:331)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
	at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:83)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
	at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:253)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:211)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:166)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:372)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:239)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
	at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: jakarta.ejb.EJBException: Cannot invoke "String.equals(Object)" because "downloadType" is null
	at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:723)
	at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:652)
	at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:482)
	at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4601)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2134)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2104)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:90)
	at jdk.proxy73/jdk.proxy73.$Proxy411.writeGuestbookAndStartBatchDownload(Unknown Source)
	at edu.harvard.iq.dataverse.__EJB31_Generated__FileDownloadServiceBean__Intf____Bean__.writeGuestbookAndStartBatchDownload(Unknown Source)
	at edu.harvard.iq.dataverse.FileDownloadHelper.writeGuestbookAndStartDownload(FileDownloadHelper.java:88)
	at edu.harvard.iq.dataverse.FileDownloadHelper$Proxy$_$$_WeldClientProxy.writeGuestbookAndStartDownload(Unknown Source)
	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:568)
	at jakarta.el.ELUtil.invokeMethod(ELUtil.java:227)
	at jakarta.el.BeanELResolver.invoke(BeanELResolver.java:481)
	at jakarta.el.CompositeELResolver.invoke(CompositeELResolver.java:198)
	at org.glassfish.expressly.parser.AstValue.invoke(AstValue.java:245)
	at org.glassfish.expressly.MethodExpressionImpl.invoke(MethodExpressionImpl.java:248)
	at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
	at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:70)
	... 46 more
Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "downloadType" is null
	at edu.harvard.iq.dataverse.FileDownloadServiceBean.redirectToDownloadAPI(FileDownloadServiceBean.java:319)
	at edu.harvard.iq.dataverse.FileDownloadServiceBean.writeGuestbookAndStartBatchDownload(FileDownloadServiceBean.java:128)
	at edu.harvard.iq.dataverse.FileDownloadServiceBean.writeGuestbookAndStartBatchDownload(FileDownloadServiceBean.java:97)
	at jdk.internal.reflect.GeneratedMethodAccessor1693.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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.GeneratedMethodAccessor229.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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.GeneratedMethodAccessor209.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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)
	... 63 more
]]

@lmaylein
Copy link
Contributor Author

At least we have not found any other errors so far.

I withdraw this statement see #10253

@landreev
Copy link
Contributor

Thank you for all the details.
And thank you for the report, this is potentially serious.

@landreev
Copy link
Contributor

Also, it sounds like it may not be related to the zipper specifically(?).

What I really meant was, I was wondering if this was not a zipper problem per se, but a general multi-file download problem. I.e., if the problem(s) you were seeing would be there regardless of whether the external zipper was configured or not.
Could you please try that? - delete the :CustomZipDownloadServiceUrl setting temporarily (note that you don't need to restart Payara for this to take effect), then refresh/reload https://heidata.uni-heidelberg.de/dataset.xhtml?persistentId=doi:10.11588/data/UUMEDI, then try a multi-file download again?

@landreev
Copy link
Contributor

For the record, I haven't been able to reproduce this on my own dev. instance, so far. But I'm going to try with a cloned copy of our prod. instance. (Our real prod. instance hasn't been upgraded to 6.1 yet)

@lmaylein
Copy link
Contributor Author

curl -X DELETE http://localhost:8080/api/admin/settings/:CustomZipDownloadServiceUrl
{"status":"OK","data":{"message":"Setting :CustomZipDownloadServiceUrl deleted."}}

Reload of https://heidata.uni-heidelberg.de/dataset.xhtml?persistentId=doi:10.11588/data/UUMEDI

=> same problem

@landreev
Copy link
Contributor

seems to be filled with the correct content (e.g. buttons) but it is still hidden. If I force my browser to show this dialog, the "Accept" button works and the data is downloaded.

Which dataset was this btw, DDJFGS, UUMEDI ... ?

@lmaylein
Copy link
Contributor Author

seems to be filled with the correct content (e.g. buttons) but it is still hidden. If I force my browser to show this dialog, the "Accept" button works and the data is downloaded.

Which dataset was this btw, DDJFGS, UUMEDI ... ?

https://doi.org/10.11588/data/DDJFGS (for example)

@landreev
Copy link
Contributor

... => same problem

And I just tried the "working dataset" - RAS7U7, downloaded a 2 file zip, and it was clearly produce internally, without the zipper.

@landreev
Copy link
Contributor

But I'm not sure whether a popup shouldn't also appear in the other cases (e.g. https://doi.org/10.11588/data/DDJFGS).

When I download individual, single files from this datasets, I don't get any terms of use popups either, and the downloads are working. Are there actually terms of use and/or custom guestbook enabled in that dataset that I'm supposed to be seeing?

@lmaylein
Copy link
Contributor Author

No, there are no guestbooks enabled and this is how the terms edit form looks like (this is the default in our datasets):
terms

In this case, should the download start without a popup (with the license information)?

@qqmyers
Copy link
Member

qqmyers commented Jan 23, 2024

If you're able to try with a fix re: #10251 (comment) i.e. just switching to check "GlobusTransfer".equals(downloadType) instead, we could see if that is the only issue. If it isn't, there could be some logic problem in deciding when to render the dialogs - there were significant changes there with the guestbook-at-request functionality.

@lmaylein
Copy link
Contributor Author

If you're able to try with a fix re: #10251 (comment) i.e. just switching to check "GlobusTransfer".equals(downloadType) instead, we could see if that is the only issue. If it isn't, there could be some logic problem in deciding when to render the dialogs - there were significant changes there with the guestbook-at-request functionality.

Unfortunately, I did not understand how I could check this. Is downloadType related to an attribute in the database so I could set it to a defined value?

@qqmyers
Copy link
Member

qqmyers commented Jan 23, 2024

Sorry - this would be a code change. If you're not set up to build/test a new war file, we can try it when we have a reproducible test case (not sure if we already do or not as I've been skimming the comments).

@landreev
Copy link
Contributor

Yes, I just figured out how to reproduce this - and it's ridiculously easy!
All it takes is the "CC BY 4.0" license, instead of the default "CC 1.0". ☹️
Note that once you change the license to "CC BY 4.0" and publish the dataset, multi-file downloads stop working even for the owner, even a superuser.

Changing it back to "CC 1.0" fixes it just as instantly.
This Heidelberg dataset where multi-file downloads are working has custom terms: https://heidata.uni-heidelberg.de/dataset.xhtml?persistentId=doi:10.11588/data/RAS7U7

I'll try to get more developers to look into this tomorrow.

@landreev
Copy link
Contributor

landreev commented Jan 24, 2024

Also, confirming that yes, with the "CC BY 4.0" license selected, in v6.0 the terms popup IS shown to the user on all downloads, single or multi-file. [edit: this was on my own dev. instance, with the instance-wide default still being "CC 1.0". the Heildelberg instance is using "CC BY 4.0" as the default, so their popup behavior would be different]

@landreev landreev changed the title No zipdownload after upgrade from 5.14 to 6.1 Multi-file downloads not working in the UI in 6.1 with "CC BY 4.0", possibly other licenses Jan 24, 2024
qqmyers added a commit to GlobalDataverseCommunityConsortium/dataverse that referenced this issue Jan 24, 2024
qqmyers added a commit to GlobalDataverseCommunityConsortium/dataverse that referenced this issue Jan 24, 2024
@lmaylein
Copy link
Contributor Author

Will there be a new release including this patch? Or maybe you can build a new war in advance, which I can then test with our installation? The lack of download options is a major problem for our users.

@landreev
Copy link
Contributor

Will there be a new release including this patch? Or maybe you can build a new war in advance, which I can then test with our installation? The lack of download options is a major problem for our users.

This (whether to release 6.1.1 with these fixes) is being discussed, and the decision is going to be made shortly. But we will definitely offer a patch as soon as we can, whether as a 6.1.1, or simply an updated .war file incorporating both this, and the fixes for the thumbnails issues (#10220).

@landreev
Copy link
Contributor

... and yes, thank you for offering to deploy and test a patched war file, I'll let you know as soon as it's ready.

qqmyers added a commit to GlobalDataverseCommunityConsortium/dataverse that referenced this issue Jan 25, 2024
@landreev
Copy link
Contributor

A patched war file with the fixes for this, and the issues with thumbnails (#10220) is available at https://github.com/donsizemore/dataverse_backports/releases/tag/6.1_20240126 (thank you, @donsizemore!). The bug fixes have already gone through our normal testing/QA process. We are still offering it as a prototype at this point, so, if you choose to deploy it, please test it carefully and let us know asap if you encounter any problems.
We appreciate your patience, and your help with this effort.

@lmaylein
Copy link
Contributor Author

Deployed on https://heidata.uni-heidelberg.de
The first tests look good.

@lmaylein
Copy link
Contributor Author

... both fixed bugs tested (Download: https://doi.org/10.11588/data/DDJFGS, Icons: https://heidata.uni-heidelberg.de/dataverse/arthistoricum).

stevenwinship added a commit that referenced this issue Mar 6, 2024
* Switch to per-pid-provider settings

* partial refactor towards non-bean providers

* ~auto refactor name/package, remove bean status

* remove Util class

* rename

* add factories for all, fix providers, etc.

* unmanaged providers

* add getters

* add name to cnstr, add cnstr for unmanaged, add auth/shoulder checks

* update permalinks, add separator setting

* no arg constructor

* add unmanaged providers

* check canManagePid instead

* replace getBean(), compiles except for tests

* update tests, comment out ones that are TBD

* add clear method for testing

* bugs - remove dup authority, fix name, add auth/sep/shoulder tests

* make managed/excluded lists optional

* fix name in generated pids

* move setup to berforeall, add test of second permaprovider

* provider name->id

* adding label, more name->id

* providerName->providerId

* add factory map, lookups, add factory, perma parsing tests

* first datacite parsing test/fix id in pid

* rename class

* move auth/shoulder check to lower level method

* fix ids, fix managed list optional in fake

* add effective pid generator logic

* add effective pid generator tests

* fix param order

* fix perma handling of managed/excluded entries

* add managed/excluded tests, cleanup

* update pidprovider discovery to get effective one when necessary

* replace all refs to global protocol/auth/shoulder settings xcept one

keeping the new PidProviderFactoryBean.getDefaultPidGenerator() for now
as a possible way to stay ~backward comaptible

All the rest - tried to find the appropriate PidProvider to supply the
values

* first UI for setting Pid generator

* typo

* flyway script to add pid spec column

* @autoservice and public class for loader discovery

* minor cleanup/refactor

* verify protocol/auth are set/match the provider plus cleanup

* only call getGlobalId() when one should exist

* force all calls to create identifier to set protocol/auth as well

* move template to match refactor

* require superuser to change PidProvider

* cleanup

* check can create method

* make fake provider create file pids

* typo - fix UI

* return default instead of null for UI

* unrelated - logic fix

* partial support for legacy config - FAKE and DatCite - for testing

* cleanup

* style fail

* fix test - don't reset list of providers

* allow old aliases

* reverse logic in datacite legacy creator, add null check

* fix lookups, update test, test DataCite legacy

* missing if!

* disable obsolete test

* updated docs

* add test urls as default

* cleanup -remove unused imports

* unrelated link fix

* fix for #10251 - sync terms popup required code

* API calls for getting provider info and changing PID Generators

* api docs

* change level for entries to fix build error

* typo in refs

* fix indents

* more bad refs

* support for legacy hdl, perma, ezid

* new packages for everyone! (refactor)

* unused imports

* fix cut/paste issues

* add deprecation info

* Apply suggestions from code review

Co-authored-by: Oliver Bertuch <poikilotherm@users.noreply.github.com>

* reorg/update imports

* revert 2e41b9e

* deprecate old settings

* Change error handling and warnings per review

* Add testing for a valid PID generator as a config test

* formatting, switch if /else logic per review

* add deprecation

* move pid provider's dir setting to spi scope

* change flyway name, tweak release note, delete unused test class

* temporary flyway change

* use new settings in install

* Revert "temporary flyway change"

This reverts commit 7106ef6.

* fix rest api setting

* handle spaces in the pidproviders setting

* add note in Harvard setup

* refactoring/cleaning DataCite provider, drop cache

* moving XmlMetadataTemplate to doi package

* missing import

* move xml file to match package

* minor fixes, make getPidStatus visible in test

* disabled test of DPI lifecycle

* update installer/docs to not talk about a partial DataCite test setup

* remove legacy setting

* indent issue

* missing )

* fix setting name

* remove obsolete settings

* add defaults

* add valid fake pid setup for docker

* also adding pid config to the -dev yml

* Update docker-compose-dev.yml

Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>

* Update docker/compose/demo/compose.yml

Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>

* Update docker-compose-dev.yml

Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>

* Update docker/compose/demo/compose.yml

Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>

---------

Co-authored-by: Oliver Bertuch <poikilotherm@users.noreply.github.com>
Co-authored-by: qqmye <qqmye@BOOK-2CB3G91HHU>
Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
haarli pushed a commit to MPDL/dataverse that referenced this issue Mar 7, 2024
haarli pushed a commit to MPDL/dataverse that referenced this issue Mar 7, 2024
beepsoft pushed a commit to dsd-sztaki-hu/dataverse that referenced this issue Jul 23, 2024
@pdurbin
Copy link
Member

pdurbin commented Jul 29, 2024

Another report of this bug came in today: https://dataverse.zulipchat.com/#narrow/stream/378866-troubleshooting/topic/enabling.20guestbook.20at.20request.20for.20instance.20or.20collection/near/454931219

The solution should be to upgrade to 6.2 or later, of course.

atniph pushed a commit to dsd-sztaki-hu/dataverse that referenced this issue Sep 17, 2024
(cherry picked from commit 5198416)
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

Successfully merging a pull request may close this issue.

5 participants