Deploying Cosmo in Weblogic 10
See
CosmoServletContainerRequirements for the general set of expectations the Cosmo webapp has for a servlet container. This document describes how to meet those expectations with Weblogic 10. It assumes familiarity with configuring Weblogic and deploying web applications into the server. Getting cosmo to run in Weblogic 10 was a chore and involves deploying the application as an ear (enterprise archive) vs a war (web application archive). Also, there are still a couple unresolved problems, one of which is accessing the login page without an explicit
/login/. Please share any experiences so we can keep these docs up to date.
Installation instructions
These instructions are for Windows systems, but the modifications for Unix like systems should be obvious. Filesystem paths within the Weblogic installation are prefixed with
$WL_HOME.
- Download and unpack
osaf-server-bundle-x.y.z
- Create a database (see CosmoDatabaseSetup).
- Create jdbc resource using weblogic admin (example here uses jndi name of jdbcCosmo)
- Create/configure mail resource using weblogic admain (example here uses jndi name of mail/cosmo)
- Create top-level directory for exploded ear,
chandler (can be created anywhere on filesystem)
- Create
chandler/META-INF/application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application>
<display-name>CosmoEAR</display-name>
<module>
<web>
<web-uri>chandler.war</web-uri>
<context-root>chandler</context-root>
</web>
</module>
</application>
- Create
chandler/META-INF/weblogic-application.xml
<weblogic-application>
<prefer-application-packages>
<package-name>org.apache.xerces.*</package-name>
</prefer-application-packages>
</weblogic-application>
- Unzip chandler.war to
chandler/chandler.war
- Create
chandler/chandler.war/WEB-INF/weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<resource-description>
<res-ref-name>mail/cosmo</res-ref-name>
<jndi-name>mail/cosmo</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>jdbc/cosmo</res-ref-name>
<jndi-name>jdbcCosmo</jndi-name>
</resource-description>
</weblogic-web-app>
- Create
chandler/chandler.war/WEB-INF/classes/log4j.properties for example:
log4j.rootLogger=WARN, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/bea/user_projects/domains/base_domain/logs/cosmo.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=WARN, R
log4j.logger.org.apache.catalina.core=WARN, R
log4j.logger.org.apache.catalina.session=WARN, R
log4j.logger.org.osaf.cosmo=DEBUG
- Copy the following jars from
osaf-server-bundle-x.y.z/common/lib to chandler/chandler.war/WEB-INF/lib
- log4j.jar
- commons-logging.jar
- Copy
osaf-server-bundle-x.y.z/etc/cosmo.properties to chandler/chandler.war/WEB-INF/classes and modify for your config
- Modify
$WL_HOME/user_projects/domains/[domain_name]/config/config.xml and add the following element to the =security-configuration:
<security-configuration>
...
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
...
</security-configuration>
- deploy ear dir
chandler
--
RandyLetness - 07 Jul 2008