Problem with startup/shutdown/startup - Weblogic

This is a discussion on Problem with startup/shutdown/startup - Weblogic ; We're having a very strange problem that's been with us since weblogic 7 (we're using 8.1 now). We have a startup servlet. (Actually we have two startup servlets: struts and one of ours.) We're running both servlets in a single ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Problem with startup/shutdown/startup

  1. Problem with startup/shutdown/startup

    We're having a very strange problem that's been with us since weblogic
    7 (we're using 8.1 now). We have a startup servlet. (Actually we have
    two startup servlets: struts and one of ours.) We're running both
    servlets in a single WAR that runs in an EAR. This EAR is the only one
    started up on the server.

    The system basically works fine. However, most of the time, during
    server startup our servlet does a complete successful startup then,
    the server shuts the servlet down and re-starts it. Here's a piece
    from the console ("LIFECYCLE" is our servlet):

    ********************* LIFECYCLE INIT COMPLETE ***********************
    ************************************************** ****** INVOKING
    LIFECYCLE SHUT
    DOWN SEQUENCE ************************************************** ******

    4169,name=vtcc,context-path=/vtcc): Failed while destroying servlet:
    lifecyclest
    artup.
    java.lang.NoClassDefFoundError:
    com/maximus/stt/system/core/factory/ClassFactory
    .....
    ********************* LIFECYCLE INIT COMPLETE ***********************

    Each "LIFECYCLE INIT COMPLETE" is my servlet's init method completing.
    I have wrapped my servlet's init method with a catch (Throwable), and
    it never triggers; so I know nothing is being thrown from my servlet.
    The second init call also completes successfully, and the system then
    works fine. The only problem is the double startup (or
    startup/shutdown/startup).

    Another strange thing (which may be a clue) is that during my
    servlet's shutdown method ("INVOKING LIFECYCLE SHUTDOWN SEQUENCE") I
    seem to have lost my class path or something: note that I get a
    NoClassDefFoundError on a class
    ("com/maximus/stt/system/core/factory/ClassFactory") that was used
    many times during the previous init method call, and is also used
    during the second init call.

    Below is my web.xml (note that there were other servlets besides these
    two, but I have commented them out to try to narrow down this
    problem). This all works fine on jboss; it only has a problem on
    weblogic. Any help would be greatly appreciated.

    <>< gary


    Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">






    action
    org.apache.struts.action.ActionServlet

    config
    /WEB-INF/struts-config.xml


    debug
    3


    detail
    3

    2






    lifecyclestartup
    Initialize startup services
    com.maximus.stt.system.core.util.lifecycle.Lifecyc leManager
    2222




    action
    *.do








    index.jsp




    /WEB-INF/app.tld
    /WEB-INF/app.tld




    /WEB-INF/struts-bean.tld
    /WEB-INF/struts-bean.tld



    /WEB-INF/struts-html.tld
    /WEB-INF/struts-html.tld



    /WEB-INF/struts-logic.tld
    /WEB-INF/struts-logic.tld






    /tags/page-manager
    /WEB-INF/page-manager.tld



    /WEB-INF/c.tld
    /WEB-INF/c.tld




  2. Re: Problem with startup/shutdown/startup

    We're having the same problem. The servlet loads fine when the server
    is started, then on the first request to the servlet it unloads and
    reloads. It looks like weblogic is doing something screwy where it
    checks to see if the servlet needs to be reloaded, and is reloading
    it. The thing I'm curious about is the checkForReload method call you
    see half way through the stack trce. Note that everything above are
    calls to our application code from the servlet destroy() method, so
    I've left them out of this post:

    17:53:59,789 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletStubImpl$ServletD estroyAction.run(ServletStubImpl.java:1086)
    17:53:59,790 DEBUG mojo - - - at
    weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:317)
    17:53:59,790 DEBUG mojo - - - at
    weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
    17:53:59,790 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletStubImpl.destroyS ervlet(ServletStubImpl.java:569)
    17:53:59,790 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletStubImpl.destroyS ervlet(ServletStubImpl.java:596)
    17:53:59,791 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletStubImpl.checkFor Reload(ServletStubImpl.java:683)
    17:53:59,791 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletStubImpl.getServl et(ServletStubImpl.java:508)
    17:53:59,791 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:349)
    17:53:59,792 DEBUG mojo - - - at
    weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:28)
    17:53:59,792 DEBUG mojo - - - at
    weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:27)
    17:53:59,792 DEBUG mojo - - - at
    weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6316)
    17:53:59,792 DEBUG mojo - - - at
    weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:317)
    17:53:59,793 DEBUG mojo - - - at
    weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
    17:53:59,793 DEBUG mojo - - - at
    weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3622)
    17:53:59,793 DEBUG mojo - - - at
    weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2569)
    17:53:59,793 DEBUG mojo - - - at
    weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
    17:53:59,794 DEBUG mojo - - - at
    weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)


    gbisaga@yahoo.com (Gary Bisaga) wrote in message news:...
    > We're having a very strange problem that's been with us since weblogic
    > 7 (we're using 8.1 now). We have a startup servlet. (Actually we have
    > two startup servlets: struts and one of ours.) We're running both
    > servlets in a single WAR that runs in an EAR. This EAR is the only one
    > started up on the server.
    >
    > The system basically works fine. However, most of the time, during
    > server startup our servlet does a complete successful startup then,
    > the server shuts the servlet down and re-starts it. Here's a piece
    > from the console ("LIFECYCLE" is our servlet):
    >
    > ********************* LIFECYCLE INIT COMPLETE ***********************
    > ************************************************** ****** INVOKING
    > LIFECYCLE SHUT
    > DOWN SEQUENCE ************************************************** ******
    >
    > > 4169,name=vtcc,context-path=/vtcc): Failed while destroying servlet:
    > lifecyclest
    > artup.
    > java.lang.NoClassDefFoundError:
    > com/maximus/stt/system/core/factory/ClassFactory
    > ....
    > ********************* LIFECYCLE INIT COMPLETE ***********************
    >
    > Each "LIFECYCLE INIT COMPLETE" is my servlet's init method completing.
    > I have wrapped my servlet's init method with a catch (Throwable), and
    > it never triggers; so I know nothing is being thrown from my servlet.
    > The second init call also completes successfully, and the system then
    > works fine. The only problem is the double startup (or
    > startup/shutdown/startup).
    >
    > Another strange thing (which may be a clue) is that during my
    > servlet's shutdown method ("INVOKING LIFECYCLE SHUTDOWN SEQUENCE") I
    > seem to have lost my class path or something: note that I get a
    > NoClassDefFoundError on a class
    > ("com/maximus/stt/system/core/factory/ClassFactory") that was used
    > many times during the previous init method call, and is also used
    > during the second init call.
    >
    > Below is my web.xml (note that there were other servlets besides these
    > two, but I have commented them out to try to narrow down this
    > problem). This all works fine on jboss; it only has a problem on
    > weblogic. Any help would be greatly appreciated.
    >
    > <>< gary
    >
    >
    > > Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    >
    >
    >
    >
    >
    >
    > action
    > org.apache.struts.action.ActionServlet
    >
    > config
    > /WEB-INF/struts-config.xml
    >

    >
    > debug
    > 3
    >

    >
    > detail
    > 3
    >

    > 2
    >

    >
    >
    >
    >
    >
    > lifecyclestartup
    > Initialize startup services
    > com.maximus.stt.system.core.util.lifecycle.Lifecyc leManager
    > 2222
    >

    >
    >
    >
    > action
    > *.do
    >

    >
    >
    >
    >
    >
    >
    >
    > index.jsp
    >

    >
    >
    >
    > /WEB-INF/app.tld
    > /WEB-INF/app.tld
    >

    >
    >
    >
    > /WEB-INF/struts-bean.tld
    > /WEB-INF/struts-bean.tld
    >

    >
    >
    > /WEB-INF/struts-html.tld
    > /WEB-INF/struts-html.tld
    >

    >
    >
    > /WEB-INF/struts-logic.tld
    > /WEB-INF/struts-logic.tld
    >

    >
    >
    >
    >
    >
    > /tags/page-manager
    > /WEB-INF/page-manager.tld
    >

    >
    >
    > /WEB-INF/c.tld
    > /WEB-INF/c.tld
    >

    >
    >


  3. Re: Problem with startup/shutdown/startup

    I found out what was causing this in our application, maybe same thing
    happening in yours? The problem in ours is that by default the JVM
    starts up in the machine specified timezone. In our application, we
    switch the default timezone to GMT. When we did this, I think it was
    confusing weblogic about when the application was modified, so it
    thinks it has to reload everything.

    To fix it, I added this parameter to the JVM in the startup scripts:

    -Duser.timezone=GMT

    so that it matches what the application wants the timezone to be.

    alx@acm.org (Alex M) wrote in message news:...
    > We're having the same problem. The servlet loads fine when the server
    > is started, then on the first request to the servlet it unloads and
    > reloads. It looks like weblogic is doing something screwy where it
    > checks to see if the servlet needs to be reloaded, and is reloading
    > it. The thing I'm curious about is the checkForReload method call you
    > see half way through the stack trce. Note that everything above are
    > calls to our application code from the servlet destroy() method, so
    > I've left them out of this post:
    >
    > 17:53:59,789 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletStubImpl$ServletD estroyAction.run(ServletStubImpl.java:1086)
    > 17:53:59,790 DEBUG mojo - - - at
    > weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:317)
    > 17:53:59,790 DEBUG mojo - - - at
    > weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
    > 17:53:59,790 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletStubImpl.destroyS ervlet(ServletStubImpl.java:569)
    > 17:53:59,790 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletStubImpl.destroyS ervlet(ServletStubImpl.java:596)
    > 17:53:59,791 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletStubImpl.checkFor Reload(ServletStubImpl.java:683)
    > 17:53:59,791 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletStubImpl.getServl et(ServletStubImpl.java:508)
    > 17:53:59,791 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:349)
    > 17:53:59,792 DEBUG mojo - - - at
    > weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:28)
    > 17:53:59,792 DEBUG mojo - - - at
    > weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:27)
    > 17:53:59,792 DEBUG mojo - - - at
    > weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6316)
    > 17:53:59,792 DEBUG mojo - - - at
    > weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:317)
    > 17:53:59,793 DEBUG mojo - - - at
    > weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
    > 17:53:59,793 DEBUG mojo - - - at
    > weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3622)
    > 17:53:59,793 DEBUG mojo - - - at
    > weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2569)
    > 17:53:59,793 DEBUG mojo - - - at
    > weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
    > 17:53:59,794 DEBUG mojo - - - at
    > weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)
    >
    >
    > gbisaga@yahoo.com (Gary Bisaga) wrote in message news:...
    > > We're having a very strange problem that's been with us since weblogic
    > > 7 (we're using 8.1 now). We have a startup servlet. (Actually we have
    > > two startup servlets: struts and one of ours.) We're running both
    > > servlets in a single WAR that runs in an EAR. This EAR is the only one
    > > started up on the server.
    > >
    > > The system basically works fine. However, most of the time, during
    > > server startup our servlet does a complete successful startup then,
    > > the server shuts the servlet down and re-starts it. Here's a piece
    > > from the console ("LIFECYCLE" is our servlet):
    > >
    > > ********************* LIFECYCLE INIT COMPLETE ***********************
    > > ************************************************** ****** INVOKING
    > > LIFECYCLE SHUT
    > > DOWN SEQUENCE ************************************************** ******
    > >
    > > > > 4169,name=vtcc,context-path=/vtcc): Failed while destroying servlet:
    > > lifecyclest
    > > artup.
    > > java.lang.NoClassDefFoundError:
    > > com/maximus/stt/system/core/factory/ClassFactory
    > > ....
    > > ********************* LIFECYCLE INIT COMPLETE ***********************
    > >
    > > Each "LIFECYCLE INIT COMPLETE" is my servlet's init method completing.
    > > I have wrapped my servlet's init method with a catch (Throwable), and
    > > it never triggers; so I know nothing is being thrown from my servlet.
    > > The second init call also completes successfully, and the system then
    > > works fine. The only problem is the double startup (or
    > > startup/shutdown/startup).
    > >
    > > Another strange thing (which may be a clue) is that during my
    > > servlet's shutdown method ("INVOKING LIFECYCLE SHUTDOWN SEQUENCE") I
    > > seem to have lost my class path or something: note that I get a
    > > NoClassDefFoundError on a class
    > > ("com/maximus/stt/system/core/factory/ClassFactory") that was used
    > > many times during the previous init method call, and is also used
    > > during the second init call.
    > >
    > > Below is my web.xml (note that there were other servlets besides these
    > > two, but I have commented them out to try to narrow down this
    > > problem). This all works fine on jboss; it only has a problem on
    > > weblogic. Any help would be greatly appreciated.
    > >
    > > <>< gary
    > >
    > >
    > > > > Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    > >
    > >
    > >
    > >
    > >
    > >
    > > action
    > > org.apache.struts.action.ActionServlet
    > >
    > > config
    > > /WEB-INF/struts-config.xml
    > >

    > >
    > > debug
    > > 3
    > >

    > >
    > > detail
    > > 3
    > >

    > > 2
    > >

    > >
    > >
    > >
    > >
    > >
    > > lifecyclestartup
    > > Initialize startup services
    > > com.maximus.stt.system.core.util.lifecycle.Lifecyc leManager
    > > 2222
    > >

    > >
    > >
    > >
    > > action
    > > *.do
    > >

    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > index.jsp
    > >

    > >
    > >
    > >
    > > /WEB-INF/app.tld
    > > /WEB-INF/app.tld
    > >

    > >
    > >
    > >
    > > /WEB-INF/struts-bean.tld
    > > /WEB-INF/struts-bean.tld
    > >

    > >
    > >
    > > /WEB-INF/struts-html.tld
    > > /WEB-INF/struts-html.tld
    > >

    > >
    > >
    > > /WEB-INF/struts-logic.tld
    > > /WEB-INF/struts-logic.tld
    > >

    > >
    > >
    > >
    > >
    > >
    > > /tags/page-manager
    > > /WEB-INF/page-manager.tld
    > >

    > >
    > >
    > > /WEB-INF/c.tld
    > > /WEB-INF/c.tld
    > >

    > >
    > >


+ Reply to Thread