• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Error while deploying

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using an older version of JDK and J2EESDK
C:\>deploytool
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
{
super.init(config);
}
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out=response.getWriter();
count++;
out.println("<html>");
out.println("<head><title>BasicServlet</head></title>");
out.println("<body>");
out.println("StringvalueOf(count)");
out.println("</body></html>");
}
public String getServletInfo()
{
return "basic servlet info";
}
}
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gautam Dembla
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
Gautam
 
Pavel Cherkashin
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic