部署ADF到JBoss

部署ADF到JBoss(一)
发表于 2010年12月14日 由 admin
部署ADF到JBoss上,我们需要分三步来理解:
1. 部署ADF Daces Demo 到JBoss
2. 部署没有BC层的应用程序到JBoss
3. 部署真正的ADF程序到JBoss

我们本节先部署ADF Daces Demo 到JBoss

流程:

1. 安装JBoss5.0(最好在无空格的路径中)
2. 检查环境变量
3. 我们将demo部署到JBoss上。路径  : \server\default\deploy
4. 为ADF添加相关的jar包,将jar包添加到jboss路径下:\server\default\lib
jar:

2010-05-05  16:43           325,283 adf-share-base.jar
2010-05-05  16:43           663,470 adf-share-ca.jar
2010-05-05  16:43           274,942 adf-share-support.jar
2010-05-05  16:43            29,920 adflibfilter.jar
2010-05-05  16:43             5,603 adflogginghandler.jar
2010-05-05  16:43         7,754,934 adfm.jar
2010-05-05  16:43         1,987,719 cache.jar
2010-05-05  16:43         1,579,673 dms.jar
2010-05-05  16:43         2,568,948 javatools-nodeps.jar
2010-05-05  16:43           369,208 jmxframework.jar
2010-05-05  16:43           623,454 jmxspi.jar
2010-05-05  16:43           450,851 jps-api.jar
2010-05-05  16:43         5,619,510 mdsrt.jar
2010-05-05  16:43            56,426 share.jar
2010-05-05  16:43           565,143 xml.jar
2010-05-05  16:43           767,780 xmlef.jar
2010-05-05  16:43         1,445,591 xmlparserv2.jar

5. 此刻启动服务器会遇到一下错误:
java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
解决方案:
到E:\jboss\jboss\jboss\server\default\deploy\rcf-dvt-demo.war\WEB-INF\lib\下删除:
xercesImpl-2.6.2.jar
xmlparserv2-11.1.1.JM7_4119.jar
6. 此刻启动服务器服务器,会报错:

com.sun.faces.config.WebConfiguration cannot be cast to com.sun.faces.config.WebConfiguration
需要大家手动修改jboss的web.xml
移除或者注释:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
        <!-- Configures JSF for a web application if the javax.faces.webapp.FacesServlet is declared -->
       <!-- in web.xml.                                                                             -->
       <!--
       <listener>
         <listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
       </listener>
       -->
    
       <!-- Listens to all web app lifecycle events so that @PreDestroy can be called on -->
       <!-- JSF managed beans that go out of scope.  You can comment this out if you     -->
       <!-- don't use JSF or you don't use annotations on your managed beans.            -->
       <!--
       <listener>
         <listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
       </listener>
      -->

7. 运行服务器
通过一下的路径访问Faces demo程序:

http://localhost:8080/rcf-dvt-demo/faces/index.jspx

你可能感兴趣的:(Web,应用服务器,jboss,JSF,sun)