Weblogic - 12.2.1 - not initializing the ServerContainer ! — oracle-tech

    Forum Stats

  • 3,708,780 Users
  • 2,241,126 Discussions
  • 7,840,613 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Weblogic - 12.2.1 - not initializing the ServerContainer !

Teja BaluTeja Balu Posts: 1
edited September 2016 in WebLogic

Hello Everyone ,

I am facing an issue while starting my application on weblogic 12.2.1 , as per the websocket spec i am initializing the websocket end-point at the time of startup of application in ServletContextListener . I am using atmosphere framework to start the websocket endpoint.  While initializing the socket endpoint in class JSR356AsyncSupport - atmosphere framework tries to fetch the attribute from servletContext object . It doesn't find it and fails .... in weblogic 12.2.1 / 12.1.3. However the same application when deployed on other web/appservers like tomcat , websphere liberty , jboss works fine. (Am using jdk1.8)

(https://github.com/Atmosphere/atmosphere/blob/master/modules/cpr/src/main/java/org/atmosphere/container/JSR356AsyncSuppo… )

I don't have clue how to solve this - Much Appreciated if some one can help me out. Thank you.

public JSR356AsyncSupport(AtmosphereConfig config, ServletContext ctx) {

        super(config);

        ServerContainer container = (ServerContainer) ctx.getAttribute(ServerContainer.class.getName()); //javax.websocket.server.ServerContainer

        if (container == null) {

            if (ctx.getServerInfo().contains("WebLogic")) {

                logger.error("{} must use JDK 1.8+ with WebSocket", ctx.getServerInfo());

            }

            throw new IllegalStateException("Unable to configure jsr356 at that stage. ServerContainer is null");

        }

}

Exception stack trace.

2016-08-16 16:10:31,459 [            WGHALBW7] [  STANDARD] [ ] [ ] (pr.DefaultAsyncSupportResolver) ERROR   - Real error: Unable to configure jsr356 at that stage. ServerContainer is null

  1. java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null

at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:51)

at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:40)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:235)

at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:307)

at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:293)

at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:2004)

at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:911)

at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:835)

Answers

Sign In or Register to comment.