Skip Headers

Oracle® Application Development Framework Developer's Guide 10g Release 3 (10.1.3) B25386-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# 22.7 Deploying to JBoss

This section describes deployment details that are specific to JBoss.

- Section 22.7.1, "JBoss Versions Supported"

- Section 22.7.2, "JBoss Deployment Notes"

- Section 22.7.3, "JBoss Deployment Methods"

## 22.7.1 JBoss Versions Supported

Table 22-4 shows the supported versions of JBoss:

Table 22-4 Support Matrix for JBoss

JBoss version | JDK version | J2EE version
--- | --- | ---
4.0.2 | 1.5_04 | 1.4
4.0.3 | 1.5_04 | 1.4

## 22.7.2 JBoss Deployment Notes

- Before deploying applications that use ADF to JBoss, you need to install the ADF runtime libraries on JBoss. See Section 22.12, "Installing ADF Runtime Library on Third-Party Application Servers" for details.

- If you are running JBoss version 4.0.3, you need to delete the following directories from the JBoss home. This is to facilitate running JSP and ADF Faces components.

  - `deploy/jbossweb-tomcat55.sar/jsf-lib/`

  - `tmp`, `log`, and `data` directories (located at the same level as the `deploy` directory)

  After removing the directories, restart JBoss.

  If you do not remove these directories, you may get the following exception during runtime:

      org.apache.jasper.JasperException
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

      root cause

      java.lang.NullPointerException
      javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
      javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
      org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
      org.apache.jsp.untitled1_jsp._jspx_meth_f_view_0(org.apache.jsp.untitled1_jsp:84)
      org.apache.jsp.untitled1_jsp._jspService(org.apache.jsp.untitled1_jsp:60)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

- To deploy applications directly from JDeveloper to JBoss, the directory where the target JBoss application server is installed must be accessible from JDeveloper. This means you need to run JDeveloper and JBoss on the same machine, or you need to map a network drive on the JDeveloper machine to the JBoss machine.

  This is required because JDeveloper needs to copy the EAR file to the `JBOSS_HOME\server\default\deploy` directory in the JBoss installation directory.

- For EJB applications, add a `jboss.xml` deployment descriptor file if you want to support JBoss-specific configuration options for the EJBs. For more information on this file, see `http://www.jboss.org`.

- In the Business Components Project Wizard, set the SQL Flavor to SQL92, and the Type Map to Java. This is necessary because ADF uses the emulated XA datasource implementation when the Business Components application is deployed as an EJB session bean.

- To test an EJB deployed to JBoss, create a library in JDeveloper for the JBoss client-side libraries. The JBoss client-side libraries are located in the `JBOSS_HOME/client` directory.

- For business components JSP applications, choose Deploy to EAR file from the context menu to deploy it as an EAR file. You must deploy this application to an EAR file and not a WAR file because JBoss does not add EJB references under the `java:comp/env/` JNDI namespace for a WAR file. If you have set up a connection in JDeveloper to your JBoss server, you can deploy the EAR file directly to the server.

## 22.7.3 JBoss Deployment Methods

You can deploy to JBoss directly if you have set up a connection in JDeveloper to your JBoss server. When you deploy from JDeveloper, it copies the EAR file to the `JBOSS_HOME\server\default\deploy` directory. JBoss deploys the EAR files that it finds in that directory. You do not have to restart JBoss in order to access the application.