`
avi2
  • 浏览: 90679 次
社区版块
存档分类
最新评论

How to deploy Hudson on WebLogic ?

    博客分类:
阅读更多
from http://m-button.blogspot.com/2008/09/how-to-deploy-hudson-on-weblogic.html

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> 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics