Replicated HTTP sessions specified webapp but clustering not enabled

Replicated HTTP sessions specified webapp but clustering not enabled

Caused By: weblogic.management.DeploymentException: [HTTP Session:100039]Replicated HTTP sessions specified for webapp: _auto_generated_ear_, but clustering not enabled.

If you see below exception:

clustering not enabled.
    at weblogic.servlet.internal.session.SessionContext.getInstance(SessionContext.java:244)
    at weblogic.servlet.internal.WebAppServletContext.initSessionContext(WebAppServletContext.java:1238)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:453)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:494)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418)
    Truncated. see log file for complete stacktrace

 

Solution: It means in your weblogic.xml HTTP session specified but clustering is not enable and you are using standalone server most of the this happens in development environment because here we don’t use multiple server. To fix this issue please comment out below line in your weblogic.xml file:

<!-- <persistent-store-type>replicated</persistent-store-type> -->

 

and your final weblogic.xml file should similar to below:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
    <session-descriptor>
        <cookie-path>/lars</cookie-path>
        <cookie-secure>true</cookie-secure>
        <url-rewriting-enabled>false</url-rewriting-enabled>
        <!-- <persistent-store-type>replicated</persistent-store-type> -->
        <http-proxy-caching-of-cookies>false</http-proxy-caching-of-cookies>
    </session-descriptor>
    <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
</weblogic-web-app>

 

 

This should fix issue of replicated HTTP sessions specified webapp but clustering not enabled

Leave a Reply

Your email address will not be published. Required fields are marked *