Open tfr42 opened 6 months ago
An NPE occurs if a new database connection is created.
Furthermore there are warnings in the log:
2024-06-06 09:18:14,096 WARN o.j.w.b.BeanDeployer [weld-worker-4] WELD-000167: Class org.deegree.console.webservices.ServiceConfig is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
2024-06-06 09:18:14,097 WARN o.j.w.b.BeanDeployer [weld-worker-4] WELD-000167: Class org.deegree.console.datastore.feature.FeatureStoreConfig is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
2024-06-06 09:18:14,099 WARN o.j.w.b.BeanDeployer [weld-worker-9] WELD-000167: Class org.deegree.console.datastore.feature.FeatureStoreLoader is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
2024-06-06 09:18:14,100 WARN o.j.w.b.BeanDeployer [weld-worker-4] WELD-000167: Class org.deegree.console.generic.Connection is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
2024-06-06 09:18:14,100 WARN o.j.w.b.BeanDeployer [weld-worker-9] WELD-000167: Class org.deegree.console.datastore.metadata.MetadataImporter is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
2024-06-06 09:18:14,101 WARN o.j.w.b.BeanDeployer [weld-worker-9] WELD-000167: Class org.deegree.console.datastore.metadata.MetadataStoreConfig is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
After testing the deegree web console with the previous fixes, two bugs were identified.
06-Jun-2024 14:25:24.867 WARNING [http-nio-8080-exec-10] com.sun.faces.lifecycle.InvokeApplicationPhase.execute #{workspace.startWorkspace}: /console/workspace/index.xhtml @38,112 action="#{workspace.startWorkspace}": java.lang.NullPointerException: Cannot read field "param1" because the return value of "org.deegree.client.core.utils.ActionParams.getInstance()" is null
jakarta.faces.FacesException: #{workspace.startWorkspace}: /console/workspace/index.xhtml @38,112 action="#{workspace.startWorkspace}": java.lang.NullPointerException: Cannot read field "param1" because the return value of "org.deegree.client.core.utils.ActionParams.getInstance()" is null
at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:83)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:62)
at jakarta.faces.component.UICommand.broadcast(UICommand.java:205)
at com.sun.faces.facelets.component.UIRepeat.broadcast(UIRepeat.java:966)
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:131)
at jakarta.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:691)
at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:449)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: jakarta.el.ELException: /console/workspace/index.xhtml @38,112 action="#{workspace.startWorkspace}": java.lang.NullPointerException: Cannot read field "param1" because the return value of "org.deegree.client.core.utils.ActionParams.getInstance()" is null
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:76)
at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:74)
... 32 more
Caused by: java.lang.NullPointerException: Cannot read field "param1" because the return value of "org.deegree.client.core.utils.ActionParams.getInstance()" is null
at org.deegree.client.core.utils.ActionParams.getParam1(ActionParams.java:66)
at org.deegree.console.workspace.WorkspaceBean.startWorkspace(WorkspaceBean.java:191)
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.apache.el.parser.AstValue.invoke(AstValue.java:253)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
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)
... 33 more
06-Jun-2024 14:32:13.005 SEVERE [http-nio-8080-exec-2] com.sun.faces.application.view.FaceletViewHandlingStrategy.handleRenderException Error Rendering View[/console/datastore/feature/index.xhtml]
jakarta.el.ELException: /console/datastore/feature/index.xhtml @36,114 rendered="#{config.sql}": Error reading [sql] on type [org.deegree.console.datastore.feature.FeatureStoreConfig]
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:77)
at jakarta.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:188)
at jakarta.faces.component.UIComponentBase.isRendered(UIComponentBase.java:308)
at jakarta.faces.component.UIComponent.encodeAll(UIComponent.java:1428)
at com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:64)
at com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:551)
at com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:1041)
at jakarta.faces.component.UIComponent.encodeAll(UIComponent.java:1435)
at jakarta.faces.render.Renderer.encodeChildren(Renderer.java:146)
at jakarta.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:556)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:257)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:82)
at jakarta.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:556)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:257)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:82)
at jakarta.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:556)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:257)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:82)
at jakarta.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:556)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:257)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:82)
at jakarta.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:556)
at jakarta.faces.component.UIComponent.encodeAll(UIComponent.java:1435)
at jakarta.faces.component.UIComponent.encodeAll(UIComponent.java:1438)
at jakarta.faces.component.UIComponent.encodeAll(UIComponent.java:1438)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:449)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:163)
at jakarta.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:125)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:93)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:72)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:150)
at jakarta.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:692)
at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:449)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: jakarta.el.ELException: Error reading [sql] on type [org.deegree.console.datastore.feature.FeatureStoreConfig]
at jakarta.el.BeanELResolver.getValue(BeanELResolver.java:106)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:139)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:164)
at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
at org.jboss.weld.module.web.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
... 54 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.deegree.console.workspace.WorkspaceBean.getActiveWorkspace()" because the return value of "java.util.Map.get(Object)" is null
at org.deegree.console.datastore.feature.FeatureStoreConfig.getWorkspace(FeatureStoreConfig.java:79)
at org.deegree.console.datastore.feature.FeatureStoreConfig.getSql(FeatureStoreConfig.java:83)
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.BeanELResolver.getValue(BeanELResolver.java:101)
... 60 more
In the current SNAPSHOT build of deegree 3.6.0 the deegree admin console is not fully functional. It requires a login even if no password for the console was set. And no login form is provided, hence no other view than the entry page is accessible. Workaround: Use the REST-API available on context path
/config
to configure the deegree workspace configuration.Affected versions: 3.6.0-SNAPSHOT, 3.6.0-pre1