glassfish
  1. glassfish
  2. GLASSFISH-11674

Configuring virtual-server with custom valve results in CNFE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: V3
    • Fix Version/s: 3.1
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      11,674

      Description

      See http://forums.java.net/jive/thread.jspa?messageID=391204:

      I have a problem trying to configure a custom valve on glassfish v3.

      I've coded the class (attached) and generated the jar file (attached).

      I put the jar file inside the lib directory (where I put for example jdbc
      drivers). That's /cc/glassfishv3/glassfish/lib.

      I've configured the 'server' virtual server to use the valve. I've done it
      through the admin console but here's the resulting domain.xml (fragment):

      <config name="server-config">
      <http-service>
      <access-log />
      <virtual-server id="server"
      network-listeners="http-listener-2,http-listener-1">
      <property name="valve_1"
      value="net.sargue.glassfish.valve.StdOutAccessLogValve" />
      </virtual-server>
      <virtual-server id="__asadmin" network-listeners="admin-listener" />
      </http-service>

      So everything seems fine but upon starting the server this is what I get on the
      logs.

      [#|2010-03-11T12:25:25.027+0100|INFO|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|Created
      HTTP listener http-listener-2 on port 8181|#]

      [#|2010-03-11T12:25:25.036+0100|INFO|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|Created
      HTTP listener admin-listener on port 4848|#]

      [#|2010-03-11T12:25:25.062+0100|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=FelixStartLevel;|WEB0148:
      Unable to load extension class [

      {0}] from web module [{1}]
      java.lang.ClassNotFoundException: net.sargue.glassfish.valve.StdOutAccessLogValve
      at
      org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
      at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
      at
      org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at com.sun.enterprise.web.VirtualServer.loadInstance(VirtualServer.java:1063)
      at com.sun.enterprise.web.VirtualServer.addValve(VirtualServer.java:1030)
      at
      com.sun.enterprise.web.VirtualServer.configureCatalinaProperties(VirtualServer.java:904)
      at com.sun.enterprise.web.WebContainer.configureHost(WebContainer.java:1246)
      at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1177)
      at com.sun.enterprise.web.WebContainer.createHosts(WebContainer.java:1116)
      at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:558)
      at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:78)
      at
      com.sun.enterprise.v3.services.impl.WebContainerStarter.startWebContainer(WebContainerStarter.java:202)
      at
      com.sun.enterprise.v3.services.impl.WebContainerStarter.postConstruct(WebContainerStarter.java:144)
      at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)
      at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)
      at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)
      at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)
      at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)
      at
      org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
      at org.jvnet.hk2.osgimain.Main.start(Main.java:140)
      at
      org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:619)
      |#]

      [#|2010-03-11T12:25:25.062+0100|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|WEB0148:
      Unable to load extension class [{0}

      ] from web module [

      {1}

      ]
      java.lang.ClassNotFoundException: net.sargue.glassfish.valve.StdOutAccessLogValve
      at
      org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
      at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
      at
      org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at com.sun.enterprise.web.VirtualServer.loadInstance(VirtualServer.java:1063)
      at com.sun.enterprise.web.VirtualServer.addValve(VirtualServer.java:1030)
      at
      com.sun.enterprise.web.VirtualServer.configureCatalinaProperties(VirtualServer.java:904)
      at com.sun.enterprise.web.WebContainer.configureHost(WebContainer.java:1246)
      at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1177)
      at com.sun.enterprise.web.WebContainer.createHosts(WebContainer.java:1116)
      at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:558)
      at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:78)
      at
      com.sun.enterprise.v3.services.impl.WebContainerStarter.startWebContainer(WebContainerStarter.java:202)
      at
      com.sun.enterprise.v3.services.impl.WebContainerStarter.postConstruct(WebContainerStarter.java:144)
      at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:236)
      at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)
      at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)
      at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)
      at org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)
      at
      org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
      at org.jvnet.hk2.osgimain.Main.start(Main.java:140)
      at
      org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:619)

      #]

      [#|2010-03-11T12:25:25.064+0100|WARNING|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=FelixStartLevel;|WEB0158:
      Object of type classname [net.sargue.glassfish.valve.StdOutAccessLogValve] not
      an instance of Valve or GlassFishValve|#]

      [#|2010-03-11T12:25:25.064+0100|WARNING|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|WEB0158:
      Object of type classname [net.sargue.glassfish.valve.StdOutAccessLogValve] not
      an instance of Valve or GlassFishValve|#]

      [#|2010-03-11T12:25:25.142+0100|INFO|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=Thread-1;|Created
      virtual server server|#]

      #]

      [#|2010-03-11T12:25:25.144+0100|INFO|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=FelixStartLevel;|Created
      virtual server __asadmin|#]

      Strange mix of messages! Not found but also not the correct type. Perhaps the
      second is a follow-up from the first one.

        Activity

        Hide
        akind added a comment -

        amy,

        I' not allowed to attach files to this issue, so I put it here:

        Here the Valves (one implements org.glassfish.web.valve.GlassFishValve, and one extends org.apache.catalina.valves.ErrorReportValve), both are working fine as normal valves (valve_1, valve_2), but not as errorReportValve:
        package custom;
        import java.io.IOException;
        import javax.servlet.ServletException;
        import javax.servlet.http.HttpServletResponse;
        import org.apache.catalina.Request;
        import org.apache.catalina.Response;
        import org.glassfish.web.valve.GlassFishValve;
        public class ErrorValve1 implements GlassFishValve {
        @Override
        public String getInfo()

        { return getClass().getName(); }
        @Override
        public int invoke(Request request, Response respinse) throws IOException, ServletException { System.out.println("invoke valve: "+ getInfo()); return INVOKE_NEXT; }
        @Override
        public void postInvoke(Request request, Response response) throws IOException, ServletException { HttpServletResponse httpResp = (HttpServletResponse) response.getResponse(); System.out.println("postInvoke valve: "+ getInfo()+ " - HttpStatus: "+httpResp.getStatus()); }
        }

        package custom;
        import java.io.IOException;
        import javax.servlet.ServletException;
        import javax.servlet.http.HttpServletResponse;
        import org.apache.catalina.Request;
        import org.apache.catalina.Response;
        import org.apache.catalina.valves.ErrorReportValve;
        public class ErrorValve2 extends ErrorReportValve {
        @Override
        public String getInfo() { return getClass().getName(); }

        @Override
        public int invoke(Request request, Response respinse) throws IOException, ServletException

        { System.out.println("invoke valve: "+ getInfo()); return INVOKE_NEXT; }

        @Override
        public void postInvoke(Request request, Response response) throws IOException, ServletException

        { HttpServletResponse httpResp = (HttpServletResponse) response.getResponse(); System.out.println("postInvoke valve: "+ getInfo()+ " - HttpStatus: "+httpResp.getStatus()); }

        }

        And here is my domain.xml. It's out of the box with two modifications:
        1. the valves (valve_1 and errorReportValve)
        2. my deployed testApp

        <domain log-root="$

        {com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}

        /applications" version="43">
        <system-applications>
        <application context-root="" location="$

        {com.sun.aas.installRootURI}

        /lib/install/applications/_admingui" name="_admingui" directory-deployed="true" object-type="system-admin">
        <module name="__admingui">
        <engine sniffer="web"></engine>
        <engine sniffer="security"></engine>
        </module>
        </application>
        </system-applications>
        <applications>
        <application context-root="/testApp" location="$

        {com.sun.aas.instanceRootURI}/applications/testApp/" name="testApp" object-type="user">
        <property name="appLocation" value="${com.sun.aas.instanceRootURI}

        /applications/__internal/testApp/testApp2100515545419779738.war"></property>
        <property name="defaultAppName" value="testApp2100515545419779738"></property>
        <module name="testApp">
        <engine sniffer="security"></engine>
        <engine sniffer="web"></engine>
        </module>
        </application>
        </applications>
        <resources>
        <jdbc-resource pool-name="_TimerPool" jndi-name="jdbc/_TimerPool" object-type="system-admin"></jdbc-resource>
        <jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default"></jdbc-resource>
        <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__TimerPool">
        <property name="databaseName" value="$

        {com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
        <property name="connectionAttributes" value=";create=true"></property>
        </jdbc-connection-pool>
        <jdbc-connection-pool is-isolation-level-guaranteed="false" datasource-classname="org.apache.derby.jdbc.ClientDataSource" res-type="javax.sql.DataSource" name="DerbyPool">
        <property name="PortNumber" value="1527"></property>
        <property name="Password" value="APP"></property>
        <property name="User" value="APP"></property>
        <property name="serverName" value="localhost"></property>
        <property name="DatabaseName" value="sun-appserv-samples"></property>
        <property name="connectionAttributes" value=";create=true"></property>
        </jdbc-connection-pool>
        </resources>
        <servers>
        <server name="server" config-ref="server-config">
        <application-ref ref="_admingui" virtual-servers="_asadmin"></application-ref>
        <application-ref ref="testApp" virtual-servers="server"></application-ref>
        <resource-ref ref="jdbc/__TimerPool"></resource-ref>
        <resource-ref ref="jdbc/__default"></resource-ref>
        </server>
        </servers>
        <nodes>
        <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="${com.sun.aas.productRoot}"></node>
        </nodes>
        <configs>
        <config name="server-config">
        <http-service>
        <access-log></access-log>
        <virtual-server id="server" network-listeners="http-listener-1,http-listener-2">
        <property name="errorReportValve" value="custom.ErrorValve1"></property>
        <property name="valve_1" value="custom.ErrorValve2"></property>
        </virtual-server>
        <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
        </http-service>
        <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1"></orb>
        <iiop-listener port="3700" id="orb-listener-1" address="0.0.0.0" lazy-init="true"></iiop-listener>
        <iiop-listener port="3820" id="SSL" address="0.0.0.0" security-enabled="true">
        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </iiop-listener>
        <iiop-listener port="3920" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true">
        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
        </iiop-listener>
        </iiop-service>
        <admin-service system-jmx-connector-name="system" type="das-and-server">
        <jmx-connector port="8686" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector>
        <property name="adminConsoleContextRoot" value="/admin"></property>
        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
        <property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property>
        <das-config></das-config>
        </admin-service>
        <connector-service></connector-service>
        <web-container>
        <session-config>
        <session-manager>
        <manager-properties></manager-properties>
        <store-properties></store-properties>
        </session-manager>
        <session-properties></session-properties>
        </session-config>
        </web-container>
        <ejb-container session-store="${com.sun.aas.instanceRoot}

        /session-store">
        <ejb-timer-service></ejb-timer-service>
        </ejb-container>
        <mdb-container></mdb-container>
        <jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host host="localhost" name="default_JMS_host"></jms-host>
        </jms-service>
        <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
        <property name="file" value="$

        {com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
        <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
        <property name="file" value="${com.sun.aas.instanceRoot}

        /config/keyfile"></property>
        <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
        <property name="repository" value="$

        {com.sun.aas.instanceRoot}/generated/policy"></property>
        </jacc-provider>
        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
        <audit-module classname="com.sun.enterprise.security.Audit" name="default">
        <property name="auditOn" value="false"></property>
        </audit-module>
        <message-security-config auth-layer="SOAP">
        <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="dynamic.username.password" value="false"></property>
        <property name="debug" value="false"></property>
        </provider-config>
        <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="dynamic.username.password" value="false"></property>
        <property name="debug" value="false"></property>
        <property name="security.config" value="${com.sun.aas.instanceRoot}

        /config/wss-server-config-1.0.xml"></property>
        </provider-config>
        <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="debug" value="false"></property>
        </provider-config>
        <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="debug" value="false"></property>
        <property name="security.config" value="$

        {com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
        </provider-config>
        </message-security-config>
        <message-security-config auth-layer="HttpServlet">
        <provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule">
        <request-policy auth-source="sender"></request-policy>
        <response-policy></response-policy>
        <property name="restAuthURL" value="http://localhost:${ADMIN_LISTENER_PORT}/management/sessions"></property>
        <property name="loginPage" value="/login.jsf"></property>
        <property name="loginErrorPage" value="/loginError.jsf"></property>
        </provider-config>
        </message-security-config>
        <property name="default-digest-algorithm" value="SHA-256"></property>
        </security-service>
        <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}

        /logs"></transaction-service>
        <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix="">
        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
        <jvm-options>-client</jvm-options>
        <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
        <jvm-options>-Djava.endorsed.dirs=$

        {com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}

        /lib/endorsed</jvm-options>
        <jvm-options>-Djava.security.policy=$

        {com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}

        /config/login.conf</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
        <jvm-options>-Xmx512m</jvm-options>
        <jvm-options>-Djavax.net.ssl.keyStore=$

        {com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}

        /config/cacerts.jks</jvm-options>
        <jvm-options>-Djava.ext.dirs=$

        {com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}

        /jre/lib/ext$

        {path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
        <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
        <jvm-options>Dgosh.args=-nointeractive</jvm-options>
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
        <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
        </java-config>
        <network-config>
        <protocols>
        <protocol name="http-listener-1">
        <http default-virtual-server="server" max-connections="250">
        <file-cache></file-cache>
        </http>
        </protocol>
        <protocol security-enabled="true" name="http-listener-2">
        <http default-virtual-server="server" max-connections="250">
        <file-cache></file-cache>
        </http>
        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
        </protocol>
        <protocol name="admin-listener">
        <http default-virtual-server="__asadmin" max-connections="250" encoded-slash-enabled="true">
        <file-cache></file-cache>
        </http>
        </protocol>
        </protocols>
        <network-listeners>
        <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
        <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
        <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
        </network-listeners>
        <transports>
        <transport name="tcp"></transport>
        </transports>
        </network-config>
        <thread-pools>
        <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
        <thread-pool name="http-thread-pool"></thread-pool>
        <thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool>
        </thread-pools>
        <monitoring-service>
        <module-monitoring-levels></module-monitoring-levels>
        </monitoring-service>
        <group-management-service>
        <failure-detection></failure-detection>
        </group-management-service>
        </config>
        <config name="default-config">
        <http-service>
        <access-log></access-log>
        <virtual-server id="server" network-listeners="http-listener-1, http-listener-2">
        <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property>
        </virtual-server>
        <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
        </http-service>
        <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1"></orb>
        <iiop-listener port="${IIOP_LISTENER_PORT}" id="orb-listener-1" address="0.0.0.0"></iiop-listener>
        <iiop-listener port="${IIOP_SSL_LISTENER_PORT}" id="SSL" address="0.0.0.0" security-enabled="true">
        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </iiop-listener>
        <iiop-listener port="${IIOP_SSL_MUTUALAUTH_PORT}" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true">
        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
        </iiop-listener>
        </iiop-service>
        <admin-service system-jmx-connector-name="system">
        <jmx-connector port="${JMX_SYSTEM_CONNECTOR_PORT}" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector>
        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
        <das-config></das-config>
        </admin-service>
        <web-container>
        <session-config>
        <session-manager>
        <manager-properties></manager-properties>
        <store-properties></store-properties>
        </session-manager>
        <session-properties></session-properties>
        </session-config>
        </web-container>
        <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store">
        <ejb-timer-service></ejb-timer-service>
        </ejb-container>
        <mdb-container></mdb-container>
        <jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host>
        </jms-service>
        <log-service log-rotation-limit-in-bytes="2000000" file="${com.sun.aas.instanceRoot}/logs/server.log">
        <module-log-levels></module-log-levels>
        </log-service>
        <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
        <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
        <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
        <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
        <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
        <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
        </jacc-provider>
        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
        <audit-module classname="com.sun.enterprise.security.Audit" name="default">
        <property name="auditOn" value="false"></property>
        </audit-module>
        <message-security-config auth-layer="SOAP">
        <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="dynamic.username.password" value="false"></property>
        <property name="debug" value="false"></property>
        </provider-config>
        <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="dynamic.username.password" value="false"></property>
        <property name="debug" value="false"></property>
        <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
        </provider-config>
        <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="debug" value="false"></property>
        </provider-config>
        <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
        <request-policy auth-source="content"></request-policy>
        <response-policy auth-source="content"></response-policy>
        <property name="encryption.key.alias" value="s1as"></property>
        <property name="signature.key.alias" value="s1as"></property>
        <property name="debug" value="false"></property>
        <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
        </provider-config>
        </message-security-config>
        </security-service>
        <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs" automatic-recovery="true"></transaction-service>
        <diagnostic-service></diagnostic-service>
        <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" system-classpath="" classpath-suffix="">
        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
        <jvm-options>-server</jvm-options>
        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}

        $

        {com.sun.aas.installRoot}/lib/endorsed</jvm-options>
        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
        <jvm-options>-Xmx512m</jvm-options>
        <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
        <jvm-options>Dgosh.args=-noshutdown -c noop=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}

        /modules/autostart/</jvm-options>
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
        <jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
        </java-config>
        <availability-service>
        <web-container-availability></web-container-availability>
        <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability>
        <jms-availability></jms-availability>
        </availability-service>
        <network-config>
        <protocols>
        <protocol name="http-listener-1">
        <http default-virtual-server="server">
        <file-cache></file-cache>
        </http>
        </protocol>
        <protocol security-enabled="true" name="http-listener-2">
        <http default-virtual-server="server">
        <file-cache></file-cache>
        </http>
        <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
        </protocol>
        <protocol name="admin-listener">
        <http default-virtual-server="__asadmin" max-connections="250">
        <file-cache></file-cache>
        </http>
        </protocol>
        </protocols>
        <network-listeners>
        <network-listener port="$

        {HTTP_LISTENER_PORT}

        " protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
        <network-listener port="$

        {HTTP_SSL_LISTENER_PORT}

        " protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
        <network-listener port="$

        {ASADMIN_LISTENER_PORT}

        " protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
        </network-listeners>
        <transports>
        <transport name="tcp"></transport>
        </transports>
        </network-config>
        <thread-pools>
        <thread-pool name="http-thread-pool"></thread-pool>
        <thread-pool max-thread-pool-size="200" name="thread-pool-1"></thread-pool>
        <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
        </thread-pools>
        <group-management-service>
        <failure-detection></failure-detection>
        </group-management-service>
        <management-rules></management-rules>
        <system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
        <system-property name="HTTP_LISTENER_PORT" value="28080"></system-property>
        <system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property>
        <system-property name="JMS_PROVIDER_PORT" value="27676"></system-property>
        <system-property name="IIOP_LISTENER_PORT" value="23700"></system-property>
        <system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property>
        <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property>
        <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property>
        <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property>
        <system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property>
        <monitoring-service>
        <module-monitoring-levels></module-monitoring-levels>
        </monitoring-service>
        <connector-service></connector-service>
        </config>
        </configs>
        <property name="administrative.domain.name" value="domain1"></property>
        <load-balancers></load-balancers>
        <lb-configs></lb-configs>
        <clusters></clusters>
        </domain>

        And finally here is the code of my testServlet:
        @WebServlet(urlPatterns=

        {"/valveServlet"}

        )
        public class ValveServlet extends HttpServlet {
        private static final long serialVersionUID = 1L;
        @Override
        protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        if(req.getParameter("error")==null)

        { resp.getWriter().write("No Error"); }

        else

        { resp.getWriter().write("Error"); resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); }

        }
        }

        Show
        akind added a comment - amy, I' not allowed to attach files to this issue, so I put it here: Here the Valves (one implements org.glassfish.web.valve.GlassFishValve, and one extends org.apache.catalina.valves.ErrorReportValve), both are working fine as normal valves (valve_1, valve_2), but not as errorReportValve: package custom; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.glassfish.web.valve.GlassFishValve; public class ErrorValve1 implements GlassFishValve { @Override public String getInfo() { return getClass().getName(); } @Override public int invoke(Request request, Response respinse) throws IOException, ServletException { System.out.println("invoke valve: "+ getInfo()); return INVOKE_NEXT; } @Override public void postInvoke(Request request, Response response) throws IOException, ServletException { HttpServletResponse httpResp = (HttpServletResponse) response.getResponse(); System.out.println("postInvoke valve: "+ getInfo()+ " - HttpStatus: "+httpResp.getStatus()); } } package custom; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.valves.ErrorReportValve; public class ErrorValve2 extends ErrorReportValve { @Override public String getInfo() { return getClass().getName(); } @Override public int invoke(Request request, Response respinse) throws IOException, ServletException { System.out.println("invoke valve: "+ getInfo()); return INVOKE_NEXT; } @Override public void postInvoke(Request request, Response response) throws IOException, ServletException { HttpServletResponse httpResp = (HttpServletResponse) response.getResponse(); System.out.println("postInvoke valve: "+ getInfo()+ " - HttpStatus: "+httpResp.getStatus()); } } And here is my domain.xml. It's out of the box with two modifications: 1. the valves (valve_1 and errorReportValve) 2. my deployed testApp <domain log-root="$ {com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot} /applications" version="43"> <system-applications> <application context-root="" location="$ {com.sun.aas.installRootURI} /lib/install/applications/_ admingui" name=" _admingui" directory-deployed="true" object-type="system-admin"> <module name="__admingui"> <engine sniffer="web"></engine> <engine sniffer="security"></engine> </module> </application> </system-applications> <applications> <application context-root="/testApp" location="$ {com.sun.aas.instanceRootURI}/applications/testApp/" name="testApp" object-type="user"> <property name="appLocation" value="${com.sun.aas.instanceRootURI} /applications/__internal/testApp/testApp2100515545419779738.war"></property> <property name="defaultAppName" value="testApp2100515545419779738"></property> <module name="testApp"> <engine sniffer="security"></engine> <engine sniffer="web"></engine> </module> </application> </applications> <resources> <jdbc-resource pool-name="_ TimerPool" jndi-name="jdbc/ _TimerPool" object-type="system-admin"></jdbc-resource> <jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default"></jdbc-resource> <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__TimerPool"> <property name="databaseName" value="$ {com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property> <property name="connectionAttributes" value=";create=true"></property> </jdbc-connection-pool> <jdbc-connection-pool is-isolation-level-guaranteed="false" datasource-classname="org.apache.derby.jdbc.ClientDataSource" res-type="javax.sql.DataSource" name="DerbyPool"> <property name="PortNumber" value="1527"></property> <property name="Password" value="APP"></property> <property name="User" value="APP"></property> <property name="serverName" value="localhost"></property> <property name="DatabaseName" value="sun-appserv-samples"></property> <property name="connectionAttributes" value=";create=true"></property> </jdbc-connection-pool> </resources> <servers> <server name="server" config-ref="server-config"> <application-ref ref="_ admingui" virtual-servers=" _asadmin"></application-ref> <application-ref ref="testApp" virtual-servers="server"></application-ref> <resource-ref ref="jdbc/__TimerPool"></resource-ref> <resource-ref ref="jdbc/__default"></resource-ref> </server> </servers> <nodes> <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="${com.sun.aas.productRoot}"></node> </nodes> <configs> <config name="server-config"> <http-service> <access-log></access-log> <virtual-server id="server" network-listeners="http-listener-1,http-listener-2"> <property name="errorReportValve" value="custom.ErrorValve1"></property> <property name="valve_1" value="custom.ErrorValve2"></property> </virtual-server> <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server> </http-service> <iiop-service> <orb use-thread-pool-ids="thread-pool-1"></orb> <iiop-listener port="3700" id="orb-listener-1" address="0.0.0.0" lazy-init="true"></iiop-listener> <iiop-listener port="3820" id="SSL" address="0.0.0.0" security-enabled="true"> <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> </iiop-listener> <iiop-listener port="3920" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true"> <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl> </iiop-listener> </iiop-service> <admin-service system-jmx-connector-name="system" type="das-and-server"> <jmx-connector port="8686" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector> <property name="adminConsoleContextRoot" value="/admin"></property> <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property> <property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property> <das-config></das-config> </admin-service> <connector-service></connector-service> <web-container> <session-config> <session-manager> <manager-properties></manager-properties> <store-properties></store-properties> </session-manager> <session-properties></session-properties> </session-config> </web-container> <ejb-container session-store="${com.sun.aas.instanceRoot} /session-store"> <ejb-timer-service></ejb-timer-service> </ejb-container> <mdb-container></mdb-container> <jms-service default-jms-host="default_JMS_host" type="EMBEDDED"> <jms-host host="localhost" name="default_JMS_host"></jms-host> </jms-service> <security-service> <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm"> <property name="file" value="$ {com.sun.aas.instanceRoot}/config/admin-keyfile"></property> <property name="jaas-context" value="fileRealm"></property> </auth-realm> <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file"> <property name="file" value="${com.sun.aas.instanceRoot} /config/keyfile"></property> <property name="jaas-context" value="fileRealm"></property> </auth-realm> <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm> <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl"> <property name="repository" value="$ {com.sun.aas.instanceRoot}/generated/policy"></property> </jacc-provider> <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider> <audit-module classname="com.sun.enterprise.security.Audit" name="default"> <property name="auditOn" value="false"></property> </audit-module> <message-security-config auth-layer="SOAP"> <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="dynamic.username.password" value="false"></property> <property name="debug" value="false"></property> </provider-config> <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="dynamic.username.password" value="false"></property> <property name="debug" value="false"></property> <property name="security.config" value="${com.sun.aas.instanceRoot} /config/wss-server-config-1.0.xml"></property> </provider-config> <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="debug" value="false"></property> </provider-config> <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="debug" value="false"></property> <property name="security.config" value="$ {com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> </provider-config> </message-security-config> <message-security-config auth-layer="HttpServlet"> <provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule"> <request-policy auth-source="sender"></request-policy> <response-policy></response-policy> <property name="restAuthURL" value="http://localhost:${ADMIN_LISTENER_PORT}/management/sessions"></property> <property name="loginPage" value="/login.jsf"></property> <property name="loginErrorPage" value="/loginError.jsf"></property> </provider-config> </message-security-config> <property name="default-digest-algorithm" value="SHA-256"></property> </security-service> <transaction-service tx-log-dir="${com.sun.aas.instanceRoot} /logs"></transaction-service> <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix=""> <jvm-options>-XX:MaxPermSize=192m</jvm-options> <jvm-options>-client</jvm-options> <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options> <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options> <jvm-options>-Djava.endorsed.dirs=$ {com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot} /lib/endorsed</jvm-options> <jvm-options>-Djava.security.policy=$ {com.sun.aas.instanceRoot}/config/server.policy</jvm-options> <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot} /config/login.conf</jvm-options> <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options> <jvm-options>-Xmx512m</jvm-options> <jvm-options>-Djavax.net.ssl.keyStore=$ {com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options> <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot} /config/cacerts.jks</jvm-options> <jvm-options>-Djava.ext.dirs=$ {com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot} /jre/lib/ext$ {path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options> <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options> <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options> <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options> <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command</jvm-options> <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options> <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options> <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options> <jvm-options> Dgosh.args= -nointeractive</jvm-options> <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options> <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options> <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options> <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options> <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options> <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options> <jvm-options>-XX:NewRatio=2</jvm-options> </java-config> <network-config> <protocols> <protocol name="http-listener-1"> <http default-virtual-server="server" max-connections="250"> <file-cache></file-cache> </http> </protocol> <protocol security-enabled="true" name="http-listener-2"> <http default-virtual-server="server" max-connections="250"> <file-cache></file-cache> </http> <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl> </protocol> <protocol name="admin-listener"> <http default-virtual-server="__asadmin" max-connections="250" encoded-slash-enabled="true"> <file-cache></file-cache> </http> </protocol> </protocols> <network-listeners> <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener> <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener> <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener> </network-listeners> <transports> <transport name="tcp"></transport> </transports> </network-config> <thread-pools> <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool> <thread-pool name="http-thread-pool"></thread-pool> <thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool> </thread-pools> <monitoring-service> <module-monitoring-levels></module-monitoring-levels> </monitoring-service> <group-management-service> <failure-detection></failure-detection> </group-management-service> </config> <config name="default-config"> <http-service> <access-log></access-log> <virtual-server id="server" network-listeners="http-listener-1, http-listener-2"> <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property> </virtual-server> <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server> </http-service> <iiop-service> <orb use-thread-pool-ids="thread-pool-1"></orb> <iiop-listener port="${IIOP_LISTENER_PORT}" id="orb-listener-1" address="0.0.0.0"></iiop-listener> <iiop-listener port="${IIOP_SSL_LISTENER_PORT}" id="SSL" address="0.0.0.0" security-enabled="true"> <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> </iiop-listener> <iiop-listener port="${IIOP_SSL_MUTUALAUTH_PORT}" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true"> <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl> </iiop-listener> </iiop-service> <admin-service system-jmx-connector-name="system"> <jmx-connector port="${JMX_SYSTEM_CONNECTOR_PORT}" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector> <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property> <das-config></das-config> </admin-service> <web-container> <session-config> <session-manager> <manager-properties></manager-properties> <store-properties></store-properties> </session-manager> <session-properties></session-properties> </session-config> </web-container> <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store"> <ejb-timer-service></ejb-timer-service> </ejb-container> <mdb-container></mdb-container> <jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host" type="EMBEDDED"> <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host> </jms-service> <log-service log-rotation-limit-in-bytes="2000000" file="${com.sun.aas.instanceRoot}/logs/server.log"> <module-log-levels></module-log-levels> </log-service> <security-service> <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm"> <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property> <property name="jaas-context" value="fileRealm"></property> </auth-realm> <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file"> <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property> <property name="jaas-context" value="fileRealm"></property> </auth-realm> <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm> <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl"> <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property> </jacc-provider> <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider> <audit-module classname="com.sun.enterprise.security.Audit" name="default"> <property name="auditOn" value="false"></property> </audit-module> <message-security-config auth-layer="SOAP"> <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="dynamic.username.password" value="false"></property> <property name="debug" value="false"></property> </provider-config> <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="dynamic.username.password" value="false"></property> <property name="debug" value="false"></property> <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> </provider-config> <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="debug" value="false"></property> </provider-config> <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> <request-policy auth-source="content"></request-policy> <response-policy auth-source="content"></response-policy> <property name="encryption.key.alias" value="s1as"></property> <property name="signature.key.alias" value="s1as"></property> <property name="debug" value="false"></property> <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> </provider-config> </message-security-config> </security-service> <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs" automatic-recovery="true"></transaction-service> <diagnostic-service></diagnostic-service> <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" system-classpath="" classpath-suffix=""> <jvm-options>-XX:MaxPermSize=192m</jvm-options> <jvm-options>-server</jvm-options> <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options> <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator} $ {com.sun.aas.installRoot}/lib/endorsed</jvm-options> <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options> <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options> <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options> <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options> <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options> <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options> <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options> <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options> <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options> <jvm-options>-XX:NewRatio=2</jvm-options> <jvm-options>-Xmx512m</jvm-options> <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command</jvm-options> <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options> <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options> <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options> <jvm-options> Dgosh.args= -noshutdown -c noop=true</jvm-options> <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot} /modules/autostart/</jvm-options> <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options> <jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options> <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options> <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options> <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options> </java-config> <availability-service> <web-container-availability></web-container-availability> <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability> <jms-availability></jms-availability> </availability-service> <network-config> <protocols> <protocol name="http-listener-1"> <http default-virtual-server="server"> <file-cache></file-cache> </http> </protocol> <protocol security-enabled="true" name="http-listener-2"> <http default-virtual-server="server"> <file-cache></file-cache> </http> <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl> </protocol> <protocol name="admin-listener"> <http default-virtual-server="__asadmin" max-connections="250"> <file-cache></file-cache> </http> </protocol> </protocols> <network-listeners> <network-listener port="$ {HTTP_LISTENER_PORT} " protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener> <network-listener port="$ {HTTP_SSL_LISTENER_PORT} " protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener> <network-listener port="$ {ASADMIN_LISTENER_PORT} " protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener> </network-listeners> <transports> <transport name="tcp"></transport> </transports> </network-config> <thread-pools> <thread-pool name="http-thread-pool"></thread-pool> <thread-pool max-thread-pool-size="200" name="thread-pool-1"></thread-pool> <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool> </thread-pools> <group-management-service> <failure-detection></failure-detection> </group-management-service> <management-rules></management-rules> <system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property> <system-property name="HTTP_LISTENER_PORT" value="28080"></system-property> <system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property> <system-property name="JMS_PROVIDER_PORT" value="27676"></system-property> <system-property name="IIOP_LISTENER_PORT" value="23700"></system-property> <system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property> <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property> <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property> <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property> <system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property> <monitoring-service> <module-monitoring-levels></module-monitoring-levels> </monitoring-service> <connector-service></connector-service> </config> </configs> <property name="administrative.domain.name" value="domain1"></property> <load-balancers></load-balancers> <lb-configs></lb-configs> <clusters></clusters> </domain> And finally here is the code of my testServlet: @WebServlet(urlPatterns= {"/valveServlet"} ) public class ValveServlet extends HttpServlet { private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if(req.getParameter("error")==null) { resp.getWriter().write("No Error"); } else { resp.getWriter().write("Error"); resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } }
        Hide
        meikw added a comment -

        What is the status on this? It's been almost a month since the last comment. Is there a fix? I'm having the same problem as akind.

        Show
        meikw added a comment - What is the status on this? It's been almost a month since the last comment. Is there a fix? I'm having the same problem as akind.
        Hide
        Shing Wai Chan added a comment -

        I find out the problem. The normal custom valve is working.
        It is a different issue from the original issue here.
        The problem occurs for error report valve only.

        The errorReportValve has a different configuration setting as you also mentioned.
        I have filed a different issue to track custom errorReportValve issue:
        http://java.net/jira/browse/GLASSFISH-17093

        Show
        Shing Wai Chan added a comment - I find out the problem. The normal custom valve is working. It is a different issue from the original issue here. The problem occurs for error report valve only. The errorReportValve has a different configuration setting as you also mentioned. I have filed a different issue to track custom errorReportValve issue: http://java.net/jira/browse/GLASSFISH-17093
        Hide
        szhb69 added a comment -

        to whom it concerns.
        As Oracle decided to declare jdk 6 as legacy, I downloaded jdk-7u25-windows-x64 and declared it as default, starting eclipse kepler with it, and assigning jdk1.7.0_25 as JRE System library for all modules. Next I startet the application within eclipse on glassfish 3.1.2. This provoked the following log entry:
        SEVERE: PWC1344: Couldn't load specified error report valve class: org.apache.catalina.valves.ErrorReportValvejava.lang.NullPointerException at com.sun.enterprise.web.VirtualServer.loadInstance(VirtualServer.java:1253) at org.apache.catalina.core.StandardHost.configureStandardHostValve(StandardHost.java:1370) at org.apache.catalina.core.StandardHost.setPipeline(StandardHost.java:258) at com.sun.enterprise.web.VirtualServer.configureRedirect(VirtualServer.java:1461) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1366) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1190) at com.sun.enterprise.web.WebContainer.createHosts(WebContainer.java:1157) at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:579) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:93) at com.sun.enterprise.v3.services.impl.WebContainerStarter.startWebContainer(WebContainerStarter.java:202) at com.sun.enterprise.v3.services.impl.WebContainerStarter.postConstruct(WebContainerStarter.java:134) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253) at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145) at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136) at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79) at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63) at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97) at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
        I'll not further investigate on it, I just go back to jdk 1.6. Nevertheless I estimate it important to document the case.

        Show
        szhb69 added a comment - to whom it concerns. As Oracle decided to declare jdk 6 as legacy, I downloaded jdk-7u25-windows-x64 and declared it as default, starting eclipse kepler with it, and assigning jdk1.7.0_25 as JRE System library for all modules. Next I startet the application within eclipse on glassfish 3.1.2. This provoked the following log entry: SEVERE: PWC1344: Couldn't load specified error report valve class: org.apache.catalina.valves.ErrorReportValvejava.lang.NullPointerException at com.sun.enterprise.web.VirtualServer.loadInstance(VirtualServer.java:1253) at org.apache.catalina.core.StandardHost.configureStandardHostValve(StandardHost.java:1370) at org.apache.catalina.core.StandardHost.setPipeline(StandardHost.java:258) at com.sun.enterprise.web.VirtualServer.configureRedirect(VirtualServer.java:1461) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1366) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1190) at com.sun.enterprise.web.WebContainer.createHosts(WebContainer.java:1157) at com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:579) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:93) at com.sun.enterprise.v3.services.impl.WebContainerStarter.startWebContainer(WebContainerStarter.java:202) at com.sun.enterprise.v3.services.impl.WebContainerStarter.postConstruct(WebContainerStarter.java:134) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253) at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145) at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136) at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79) at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63) at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97) at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55) I'll not further investigate on it, I just go back to jdk 1.6. Nevertheless I estimate it important to document the case.
        Hide
        Shing Wai Chan added a comment -

        From https://glassfish.java.net/downloads/3.1.2.2-final.html , you may like to try GlassFish 3.1.2.2.

        Show
        Shing Wai Chan added a comment - From https://glassfish.java.net/downloads/3.1.2.2-final.html , you may like to try GlassFish 3.1.2.2.

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            jluehe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: