wood burning stoves
The moose likes Servlets and the fly likes Error while deploying Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error while deploying " Watch "Error while deploying " New topic

Error while deploying

Gautam Dembla

Joined: Mar 23, 2005
Posts: 9
I am using an older version of JDK and J2EESDK
Starting Deployment tool, version 1.3.1
(Type 'deploytool -help' for command line options.)

C:\>j2ee -version
Java 2 Enterprise Edition version 1.3.1, build 1.3.1-b17

C:\>java -version
java version "1.3.1_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_11-b02)
Java HotSpot(TM) Client VM (build 1.3.1_11-b02, mixed mode)

deployment error java.rmi.ServerException:RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: An error was encountered while loading a web component.

Its a very basic Servlet code i have written, wanted to know if my deployment procedure was wrong that i got this error.

The Servlet Code succesfully compiled, the code is as follows:

import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class hitcountservlet extends HttpServlet
static int count;
public void init(ServletConfig config) throws ServletException
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
PrintWriter out=response.getWriter();
public String getServletInfo()
return "basic servlet info";
Pavel Cherkashin
Ranch Hand

Joined: Mar 04, 2005
Posts: 47
Looks like there is some external problem:
1 May be your j2ee server has already installed web applications. And on server startup one of them can throw this exception.
2 May be your deploytool environment has existent projects.
3 It will be better to you to not use deploytool, use ANT Click hereto regard

I have no clear idea.
Where have you got this exception? Describe more precisely your steps to reproduce this error.

Pavel Cherkashin - <br />SCJP, SCWCD, SCDJWS, SCBCD, SCEA, ...<br />www.linkedin.com/in/pcherkas
Gautam Dembla

Joined: Mar 23, 2005
Posts: 9
How tedious is it to use Ant, alternatively i m trying to use the Deploytool for Application Server 8,
I cant figure out what to put in the context root, conventionally i would put the path of the Public_html folder but in this setup (j2eesdk-1_4_01_2005Q1-windows), it doesnt give me any public_html folder.
If you could help me with what should be in the context root and if any web context root is to be given?
Thanx & Regards,
Pavel Cherkashin
Ranch Hand

Joined: Mar 04, 2005
Posts: 47
I have not experience with trickful GUI deployment. But the classic
way to deploy application is this:
1. Construct a directory structure of your web application(by hands or write *.bat or *.sh file or use ANT) Here is the doc how to construct the web application.
2. Make war (u can even use zip archiver and change extencion with *.war,
or see Here how to use ANT)
3. Find out where is the directory of your application server, in which to deploy application. This can be done next Way: create some Unique name of Java Class(e.g "OneTwoThreeFourServlet"), deploy simple web application, using deploy tool and then search your filesystem where this file (OneTwoThreeFourServlet.class) will appear
4. Copy the war file to deployment directory and give the command to your AppServer to deploy it.

If any Problems, read: SCWCD Guide, Sun Studio Creator Documentation
I agree. Here's the link: http://aspose.com/file-tools
subject: Error while deploying
It's not a secret anymore!