Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

EASIE Weblogic Plugin Installation

Weblogic Server Development With Eclipse: Part 1

Genuitec, L.L.C.
March 2002

This article introduces practical J2EE server-side development techniques using Eclipse
with Weblogic Server 6.X and 7.0. In part one of this two part article, we demonstrate
how to install, configure, and run the EASIE Weblogic Plugin for Eclipse in preparation to
perform J2EE server-side development. In part two we will demonstrate how to execute
and debug an example EJB within an Eclipse-Weblogic local debug context.

Introduction
Genuitec recently released the EASIE Weblogic Plugin. It was the first in a series of application
and web server plugins for the Eclipse 2.0 IDE. This product extends the Eclipse IDE to include
user controls for managing a Weblogic Server 6.X or 7.0 instance from within Eclipse runtime and
debug contexts. The plugin is built on top of Genuitec’s Eclipse Application Server Integration
Environment, (EASIE™), a framework for interfacing Eclipse with Java/J2EE application servers.
In this article, we demonstrate how to install, configure, and run the EASIE Weblogic Plugin for
Eclipse.

Getting Started – The Software Environment


The following software environment was used as the basis for this article. For similar results, it is
highly recommended that you use the same or later versions of all listed software. When defining
directory paths remember to compensate for differences between the environment presented in
this article and your development environment.

Software Version
Java JDK Sun JDK 1.4 rc0 or greater
BEA Weblogic Server Version 6.0 or greater
Version 7.0beta
Eclipse IDE Version 2.0 (pre-release) Build 20020125 or
later

EASIE Weblogic Plugin Installation


Download the latest EASIE Weblogic Plugin from Genuitec. The plugin is distributed in ZIP
format, therefore, using your ZIP file utility, unzip EASIEWeblogic.zip file into the
<Eclipse_Home> directory. This will create a new plugin directory named
com.genuitec.eclipse.easie.weblogic.

Copyright © 2002, Genuitec, LLC


Step-1, Enable the EASIE Weblogic Plugin
Once the plugin has been installed it must be activated. From the main menu navigate to
‘Perspective > Customize…’, expand the ‘Action Sets’ node on the Available Items
Dialog and select ‘EASIE Weblogic’. For users of the 20020214 build you may need to
choose ‘Other’ in place of ‘Action Sets’.

Figure 1

Select ‘OK’ to activate enable the plugin. When activated the plugin installs a Weblogic menu
to the Eclipse menubar and start and stop icons to the Eclipse toolbar.

Figure 2

Copyright © 2002, Genuitec, LLC


Step-2, Weblogic Plugin Configuration
With the Weblogic Plugin activated, it must be configured before attempting to start Weblogic.
Select the Workbench > Preferences and choose the Weblogic node to view and edit
the plugin properties. The screenshot below shows an example of executing the WLS 6.X
example domain, called mydomain, that is shipped with WLS. Note in Figure-3 the
–Dweblogic.log.FileName property defined as a JVM argument instructs Weblogic to log to
the file c:\temp\weblogic.log.

Figure 3

Copyright © 2002, Genuitec, LLC


Weblogic Plugin Property Summary

Property Default Value Required Description


Path to BEA home directory. Weblogic
BEA Home Directory Yes consults this directory for its license and
registry files.
Path to Weblogic Server installation
WLS Installation Directory Yes
directory.
The name of the Weblogic system admin
WLS Admin User system Yes
user.
The password of the Weblogic system
WLS Admin Password Yes
admin user.
Execution Domain Directory that contains the execution
Yes
Directory domain.
The name of the Weblogic domain to
Execution Domain Name mydomain Yes
execute.
The name of the Weblogic server that
runs the domain. The server name is
Execution Server Name myserver Yes
specified within the domain’s config.xml
file.
The <hostname>:<port> of Weblogic
Hostname : PortNumber localhost:7001 Yes
server instance.
The location of the security file used by
Security Policy File No Weblogic. See
<WLS_HOME>/lib/weblogic.policy
Required when the login configuration
path if not specified in the security policy
JAAS Login Configuration See
file or the user’s home directory. See
File description
Resources for a discussion on security
configuration requirements.
When not standalone, the plugin will
External Management
Standalone Yes instruct the server to look for an external
Server
management server
Additional commandline arguments to be
Optional Java VM
No passed to the JVM when launching
Arguments
Weblogic.
Additional directories, jars, and zip files to
place at the front of the execution
classpath, before the Weblogic libraries.
Prepend to classpath No
Entries should be separated by the
system path separator (‘;’ or ‘:’) or a
space.
Additional directories, jars, and zip files to
append to the execution classpath.
Append to classpath No Entries should be separated by the
system path separator (‘;’ or ‘:’) or a
space.
Additional directories to append to
java.library.path. This allows the
Append to library path No specification of platform-specific native
libraries. Entries should be separated by
the system path separator (‘;’ or ‘:’).

Please consult the resources at the end of this article for references to a comprehensive
description of each configuration property.

Copyright © 2002, Genuitec, LLC


Starting Weblogic
Once the Weblogic Plugin has been configured, you should be able to start it from either the
Weblogic > Start Weblogic menu or the green UML node symbol located on the
toolbar. Selecting either start option causes the Weblogic Plugin to launch a Weblogic Server
instance within an Eclipse debug perspective. The plugin echoes the stdout and stderr of the
Weblogic instance to the Eclipse console. This allows you to monitor the Weblogic startup and
shutdown processes as well as informational and error messages output by the Weblogic
instance.

When WLS starts correctly, you should observe console output with a log entry stating “Started
Weblogic Admin Server …”. You will also notice a number of new threads have been created
as children under for the weblogic.Server program. weblogic.Server is the Java startup
class for running Weblogic.

Pay close attention to the console output when Weblogic fails to startup. Two of the most
common reasons for startup failures are: 1) no login configuration available to JDK 1.4 and 2) the
port is already bound to another process. If you experience a security exception with an error
message stating that the JVM is unable to locate a login configuration refer to the resource,
“Weblogic 6.1 – JDK 1.4 Login Configuration” for the resolution. If the port is already bound,
either reconfigure your Weblogic Plugin to launch Weblogic on a different port or terminate the
process using the port.

Figure 4

Copyright © 2002, Genuitec, LLC


Stopping Weblogic
To stop an instance of Weblogic Server use either the Weblogic > Stop Weblogic menu
action or the red UML node symbol located on the toolbar. When the plugin receives a stop
request it gracefully shuts down Weblogic Server. This process usually takes between 5-30
seconds. You can monitor shutdown progress by observing log information Weblogic sends to the
Eclipse console. The shutdown process is complete when the Weblogic Server thread group has
been terminated.

Conclusion
If you followed these EASIE Weblogic Plugin installation and configuration steps you should have
no problems starting and stopping Weblogic Server from within Eclipse. If problems still persist
visit the Genuitec website and subscribe to the EASIE Plugins mail-list and consult the resources
section of this article. In part two we will demonstrate how to deploy an EJB to a Weblogic Server
instance managed by the EASIE Weblogic Plugin and how to debug an EJB from within Eclipse.
Until next time happy programming.

Resources
• The Eclipse.org website to learn more about the Eclipse IDE.

• See the BEA website for information on downloading an evaluation version of Weblogic
Server.

• The EASIE Weblogic Plugin may be downloaded from the Genuitec website.

• The technical note Weblogic 6.1 - JDK 1.4 Login Configuration describes the Sun JDK
1.4 JVM requirement for, and configuration of, a JAAS login configuration in order to run
Weblogic Server 6.1.

• The Weblogic Administration Guide defines the Weblogic Server architecture and
configuration details.

• The EASIE Overview introduces the Genuitec EASIE framework for Eclipse application
Server plugins.

• Part 2, EASIE Weblogic Debugging is available at the Genuitec website.

Copyright © 2002, Genuitec, LLC

You might also like