IBM Websphere Application Server Community Edition

I have downloaded and installed IBM Websphere Application Server Community Edition2.1.1.1. Now I want to know how to deploy and undeploy enterprize applications(.ear files)??  
VamsiRajuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dipinciCommented:
You  can Perform from administrative console and Hot Deployment.

Using the administrative console
***************************************

1. Ensure that the target server is started. The administrative console is implemented as a Java EE enterprise application and cannot be used if the server is not running.
2. On a system that has access to the file system holding the assets to be deployed, start your Internet browser and navigate to the server's administrative console. Java EE assets often contain sensitive data, so consider using an SSL connection to protect it. In general, the URL for the administrative console is
http://host:port/console

3. On the log in page, log on to the administrative console by entering the name and password of an authorized user. Initially, the user name is system and the password is manager.
4. On the administrative console page, find the Console Navigation and, under the Applications heading, select Deploy New. Follow the directions on the resulting page.

5. To check the status of your asset, or to stop or undeploy (uninstall) your asset, select the proper asset type in the Console Navigation panel under the Applications heading. Follow the directions on the resulting page.

Using hot deployment
**************************

Hot deployment can be used to deploy Java EE assets

You can simply copy the Java EE asset into the hot deployment directory.
<WASCE_HOME>\deploy

where <WASCE_HOME> is replaced with the server's installation directory.

Hot deployment provides the following features.

If your Java EE asset is in a single archive file, an enterprise application EAR file, a web application WAR file, a resource adapter RAR file, an enterprise Java bean (EJB) JAR file, or a plan only deployment file,
1. Deploy the asset by copying the file into the deploy directory
2. Refresh the asset by replacing the file in the deploy directory with a newer file
3. Undeploy the asset by removing the file from the deploy directory.
If you prefer to keep your Java EE asset in an expanded directory form, where the contents of the directory are precisely the same as the matching archive,

1. Deploy the asset by copying the directory tree into the deploy directory
2. Refresh the asset by replacing the directory tree file in the deploy directory and assuring that the directory has a newer date
3. Undeploy the asset by removing the directory tree from the deploy directory .

Before choosing hot deployment, consider the following restrictions. Choose a different alternative if they are unacceptable.

To use hot deployment, you must have access to the server's installation directory. If the installation directory is protected or if the installation is on a remote host that does not provide remote access to the file system, you must choose a different alternative.
Before using hot deployment, the server must be started at least once. If the server has never been started, the deploy directory does not exist. When the server initializes, it automatically creates this directory if it does not exist.
This method does not support external deployment plans. Your deployment plan must be within the asset, in the correct location and with the correct name. See Choosing deployment plans and deployment options for more information on packaging deployment plans.
You cannot deploy a server configuration archive (CAR) file using hot deployment.
If you use hot deployment to deploy your Java EE asset, you can undeploy your asset by erasing it from the deploy directory. You can also undeploy your asset using the administrative console or the deploy command with the undeploy option. In this case, the administrative console and the deploy command will erase your asset from the deploy directory.
If you use hot deployment to deploy your Java EE asset, you must replace the asset in the deploy directory to redeploy it. You cannot use the administrative console or the deploy command to redeploy your asset.
When the server is restarted, all the assets in the deploy directory are redeployed, even if they were deployed before the server was stopped. This can significantly increase the time required for the server to initialize.
If an asset is deployed using some other alternative, the asset's files will not appear in the deploy directory. You cannot use hot deployment to refresh or undeploy an asset that was deployed with a different alternative.
0
VamsiRajuAuthor Commented:
The following is the error message I am getting when I am trying to deploy an .ear file using Adminstrative Console:

2009-05-27 06:37:02,101 ERROR [Deployer] Deployment failed due to
java.lang.OutOfMemoryError: Java heap space
        at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
        at java.lang.AbstractStringBuilder.append(Unknown Source)
        at java.lang.StringBuffer.append(Unknown Source)
        at org.apache.geronimo.deployment.util.DeploymentUtil.readAll(Deployment
Util.java:177)
        at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModul
e(TomcatModuleBuilder.java:173)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createM
odule(AbstractWebModuleBuilder.java:183)
        at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModu
le(SwitchingModuleBuilder.java:144)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules(EARCo
nfigBuilder.java:786)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARCo
nfigBuilder.java:402)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPla
n(EARConfigBuilder.java:295)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:226)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(Refl
ectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:124)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:867)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
239)
        at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doD
eploy(AbstractDeployCommand.java:116)
        at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(Dis
tributeCommand.java:61)
        at java.lang.Thread.run(Unknown Source)
2009-05-27 06:42:57,606 ERROR [Deployer] Deployment failed due to
java.lang.OutOfMemoryError: Java heap space
        at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
        at java.lang.AbstractStringBuilder.append(Unknown Source)
        at java.lang.StringBuilder.append(Unknown Source)
        at java.net.URLStreamHandler.parseURL(Unknown Source)
        at sun.net.www.protocol.file.Handler.parseURL(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.getManifestC
lassPath(UrlResourceFinder.java:286)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.rebuildClass
Path(UrlResourceFinder.java:215)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.getClassPath
(UrlResourceFinder.java:152)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.findResource
(UrlResourceFinder.java:95)
        at org.apache.geronimo.kernel.classloader.JarFileClassLoader$3.run(JarFi
leClassLoader.java:179)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findResourc
e(JarFileClassLoader.java:177)
        at org.apache.geronimo.kernel.config.MultiParentClassLoader.getResource(
MultiParentClassLoader.java:580)
        at org.apache.geronimo.kernel.config.MultiParentClassLoader.getResource(
MultiParentClassLoader.java:565)
        at org.apache.xbean.finder.ClassFinder.readClassDef(ClassFinder.java:716
)
        at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:141)
        at org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServ
ices(WARWebServiceFinder.java:154)
        at org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discove
rPOJOWebServices(AdvancedWARWebServiceFinder.java:73)
        at org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discove
rWebServices(AdvancedWARWebServiceFinder.java:45)
        at org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServ
ices(WARWebServiceFinder.java:70)
        at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServ
ices(JAXWSServiceBuilder.java:97)
        at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices
(JAXWSServiceBuilder.java:80)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicIn
itContext(AbstractWebModuleBuilder.java:364)
        at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext
(TomcatModuleBuilder.java:330)
        at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContex
t(SwitchingModuleBuilder.java:159)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurati
on(EARConfigBuilder.java:595)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

How to increase the java heap size? Plz explain me in clear steps..
0
dipinciCommented:
The above error message message of out of memory. To avoid this you can perform Hot deployment.

To Increase heap size for the Java virtual machine you have to configure in the JAVA_OPTS environment Variables.
You can configure in the Windows system properties or you can configure in the startup.bat file inside the $WASCEROOT/bin directory.

Add the below lines

set JAVA_OPTS=-XmsIm -XmxMm

where I is replaced with the initial heap size in megabytes and where M is replaced with the maximum heap size in megabytes.

example= set JAVA_OPTS=-Xms128m -Xmx256m.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VamsiRajuAuthor Commented:
Even in hot deployment also the got the heap memory error. I just added the JAVA_OPTS variable to the system variables. Now the error is not occuring. Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.