Log4jConfigListener Deployment Issue

It looks like Spring framework's Log4jConfigListener is having an issue when webapp is deployed as WAR. Log4jConfigListener is defined in web.xml. I got the below error while deploying the application in weblogic 10.3.
weblogic.management.DeploymentException: Cannot set web app root system property when WAR file is not expanded - with nested exception:  [java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded].

The solution is deploy the WAR as exploded or don't use Log4jConfigListener. The spring framework documentation also says the WAR should be exploded.

There is some update here. There is a solution available to this without any code change. We just need to set "Archived Real Path Enabled" option checked. Please check this blog entry on how to enable.

Useful Links:

To read more articles on Weblogic, please click here.

5 comments:

  1. Hi Sir,

    Could you please explain the following questions:

    1) In case of portal heirarchy Desktop->books->Pages-portlets
    How can I hide and unhide the portlets?
    2) How many ways are there to set preference?
    3) How can we set different skins for different portlets?

    Please explain these...it would be a great help...

    Thanks & Regards
    Sandy

    ReplyDelete
  2. @Sandeep,

    1. One way is to use backing file to show/hide portlets.
    2. Portlet preferences could be set during development phase. You can also set preferences in portal admin console. for Java portlets, you mention in deployment descriptor(portlet.xml). For other portlets like Page flow, JSP portlets you can use weblogic workshop to create. Check this link:
    http://download.oracle.com/docs/cd/E13218_01/wlp/docs92/portlets/building.html#wp1073163

    3. I am not sure if we can set different skins for different portlet. But you can set different look-and-feel for each desktop.

    Hope this helps.

    ReplyDelete
  3. "There is some update here. There is a solution available to this without any code change. We just need to set "Archived Real Path Enabled" option checked." - this is not resolving Log4JConfigListener issue. I have tried.
    was it working for you? I deployed with changing the weblogic.xml file to include the following snippet :

    true



    weblogic version 11g. Could you please confirm whether this shortcut works for you to resolve log4jconfigListener issue?

    ReplyDelete
  4. sorry My code snippet disappeared : here it is :
    updating weblogic.xml as below:

    <container-descriptor>
    <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
    </container-descriptor>

    ReplyDelete
  5. Thank for suggestion on to overcome this issue by doing deploy the WAR as exploded or don't use Log4jConfigListener. The Lucidtechsystems providing quality weblogic online training in hyderabad to students all over world.

    ReplyDelete