glassfish
  1. glassfish
  2. GLASSFISH-20001

Time to time getting java.lang.InstantiationException from the ApplicationFilterConfig.java:135)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 4.0_b81
    • Fix Version/s: 4.0_b84_RC1
    • Component/s: web_container
    • Labels:
      None

      Description

      The following testcase:

      svn co https://svn.java.net/svn/tyrus~source-code-repository
      cd tyrus~source-code-repository/trunk/tests/qa/websockets-lifecycle-test
      mvn -v
      #Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
      #Maven home: /opt/netbeans/java/maven
      #Java version: 1.7.0_11, vendor: Oracle Corporation
      #Java home: /opt/jdk1.7.0_11/jre
      #Default locale: en_US, platform encoding: UTF-8
      #OS name: "linux", version: "3.2.0-27-generic", arch: "amd64", family: "unix"
      mvn -Dtest=LifeCycleAnnotatedTest -Dwebsocket.container=glassfish -Dtyrus.test.port=8080 -Dglassfish.installRoot=/home/mikc/glassfish4/glassfish/ clean install

      is sometimes failing for me with this exception:

      WebModule[/websockets-lifecycle-test]Exception starting filter WebSocket filter
      java.lang.InstantiationException
      at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:135)
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:5297)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:5909)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2291)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1937)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)

        Activity

        Hide
        Shing Wai Chan added a comment -

        The stack trace indicates that the WebSocket filter has failed to instantiate.
        Assign to web socket team for further investigation.

        Show
        Shing Wai Chan added a comment - The stack trace indicates that the WebSocket filter has failed to instantiate. Assign to web socket team for further investigation.
        Hide
        jitu added a comment - - edited

        wondering why the webcontainer is instantiating the filter, when tyrus instantiates the filter as follows:

        TyrusServletFilter filter = ctx.createFilter(TyrusServletFilter.class);
        filter.setClasses(classes);
        final FilterRegistration.Dynamic reg = ctx.addFilter("WebSocket filter", filter);

        Also, none of the tyrus classes is in the stack trace, so for some reason container is trying to instantiate the filter. Note sure why.

        Show
        jitu added a comment - - edited wondering why the webcontainer is instantiating the filter, when tyrus instantiates the filter as follows: TyrusServletFilter filter = ctx.createFilter(TyrusServletFilter.class); filter.setClasses(classes); final FilterRegistration.Dynamic reg = ctx.addFilter("WebSocket filter", filter); Also, none of the tyrus classes is in the stack trace, so for some reason container is trying to instantiate the filter. Note sure why.
        Hide
        Pavel Bucek added a comment -

        additionally, it might be hitting issue with not correctly registering TyrusFilter (we were registering instance we've created), which should be already fixed in the trunk - this is against Glassfish build 81.

        we should re-test when Tyrus 1.0-b14 is integrated.

        Show
        Pavel Bucek added a comment - additionally, it might be hitting issue with not correctly registering TyrusFilter (we were registering instance we've created), which should be already fixed in the trunk - this is against Glassfish build 81. we should re-test when Tyrus 1.0-b14 is integrated.
        Hide
        Pavel Bucek added a comment -

        mikc22, is this issue still valid? (I don't think so..)

        Show
        Pavel Bucek added a comment - mikc22, is this issue still valid? (I don't think so..)
        Hide
        Pavel Bucek added a comment -

        cannot reproduce (linux, mac)

        most likely fixed with changing the way how TyrusServletFilter is instantiated.

        Show
        Pavel Bucek added a comment - cannot reproduce (linux, mac) most likely fixed with changing the way how TyrusServletFilter is instantiated.
        Hide
        shreedhar_ganapathy added a comment -

        Can you close this issue if this issue is no longer reproducible?

        Show
        shreedhar_ganapathy added a comment - Can you close this issue if this issue is no longer reproducible?
        Hide
        Pavel Bucek added a comment -

        test issue

        Show
        Pavel Bucek added a comment - test issue

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            mikc22
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: