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

Exception when merging submitted resources from the VLO #231

Closed
WillemElbers opened this issue Oct 16, 2024 · 5 comments
Closed

Exception when merging submitted resources from the VLO #231

WillemElbers opened this issue Oct 16, 2024 · 5 comments

Comments

@WillemElbers
Copy link
Contributor

Stacktrace:

2024-10-16 15:13:57,105 ERROR [org.apache.wicket.DefaultExceptionMapper#mapUnexpectedExceptions:170] - Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public eu.clarin.cmdi.virtualcollectionregistry.gui.pages.submission.MergeCollectionsPage(org.apache.wicket.request.mapper.paramet
er.PageParameters) throws eu.clarin.cmdi.virtualcollectionregistry.VirtualCollectionRegistryException' and argument ''. An exception has been thrown during construction!
	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:76) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:102) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:271) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:169) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:231) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) ~[wicket-core-7.12.0.jar:7.12.0]
	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) ~[wicket-core-7.12.0.jar:7.12.0]
	at eu.clarin.cmdi.virtualcollectionregistry.VcrWicketFilter.doFilter(VcrWicketFilter.java:46) ~[classes/:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.70]
	at eu.clarin.cmdi.virtualcollectionregistry.gui.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:34) ~[classes/:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.70]
	at eu.clarin.cmdi.virtualcollectionregistry.rest.PersistenceFilter.doFilter(PersistenceFilter.java:34) ~[classes/:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.70]
	at de.mpg.aai.shhaa.AuthFilter.doFilter(AuthFilter.java:96) ~[mpgaai-shhaa-1.0.13.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:196) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[catalina.jar:8.5.70]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[catalina.jar:8.5.70]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[catalina.jar:8.5.70]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698) ~[catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[catalina.jar:8.5.70]
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769) ~[catalina.jar:8.5.70]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364) ~[catalina.jar:8.5.70]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624) ~[tomcat-coyote.jar:8.5.70]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-coyote.jar:8.5.70]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) ~[tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1650) ~[tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-util.jar:8.5.70]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-util.jar:8.5.70]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:8.5.70]
	at java.lang.Thread.run(Thread.java:834) ~[?:?]
Caused by: java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:171) ~[wicket-core-7.12.0.jar:7.12.0]
	... 45 more
Caused by: java.lang.IllegalArgumentException: value == null
	at eu.clarin.cmdi.virtualcollectionregistry.QueryOptions$Filter.add(QueryOptions.java:179) ~[classes/:?]
	at eu.clarin.cmdi.virtualcollectionregistry.gui.table.PrivateCollectionsProvider.addSpaceFilter(PrivateCollectionsProvider.java:17) ~[classes/:?]
	at eu.clarin.cmdi.virtualcollectionregistry.gui.table.CollectionsProvider.getFilter(CollectionsProvider.java:89) ~[classes/:?]
	at eu.clarin.cmdi.virtualcollectionregistry.gui.table.CollectionsProvider.size(CollectionsProvider.java:52) ~[classes/:?]
	at eu.clarin.cmdi.virtualcollectionregistry.gui.table.CollectionsProvider.getList(CollectionsProvider.java:63) ~[classes/:?]
	at eu.clarin.cmdi.virtualcollectionregistry.gui.pages.submission.MergeCollectionsPage.<init>(MergeCollectionsPage.java:133) ~[classes/:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:171) ~[wicket-core-7.12.0.jar:7.12.0]
	... 45 more
@WillemElbers
Copy link
Contributor Author

WillemElbers commented Oct 17, 2024

This exception is thrown when enumerating the list of private collections that can be used to merge the submitted resources with. In order to do so the username is retrieved from the session and in this case it was null.

This is interesting since login is required for this page. For some reason the authentication filter detects a logged in user but the username in the session is null...

See

@kreetrapper
Copy link

Step by step guide on how I can reproduce this issue:

  1. Open a browser
  2. go to https://vlo.clarin.eu/
  3. scroll down until some results appear
  4. on the first result (SmartKom Audio) click on the VCR button
  5. in the pop-up click on "submit"
  6. result: VCR opens in a new tab and says "not logged in"
  7. go back to the VLO tab
  8. select the second result (MultiCHannel Articulatory database: English)
  9. In the pop-up there are now two items listed
  10. click on "submit"
  11. a new pop-up opens with a 500 error

I get exactly the same behaviour in every browser. Tested with Firefox, Safari, Chrome, Edge.

@WillemElbers
Copy link
Contributor Author

Issue is triggered between step 6 and 7. Normally the user is expected to login and process the submission. We should hande this case as well.

@WillemElbers
Copy link
Contributor Author

Only happens when authentication via SAML, basic authentication does not manifest this issue.

@WillemElbers
Copy link
Contributor Author

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

No branches or pull requests

2 participants