Weblogic WAR Deployment Error

It looks like weblogic throws this error when web application is deployed only as WAR. But it doesn't throw any exception when deployed as exploded.
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].

There are two ways we can fix this issue when you still want to deploy as WAR.
1. Go to server admin console->Domain-> Web applications. Click the checkbox of Archived Real Path Enabled. This should make an entry into domain config.xml as below. or you can directly edit your domain config.xml and add the below entry.
       <web-app-container>
          <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
       </web-app-container>
2. Second option is at webapp level by updating weblogic.xml as below:
      <container-descriptor>
         <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
       </container-descriptor>
The value of <show-archived-real-path-enabled> set in the web app has precedence over the value set at the domain level. The default value of this property is false.  

4 comments:

  1. gr8. it worked for me . thx.

    ReplyDelete
  2. I have around 50 struts portlets in my weblogic portal, following the struts portlet architecture in the documentation, so we have now one ear which ends up that whenever we change any portlet we will have to redeploy the whole portal !!!
    I have read about federated portal, but it seems that its great advantage is when your portal wants to consume remote portlets deployed in remote producers, but this is not my case, since all my portlets are local ones, so I think there might be a simpler solution (*like in websphere where we have separate war for each portlet*)
    any suggestions ? would be great if you can provide any resources or links document steps needed to accomplish this

    ReplyDelete
  3. The second option is not working. Is there any caveat that i need to aware of?

    Thanks

    ReplyDelete
  4. Very useful solution for this error.The Lucidtechsystems providing quality weblogic administration training through online and classroom from hderabad,india.

    ReplyDelete