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

Couldn't load error report valve if GlassFish started with a virtual server in state=off #24974

Open
OndroMih opened this issue May 30, 2024 · 0 comments

Comments

@OndroMih
Copy link
Contributor

Environment Details

  • GlassFish Version: 7.0.14 (happens also in 7.0.9)
  • JDK version: Java 11 or 17
  • OS: Linux
  • Database: N/A

Problem Description

An error is logged if GlassFish is started with a virtual server in state "off". The error valve is not loaded, which is not an issue for a virtual server which is turned off. Only a nasty error in the log:

Couldnt load specified error report valve class: {0}
java.lang.NullPointerException
       at com.sun.enterprise.web.VirtualServer.loadInstance(VirtualServer.java:1043)
       at org.apache.catalina.core.StandardHost.configureStandardHostValve(StandardHost.java:1252)
       at org.apache.catalina.core.StandardHost.setPipeline(StandardHost.java:222)
       at com.sun.enterprise.web.VirtualServer.setIsOff(VirtualServer.java:737)
       at com.sun.enterprise.web.VirtualServer.configureState(VirtualServer.java:1326)
       at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1235)
       at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1093)
       at com.sun.enterprise.web.WebContainer.createHosts(WebContainer.java:1066)
       at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:519)

Steps to reproduce

  1. Start GlassFish domain1 with the default configuration
  2. Set the virtual server "server" to state "off"
  3. Stop GlassFsih server
  4. Start GlassFish server - the error is logged

The reason is that the server context is not set when the setIsOff method is called in WebContainer.createHost(). The context is a couple of lines later in WebContainer.createHost.

Impact of Issue

No real impact. Only a nasty error in the log, which looks like a serious issue but could be ignored.

Type:Bug
Component: Web container
Priority: Low

@OndroMih OndroMih changed the title Couldnt load error report valve if GlassFish started with a virtual server in state=off Couldn't load error report valve if GlassFish started with a virtual server in state=off May 31, 2024
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

1 participant