How to deploy Hudson on WebLogic ?

from [url]http://m-button.blogspot.com/2008/09/how-to-deploy-hudson-on-weblogic.html[/url]

Hudson is an excellent continuous integration engine !

But if you have already tried to use it on WebLogic, you may have encoutered the following error :

This error translated in English says :

"Your servlet container loaded its own Ant version, preventing Hudson to work.

Maybe you could try to fix that by either copying the Hudson lib in your container, or reversing the classloader tree with the child-delegation-first."

If you already read about the FilteringClassLoader mechanism article, it should ring a bell to you ! :)

Well, that's exactly what we are going to do here.

First, as Hudson is available only in WAR format, we are going to create an EAR (because the filteringClassLoader only applies to enterprise applications).

It's easy : just add a "META-INF" folder, like :


ROOT_Folder

----> META-INF

----> application.xml

----> Manifest.mf

----> weblogic-application.xml

----> hudson.war


Your weblogic-application.xml should look like :


<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://www.bea.com/ns/weblogic/weblogic-application

http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
<!-- server-version: 10.3 -->
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>


<wls:prefer-application-packages>
<wls:package-name>org.apache.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>


application.xml


<?xml version="1.0" encoding="UTF-8"?>
<application version="1.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>hudson</display-name>
<module>
<web>
<web-uri>hudson.war</web-uri>
<context-root>/hudson</context-root>
</web>
</module>
</application>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值