Understanding class paths in Java EE projects with Rational Application Developer Version 8.0



Similar documents
WebSphere v5 Administration, Network Deployment Edition

T320 E-business technologies: foundations and practice

Installation Guide of the Change Management API Reference Implementation

Converting Java EE Applications into OSGi Applications

As you learned about in Chapter 1, WebSphere Application Server V6 supports the

Crystal Reports for Eclipse

InfoSphere Master Data Management operational server v11.x OSGi best practices and troubleshooting guide

This presentation will provide a brief introduction to Rational Application Developer V7.5.

JBoss SOAP Web Services User Guide. Version: M5

CONFIGURATION AND APPLICATIONS DEPLOYMENT IN WEBSPHERE 6.1

WA2087 Programming Java SOAP and REST Web Services - WebSphere 8.0 / RAD 8.0. Student Labs. Web Age Solutions Inc.

Rational Application Developer v7.0 (RAD7) trial version. Installation guide

NetBeans IDE Field Guide

Developing Eclipse Plug-ins* Learning Objectives. Any Eclipse product is composed of plug-ins

IBM InfoSphere MDM Server v9.0. Version: Demo. Page <<1/11>>

ITG Software Engineering

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

Deploying a Logi Info Application on WAS

Exam Name: IBM InfoSphere MDM Server v9.0

IBM WebSphere Adapter for PeopleSoft Enterprise Quick Start Tutorials

Working with WebSphere 4.0

SW5706 Application deployment problems

Module 11 Setting up Customization Environment

Create a Web Service from a Java Bean Test a Web Service using a generated test client and the Web Services Explorer

DEPLOYING EMC DOCUMENTUM BUSINESS ACTIVITY MONITOR SERVER ON IBM WEBSPHERE APPLICATION SERVER CLUSTER

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

edm RIE Export Plugin

BPM Scheduling with Job Scheduler

Security Testing of Java web applications Using Static Bytecode Analysis of Deployed Applications

How To Import And Re-Import Data From An Infosphere Data Model To An Infosplash Server On A Pc Or Macbook

Install guide for Websphere 7.0

SDK Code Examples Version 2.4.2

PASS4TEST 専 門 IT 認 証 試 験 問 題 集 提 供 者

Acknowledgments. p. 55

WA2102 Web Application Programming with Java EE 6 - WebSphere RAD 8.5. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3 SP02

BIRT Application and BIRT Report Deployment Functional Specification

Enterprise Applications

Securing SAS Web Applications with SiteMinder

DEPLOYING A VISUAL BASIC.NET APPLICATION

SOA Software: Troubleshooting Guide for WebSphere Application Server Agent

IBM Business Monitor V8.0 Global monitoring context lab

Migrating Applications From IBM WebSphere to Apache Tomcat

PTC Integrity Eclipse and IBM Rational Development Platform Guide

Eclipse installation, configuration and operation

T320 E-business technologies: foundations and practice

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Business Process Management IBM Business Process Manager V7.5

Developing Physical Solutions for InfoSphere Master Data Management Server Advanced Edition v11. MDM Workbench Development Tutorial

Operations and Monitoring with Spring

SAS Marketing Automation 4.4. Unix Install Instructions for Hot Fix 44MA10

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

Tutorial: BlackBerry Object API Application Development. Sybase Unwired Platform 2.2 SP04

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3

Extend WTP Server Tools for your application server. Tim deboer Gorkem Ercan

A standards-based approach to application integration

Reading multi-temperature data with Cúram SPMP Analytics

Tutorial: Android Object API Application Development. Sybase Unwired Platform 2.2 SP02

Deploying Intellicus Portal on IBM WebSphere

Enterprise Service Bus

Smooks Dev Tools Reference Guide. Version: GA

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Testing and Deploying IBM Rational HATS 8.5 Applications on Apache Geronimo Server 3.1

Glassfish, JAVA EE, Servlets, JSP, EJB

Tutorial: setting up a web application

CREATE A CUSTOM THEME WEBSPHERE PORTAL

Advertiser Campaign SDK Your How-to Guide

TIBCO ActiveMatrix BusinessWorks Plug-in for TIBCO Managed File Transfer Software Installation

EMC Documentum Composer

Backing Up and Restoring the Database

IBM Tivoli Workload Scheduler Integration Workbench V8.6.: How to customize your automation environment by creating a custom Job Type plug-in

APIS CARM NG Quick Start Guide for MS Windows

WA1791 Designing and Developing Secure Web Services. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc. 1

Document Classification: Public Document Name: SAPO Trust Centre - Generating a SSL CSR for IIS with SAN Document Reference:

Data Crow Creating Reports

Basic Android Setup Windows Version

GoAnywhere MFT Upgrade Guide. Version: Publication Date: 08/12/2015

Catalog Web service and catalog commerce management center customization

Upgrade Guide. Product Version: Publication Date: 02/11/2015

HOW TO DEPLOY AN EJB APLICATION IN WEBLOGIC SERVER 11GR1

Implementing a SAS 9.3 Enterprise BI Server Deployment TS-811. in Microsoft Windows Operating Environments

1 How to install CQ5 with an Application Server

TIBCO ActiveMatrix BPM Web Application Component Development. Software Release 2.0 November 2012

SAP NetWeaver Identity Management Identity Services Configuration Guide

Builder User Guide. Version Visual Rules Suite - Builder. Bosch Software Innovations

Microsoft Office 365 online archive features and FAQs

WebSphere Application Server V7: Deploying Applications

Lab 5 Using Remote Worklight Server

1z0-102 Q&A. DEMO Version

WebSphere Business Monitor

Case Study: Using Jenkins to Build WebSphere Portal Applications for the Enterprise. #jenkinsconf. Jenkins User Conference Boston #jenkinsconf

Getting Started Android + Linux. February 27 th, 2014

Configuring Situation Events in Action Manager for WebSphere Business Monitor Version 6.0

Rational Application Developer Performance Tips Introduction

Monitoring Pramati EJB Server

Introduction to OSGi and Modularity. InfoSphere MDM, Version 11.x Dany Drouin, Senior Software Engineer MDM

Web Applications. For live Java training, please see training courses at

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

IBM Rational Rapid Developer Components & Web Services

Printer Sharing of the PT-9500pc in a Windows Environment

Transcription:

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0 by Neeraj Agrawal, IBM This article describes a variety of class path scenarios for Java EE 1.4 projects and Java EE 5.0 and above projects using IBM Rational Application Developer Version 8.0. From a runtime perspective, in Java EE modules until version 1.4 : a. The modules of an EAR file access other modules by specifying an entry in the MANIFEST.MF file. b. Web modules also have access to JAR files inside its \WEB-INF\lib folder. In Java EE 5.0 and above modules, the JAR files in the lib folder of an EAR file are also available in the class path of the modules without an explicit MANIFEST.MF entry. Common classpath scenarios Let us understand how to configure the class path in the module projects of a sample EAR file : Figure 1: Java EE 1.4 projects If you want to access EJBs which are in the EAR14EJB project from the EAR14Web project and your previous experience is with the Java development tools in Eclipse, you might attempt to add a reference to the EAR14EJB project. Page 1 of 9

Figure 2: Web project Java Build Path This approach might appear to work well in Rational Application Developer since you do not see any compilation errors. However, as soon as you deploy the application to WebSphere Application Server, you will start seeing ClassNotFound exceptions. The reason for these exceptions is that you did not put an entry in the manifest of the Web project. The correct way of configuring the class path is to open the deployment assembly page of the Web project. Right-click your Web project and select Properties > Deployment Assembly. On the Deployment Assembly page, add a reference to the EJB project as shown below on the Manifest Entries tab. Page 2 of 9

Figure 3: Deployment Assembly Page Once you add a reference, you will notice that the EAR Libraries are updated with the EJB project. Figure 4: EAR Libraries container in the Web Project Page 3 of 9

EAR Libraries: is a container which provides the JAR file from your manifest into the project class path so that you do not need to perform an additional step to configure the Java Build path yourself as covered in Figure 2. The User library scenario is covered later which automatically populates EAR Libraries. Web App Libraries: If you pay close attention in Figure 4 you will notice that there is an empty folder called Web App Libraries. This folder is also a container which provides JAR files placed in the WEB-INF\lib folder into the project class path of the Web project. There are two common ways to put a JAR file inside WEB-INF\lib: a. By physically dropping inside the folder which is typically found under \WebContent\WEB-INF\lib or b. Logically mapping a JAR file to \WEB-INF\lib which is achieved using the deployment assembly properties page (refer to Figure 3). On the deployment assembly properties page, click the Deployment Assembly tab and select Add. Figure 5: Deployment assembly reference wizard You can choose Archive, External Archive and Variable to configure the JAR file. This JAR file is deployed properly on WebSphere Application Server when you choose to run your EAR file, likewise, if you export the EAR file you will see the JAR file being bundled in the archive. Page 4 of 9

In the example below, I have added log4j.jar which is placed somewhere in my disk. You will notice that the Web App Libraries container is updated. Figure 6: External JAR file configured in a Web project You can also make another project in your workspace available to the class path by simply selecting the Project option in Figure 5 and selecting an available project there. User Library Support for Web Projects Consider the case where you have a number of JAR files residing in a folder in your disk and you want to use them in your Web project. One approach would be to add each JAR file one by one as discussed under the Web App Libraries section. However, this approach is not only time consuming but not ideal for working in a team environment. Fortunately, there is a better way to accomplish this task by using User Library support. To use this feature, select Classpath Container as displayed in Figure 5 which opens the Add Library wizard. Page 5 of 9

Figure 7: Add Library Clicking Next opens another wizard page which lets you select User Libraries. The User Library page is also found on the Java >Build Path > User Libraries preference page. Page 6 of 9

Figure 8: User Library Page 7 of 9

Figure 9: Web Project after adding User Library As mentioned earlier in respect to external archives, user libraries are also logically mapped to \WEB-INF\lib and are deployed properly on WebSphere Application Server. User Library Support for EAR 5.0/6.0 Projects In EAR 5.0/6.0 you can use a similar mechanism as discussed under User Library Support for Web Projects to configure user defined JAR files. For an EAR file, it is mapped by default to \lib and all the modules of the EAR have visibility of those jars in their class path by means of EAR Libraries. In the example below I have selected a previously created user library in a 6.0 EAR file. The module of EAR, EAR60EJB automatically finds all the JAR files in its EAR Libraries container. Figure 10: EJB 3.1 project with EAR user libraries configured Page 8 of 9

Neeraj Agrawal architects and develops Java EE tools for Rational Application Developer. He is also a contributor to the Eclipse Web Tools Platform. He can be reached at nagrawal@us.ibm.com Copyright IBM Corporation 2010. Page 9 of 9