Showing posts with label WebLogic. Show all posts
Showing posts with label WebLogic. Show all posts

Wednesday, May 18, 2011

Log4jConfigListener Deployment Issue on WebLogic

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.

But... there is a solution available to this without any code change. We just need to set "Archived Real Path Enabled" option checked, just like this:


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. 2. Second option is at webapp level by updating weblogic.xml as below: true The value of set in the web app has precedence over the value set at the domain level. The default value of this property is false.

This is my example:

Tuesday, May 17, 2011

Deployment in WebLogic

Hi people!
It's been a while since I worked with WebLogic (to be specific in 2004-2005), so I forgot some specific tricks that you've to know (now that I rely a lot on my always reliable Maven and STS), but there is one really important: Don't forget to include in your WEB-INF folder your weblogic.xml

I really hate to get married with propietary technologies, my philosophy is simple: (besides "Work Hard, Have Fun") "Use Open Source and Never get married to any vendor" (I usually develop using Tomcat and my target server could be something else - like 90% of my projects - and same thing happens with DB)