Hot deployment in weblogic 7.0 or 8.1

Discussions

EJB design: Hot deployment in weblogic 7.0 or 8.1

  1. Hot deployment in weblogic 7.0 or 8.1 (7 messages)

    Hi all,

    Does any body know how to redeploy a web application in weblogic without restarting the server?

    I have my application in the exploded file format...

    I am using weblogic 8.1 and i want to know whether there is any Hot Deployment feature in 8.1.

    I've gone thru the weblogic 7.0 documentation. It says that the server automatically reloads all the files every x secs. which we can specify in the console.

    but doing so doesn;t reflect my changes......

    is there any other way? (i've tried touching the REDEPLOY file too)..

    Thanks,
    Seshu
  2. You certainly do not need to stop the app server to redeploy an application. For Weblogic, make sure you are running the server in "development" mode, which means that if you change any files in your web application, such as JSPs, the server will automatically pick up the changes.

    You should also be able to perform a simple undeploy then redeploy of the web application in the event you changed class files, etc, and you need the latest class files to be loaded by the class loader.

    Raffi
  3. the server automatically recompiles the JSP pages. that is ok. but if i need my modified ejb/servlet classes to be deployed while the server is running what is the method to do it?

    when i do undeploy/deploy thru the console....the server throws some exceptions when i access the files...
  4. Servlet Reload Check[ Go to top ]

    Try setting the following property in your weblogic.xml:

    <container-descriptor>
        <servlet-reload-check-secs>1</servlet-reload-check-secs>
    </container-descriptor>

    This will reload any changed servlets every second. I don't know if this works for hot-deploying EJBs, but it seems to work with chaning classes with exploded web apps.

    -dan
  5. In startweblogic.cmd file set set STARTMODE parameter to false
    i.e. put the command
    set STARTMODE=false . This will start the server in development mode
    hence your changes will be automatically reflected.
  6. The server is running in development mode. The first time i touch the REDPLOY file it works fine...but the next time i do it....i get the following exception:

    javax.ejb.NoSuchObjectLocalException: Bean is already undeployed.: java.rmi.NoSu
    chObjectException: Bean is already undeployed.
            at weblogic.ejb20.manager.BaseEJBManager.preInvoke(BaseEJBManager.java:9
    4)
            at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.ja
    va:124)
            at weblogic.ejb20.internal.BaseEJBLocalObject.preInvoke(BaseEJBLocalObje
    ct.java:229)
            at weblogic.ejb20.internal.StatelessEJBLocalObject.preInvoke(StatelessEJ
    BLocalObject.java:54)
            at era.user.UserManager_iq4580_ELOImpl.getAllUsers(UserManager_iq4580_EL
    OImpl.java:838)
            at era.user.EditFacultyProfileAction.doExecute(Unknown Source)
            at webwork.action.ActionSupport.execute(ActionSupport.java:108)
            at webwork.view.taglib.ActionTag$1.getValue(ActionTag.java:82)
            at webwork.util.AbstractValueStack.findValue(AbstractValueStack.java:306
    )
            at webwork.view.taglib.WebWorkBodyTagSupport.findValue(WebWorkBodyTagSup
    port.java:57)
            at webwork.view.taglib.IteratorTag.doStartTag(IteratorTag.java:71)
            at jsp_servlet._staff.__add_faculty._jspService(__add_faculty.java:742)
            at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:1053)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:387)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6291)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    97)
            at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3575)
            at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2573)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

            at weblogic.ejb20.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeU
    tils.java:146)
            at weblogic.ejb20.internal.BaseEJBLocalHome.handleSystemException(BaseEJ
    BLocalHome.java:228)
            at weblogic.ejb20.internal.BaseEJBLocalObject.preInvoke(BaseEJBLocalObje
    ct.java:234)
            at weblogic.ejb20.internal.StatelessEJBLocalObject.preInvoke(StatelessEJ
    BLocalObject.java:54)
            at era.user.UserManager_iq4580_ELOImpl.getAllUsers(UserManager_iq4580_EL
    OImpl.java:838)
            at era.user.EditFacultyProfileAction.doExecute(Unknown Source)
            at webwork.action.ActionSupport.execute(ActionSupport.java:108)
            at webwork.view.taglib.ActionTag$1.getValue(ActionTag.java:82)
            at webwork.util.AbstractValueStack.findValue(AbstractValueStack.java:306
    )
            at webwork.view.taglib.WebWorkBodyTagSupport.findValue(WebWorkBodyTagSup
    port.java:57)
            at webwork.view.taglib.IteratorTag.doStartTag(IteratorTag.java:71)
            at jsp_servlet._staff.__add_faculty._jspService(__add_faculty.java:742)
            at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:1053)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:387)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6291)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    97)
            at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3575)
            at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2573)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

    Thanks,
    Seshu
  7. weblogic.deploy[ Go to top ]

    Looks like you are using utility classes that are not getting reloaded.
    Try the weblogic.deploy
    You can configure Ant to do it.

    good luck
  8. java.rmi.NoSuchObjectException: Bean is already undeployed

    Below its mentioned about the problem. In our current application we do not use war/ear. We deploy it using jar directly using utility.

    In console its displayed that bean is deployed but in application it throws this exception and states that bean is undeployed.

    If we start the application again all the beans are deployed and working fine.

    In cmd console this exception is thrown whenever it tries to access the application when domain is started for first time. Second time start it runs smoothly without errors.