This page last changed on Jan 01, 2007 by cmiller.

WebLogic Configuration tips

Enabling logging

Confluence sends its log output to standard out, so by default Weblogic does not record it. To redirect Confluence's log output to a file follow these instructions Redirecting System.out and System.err to a File

Confluence must be deployed as an exploded war file to WebLogic.
Otherwise you may experience errors as such:

java.lang.IllegalStateException: Spring Application context has not been set 
  at bucket.container.SpringContainerContext.getComponent(SpringContainerContext.java:98)

Deploying Confluence on Weblogic 9.x

If you are seeing the following error -- or other NoSuchMethodErrors -- then this tip is for you!

java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

It appears that WLS 9 ships with an incompatible version of org.objectweb.asm.* packages which clash with the ones required by Hibernate. You can fix this by adding to the weblogic.xml deployment descriptor the settings.

<container-descriptor>
  <prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

WebLogic 8.1 performance problems

Creating a weblogic.xml file can improve the performance of Confluence within the WebLogic 8.1 series. This is particularly suitable in cases where WebLogic continually seeks to reload files from jars (which can be noticed when profiling Confluence in WebLogic and encountering excessive calls to java.util.zip.ZipFile.getEntry() ).

Find a typical example immediately below with an explanation of terms following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
        "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>

  <jsp-descriptor>

    <jsp-param>
      <param-name>pageCheckSeconds</param-name>
      <param-value>-1</param-value>
    </jsp-param>

    <jsp-param>
      <param-name>precompile</param-name>
      <param-value>false</param-value>
    </jsp-param>

    <jsp-param>
      <param-name>workingDir</param-name>
      <param-value>./jsp_precompile_dir/confluence</param-value>
    </jsp-param>

  </jsp-descriptor>

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

  <context-root>confluence</context-root>

</weblogic-web-app>

This file should be created in the WEB-INF/ directory of your Confluence deployment.

The full weblogic.xml syntax is described in BEA's documentation. Here we describe some important parameters you should consider setting.

Disabling JSP reload checks

Performance can be considerably affected by Weblogic's tendency to scan JSPs for changes on every page load.
This can be disabled by setting pageCheckSeconds to -1.

Disabling servlet reload checks

Similar to the JSP reload checks, Weblogic will scan servlets for modifications every second (by default), hurting performance.
This can be prevented by setting the servlet-reload-check-secs element to -1.

Avoiding JSP recompiles on redeploy

If you Weblogic instance is often restarted, performance can be improved by explicitly setting a directory to save compile JSPs to (the workingDir parameter), and setting precompile to 'false'.

Character Encoding

A JIRA user has reported that the following configuration can ensure that Chinese character sets are displayed correctly - add the following entry to the weblogic.xml file.

<weblogic-web-app>
            <jsp-descriptor>
              <jsp-param>
                <param-name>encoding</param-name>
                <param-value>UTF-8</param-value>
              </jsp-param>
              <jsp-param>
                <param-name>compilerSupportsEncoding</param-name>
                <param-value>false</param-value>
              </jsp-param>
            </jsp-descriptor>
          </weblogic-web-app>

Most of this page duplicates JIRA documentation - you might also like to read http://www.atlassian.com/software/jira/docs/latest/servers/weblogic.html .

Disabling the OSCache for Confluence 2.x

Confluence 2.0 uses oscache 2.1.1, which causes problems when Confluence is deployed in a weblogic container. This problem will show up by the Confluence css file taking a very long time (upwards of 30mins) to load. To fix this, you will need to disable the oscache, by removing the following entry from the WEB-INF/web.xml file.

<filter>
    <filter-name>CacheFilter</filter-name>
    <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
</filter>

We are currently investigating the root cause of this problem

Custom templates (decorators) do not work on WebLogic 8.1 SP2.

If, after creating a custom template, you see no result, check your velocity.log for a statement similar to:

2005-01-06 14:47:57,752 - ResourceManager : unable to find resource '/<space_key>/decorators/main.vmd' in any resource loader.

where <space_key>, of course, matches your space key.

This problem does not occur on WebLogic 8.1 SP3.

WebLogic 8.1 Soap issues

Axis 1.2 is known to not work out of the box with WebLogic 8.1. Please refer to the AXIS installation instructions for details. The following excerpt was taken from the AXIS documentation.

WebLogic 8.1 ships with webservices.jar that conflicts with Axis' saaj.jar and prevents Axis 1.2 from working right out of the box. This conflict exists because WebLogic uses an older definition of javax.xml.soap.* package from Java Web Services Developer Pack Version 1.0, whereas Axis uses a newer revision from J2EE 1.4.

However, there are two alternative configuration changes that enable Axis based web services to run on Weblogic 8.1.

In a webapp containing Axis, set <prefer-web-inf-classes> element in WEB-INF/weblogic.xml to true. An example of weblogic.xml is shown below:
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
If set to true, the <prefer-web-inf-classes> element will force WebLogic's classloader to load classes located in the WEB-INF directory of a web application in preference to application or system classes. This is a recommended approach since it only impacts a single web module.

In a script used to start WebLogic server, modify CLASSPATH property by placing Axis's saaj.jar library in front of WebLogic's webservices.jar.
NOTE: This approach impacts all applications deployed on a particular WebLogic instance and may prevent them from using WebLogic's webservices.

For more information on how WebLogic's class loader works, see WebLogic Server Application Classloading.

WebLogic 8.1 & HTTP Compression

There may be problems with WebLogic 8.1 and HTTP compression (by default disabled). This issue is being investigated and tracked at CONF-6304

ATT: HSQL or Embedded Database users - Webapp redeployment problems

A customer has reported that it is not possible to redeploy Confluence when it has been set up against a HSQL or embedded database. In general we do not recommend customers use the embedded database on production systems. If you want the ability to redeploy Confluence (particulary if you have other applications deployed in your weblogic server), you must use an external database in order for it to work. Thanks to Eric Black for this tip.

That was like a shot in the arm. Thank you!

Posted by at Sep 06, 2005 10:29

Confluence must be deployed as an exploded war file to WebLogic.

 

Can you elaborate on this?

Posted by jclark42796 at Sep 19, 2006 16:04

An exploded war file is one that has been unzipped. It will appear as a normal folder filled with other folders and directories. Wars are unlike jars, in that jars are always zipped.

Cheers, Nicholas 

Posted by nicholas@atlassian.com at Sep 19, 2006 16:58

Sorry, I should have clarified. Why must the war be exploded vs. deploying a single .war file?

Thanks,
Jim

Posted by jclark42796 at Oct 04, 2006 14:04

Confluence must be deployed as an exploded war file to WebLogic.
Is this a feature we set in the build.sml file...Oh and why cant weblogic see the damnable .war file.  It's right there.

Posted by xavier.gallagher@vdab.be at Oct 10, 2006 03:03

A user writes that, if you are using a DataSource, you will need to add the <resource-ref> element in the web.xml (refer CONF-1534)

Posted by rosie@atlassian.com at Dec 26, 2006 21:43

A user recommends that users running WebLogic 8.1 SP6 with Oracle 10g should create a WebLogic user/password that matchsd the Oracle database user/password.

Posted by david.soul@atlassian.com at Jan 10, 2007 19:21
Document generated by Confluence on Mar 22, 2007 20:55