Problem running servlet using PJA tools

Hi
I am trying to run the TeksSurveyPie servlet from the PJA Package.But everytime i run it says
Internal error: Unexpected error condition thrown (java.lang.NoClassDefFoundError: TeksSurveyPie (wrong name: com/eteks/servlet/TeksSurveyPie),TeksSurveyPie (wrong name: com/eteks/servlet/TeksSurveyPie)), stack: java.lang.NoClassDefFoundError: TeksSurveyPie (wrong name: com/eteks/servlet/TeksSurveyPie)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:495)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:110)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$1(URLClassLoader.java:217)
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:192)
at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:290)
at java.lang.ClassLoader.loadClass(ClassLoader.java:256)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:629)
at com.iplanet.server.http.servlet.NSServletLoader.findClass(NSServletLoader.java:152)
at com.iplanet.server.http.servlet.NSServletLoader.loadClass(NSServletLoader.java:108)
at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:337)
at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:427)
I am tryin to access the servlet like this
https://avenger/servlet/TeksSurveyPie?survey=Yes
Pls tell me where i am going wrong...????Its preety urgent ....
thanks
prabhu

the servlet is as below for reference .....
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import javax.servlet.ServletConfig;
import javax.servlet.UnavailableException;
import java.io.IOException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Properties;
import java.util.Vector;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.StringTokenizer;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.Frame;
import java.awt.AWTError;
import java.awt.Image;
import java.awt.image.FilteredImageSource;
import Acme.JPM.Encoders.GifEncoder;
import com.eteks.filter.Web216ColorsFilter;
import com.eteks.awt.servlet.PJAServlet;
* This servlet manages in a simple way a dynamic survey and returns the pie of the survey.
* It can be called in either ways :
* <UL><LI><code>.../servlet/com.eteks.servlet.TeksSurveyPie?survey=mySurvey&answer=myAnswer</code>
* adds the answer <code>myAnswer</code> to the survey <code>mySurvey</code>,
* and then returns the pie of the current state of <code>mySurvey</code>.
* <LI><code>.../servlet/com.eteks.servlet.TeksSurveyPie?survey=mySurvey</code>
* simply returns the pie of the current state of <code>mySurvey</code>.</UL>
* <P>To be platform independant, the servlet uses <code>com.eteks.awt.servlet.PJAServlet</code> as super class,
* to have at disposal an image into which graphics operation can be performed.<BR>
* <code>com.eteks.awt.PJAServlet</code> class and depending classes of <code>com.eteks.awt</code> packages
* must be in the servlet engine classpath, and at least one .pjaf font file (Pure Java AWT Font) must exist
* in the user directory or in the directory set in the <code>java.awt.fonts</code> system property,
* if JVM version <= 1.1.<BR>
public class TeksSurveyPie extends PJAServlet
Properties surveysParam = new Properties ();
String fontsDir = ""; // Default value for "java.awt.fonts" .pjaf fonts directory initParameter
String surveysFile = fontsDir + File.separator + "survey.txt"; // Default value for survey file initParameter
// Colors used to fill the pie
final Color colors [] = {Color.blue,
Color.green,
Color.red,
Color.cyan,
Color.magenta,
Color.gray,
Color.yellow,
Color.pink,
Color.orange,
Color.white};
final Color penColor = Color.black;
public void initPJA (ServletConfig config) throws ServletException
// Store the ServletConfig object and log the initialization
super.initPJA (config);
// Retrieves surveys file path
String param = getInitParameter ("surveysFile");
if (param != null)
surveysFile = param;
param = getInitParameter ("fontsDir");
if (param != null)
fontsDir = param;
FileInputStream in = null;
try
in = new FileInputStream (surveysFile);
surveysParam.load (in);
catch (IOException e)
{ } // Empty properties
finally
try
if (in != null)
in.close ();
catch (IOException ex)
public void destroyPJA ()
try
surveysParam.save (new FileOutputStream (surveysFile), "Survey file");
catch (IOException e)
{ } // Properties can't be saved
public String getFontsPath ()
return super.getFontsPath () + File.pathSeparator
+ fontsDir;
public void doPostPJA (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
doGetPJA (request, response);
public void doGetPJA (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
String survey = request.getParameter ("survey"); // Survey name
String answer = request.getParameter ("answer"); // Proposed answer
String paramWidth = request.getParameter ("width");
String paramHeight = request.getParameter ("height");
int width = paramWidth == null ? 200 : Integer.parseInt (paramWidth);
int height = paramHeight == null ? 100 : Integer.parseInt (paramHeight);
// v1.1 : Changed code to enable image creation
// even if PJAToolkit couldn't be loaded by Toolkit.getDefaultToolkit ()
Image image = createImage (width, height);
if (survey == null)
survey = "";
if (answer != null)
String key = survey + "_" + answer;
String value = surveysParam.getProperty (key);
if (value != null)
// If the answer already exists, increase its value
surveysParam.put (key, String.valueOf (Integer.parseInt (value) + 1));
else
String surveyAnswers = surveysParam.getProperty (survey);
// Add this answer to the other ones
if (surveyAnswers == null)
surveysParam.put (survey, answer);
else
surveysParam.put (survey, surveyAnswers + "," + answer);
surveysParam.put (key, "1");
Hashtable answers = new Hashtable ();
Vector sortedAnswers = new Vector ();
synchronized (surveysParam)
String surveyAnswers = surveysParam.getProperty (survey);
if (surveyAnswers != null)
for (StringTokenizer tokens = new StringTokenizer (surveyAnswers, ",");
tokens.hasMoreTokens (); )
String token = tokens.nextToken ();
int answerCount = Integer.parseInt (surveysParam.getProperty (survey + "_" + token));
answers.put (token, new Integer (answerCount));
// Seek the good place to insert this element
int i;
for (i = 0; i < sortedAnswers.size (); i++)
if (answerCount > ((Integer)answers.get (sortedAnswers.elementAt (i))).intValue ())
break;
sortedAnswers.insertElementAt (token, i);
// Compute the pies of the survey
drawSurveyPies (image, answers, sortedAnswers, width, height);
// Send generated image
sendGIFImage (image, response);
* Generates a GIF image on the response stream from image.
public void sendGIFImage (Image image, HttpServletResponse response) throws ServletException, IOException
// Set content type and other response header fields first
response.setContentType("image/gif");
// Then write the data of the response
OutputStream out = response.getOutputStream ();
try
new GifEncoder (image, out).encode ();
catch (IOException e)
// GifEncoder may throw an IOException because "too many colors for a GIF" (> 256)
// were found in the image
// Reduce the number of colors in that case with Web216ColorsFilter basic filter
new GifEncoder (new FilteredImageSource (image.getSource (),
new Web216ColorsFilter ()),
out).encode ();
out.flush ();
private void drawSurveyPies (Image image,
Hashtable answers,
Vector sortedAnswers,
int width,
int height)
Graphics gc = image.getGraphics ();
// Draw a shadow
gc.setColor (penColor);
gc.fillOval (1, 1, height - 3, height - 3);
gc.fillOval (2, 2, height - 3, height - 3);
// Compute the sum of all values
int sum = 0;
for (Enumeration e = answers.elements ();
e.hasMoreElements (); )
sum += ((Integer)e.nextElement ()).intValue ();
for (int accum = 0, i = 0, deltaY = 0; i < sortedAnswers.size (); i++, deltaY += 15)
int answerValue = ((Integer)answers.get (sortedAnswers.elementAt (i))).intValue ();
int startAngle = accum * 360 / sum;
int angle = answerValue * 360 / sum;
// Fill the anwser pie
gc.setColor (colors [i % colors.length]);
gc.fillArc (0, 0, height - 3, height - 3, startAngle, angle);
// Draw a separating line
gc.setColor (penColor);
gc.drawLine ((height - 3) / 2, (height - 3) / 2,
(int)((height - 3) / 2. * (1 + Math.cos (startAngle / 180. * Math.PI)) + 0.5),
(int)((height - 3) / 2. * (1 - Math.sin (startAngle / 180. * Math.PI)) + 0.5));
accum += answerValue;
if (deltaY + 15 < height)
// Add a comment
gc.setColor (colors [i % colors.length]);
gc.fillRect (height + 6, deltaY + 1, 13, 10);
gc.setColor (penColor);
gc.drawRect (height + 5, deltaY, 14, 11);
// Draw is done with default font
gc.drawString (String.valueOf (100 * answerValue / sum) + "% " + (String)sortedAnswers.elementAt (i),
height + 22, deltaY + 9);
gc.drawLine ((height - 3) / 2, (height - 3) / 2, height - 3, (height - 3) / 2);
// Draw a surrounding oval
gc.drawOval (0, 0, height - 3, height - 3);
Thx
prabhu

Similar Messages

  • Problems running servlet due to missing classes?

    Hi everyone,
    I am doing a project which requires me to convert a java coding into a servlet. This java coding I am working on is some kind of location based service which tracks people (receiving an argument of a string as IP). It imports an external SDK called Ekahau SDK (some off the shelve product). Now I wish to convert it into a servlet so that the function that the java coding performs can be run from a webpage i created.
    I have previously posted a thread on this forum called "Converting java coding into servlets?" when I had trouble compiling the servlet. Now that I could compile the servlet already, I still have problems running the servlet from my browser.
    The webserver I am using is Apache Tomcat. Previously I was trying Apache HTTP server but since now I need to use servlet, I have shifted to Tomcat instead. I have been getting these "java.lang.NoClassDefFoundError:" when running the servlet from the browser. From the previous thread, I got suggestions from the replies saying that I need to put the jar files I need into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory. I have been looking for the missing jar files from the internet and putting them into my "C:\Tomcat\webapps\try\WEB-INF\lib", but each time after adding a new jar file, I get another new "java.lang.NoClassDefFoundError:". Are the missing jar files really the problems? Cause it seems a bit weird to me that I need some many jar files which I dont even know why I need them for.
    The HTTP status 500 error look like this:
    description
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: org/apache/excalibur/configuration/CascadingConfiguration
    com.ekahau.G.N.A(Unknown Source)
    com.ekahau.G.N.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.D.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.E.connect(Unknown Source)
    com.ekahau.sdk.PositioningEngine.connect(Unknown Source)
    coreservlets.testing.find(testing.java:75)
    coreservlets.testing.doGet(testing.java:36)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Here are the series of jar files I have been looking from the internet to add them into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory:
    1) org/apache/commons/collections/Closure
    2) org/apache/log4j/Logger
    3) org/apache/commons/lang/Validate
    4) org/apache/excalibur/configuration/CascadingConfiguration
    Please help~~ Thanks a lot.
    My servlet coding is like this:
    package coreservlets;
    import java.io.*;
    import java.util.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.ekahau.sdk.*;
    public class testing extends HttpServlet
         String ipAddress;
         int result;
           public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  ipAddress = request.getParameter("deviceIP");
              try
                   result = find();     
              catch (IOException e)
                   System.out.println("Error..." + e.toString());
              catch (EngineException e)
                   System.out.println("Error..." + e.toString());
              response.setContentType("text/html");
                  PrintWriter write = response.getWriter();
              write.println("<HTML>\n" +
    "<HEAD><TITLE>Tryget</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    result +
    "</BODY></HTML>");
           public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  doGet(request, response);
         public int find() throws EngineException, IOException
              PositioningEngine.connect();
                  // Find the given device:
                  Device[] devices = PositioningEngine.findDevice("NETWORK.IP-ADDRESS", ipAddress);
                  if (devices.length == 0)
                         System.err.println("Device with IP address " + ipAddress + " not found.");
                   PositioningEngine.disconnect();
                   return 0;
              else
                         TrackedDevice device = new TrackedDevice(devices[0]);
                         // Create a simple handler for locations for one-time usage:
                         LocationEstimateListener estimateListener = new LocationEstimateListener()
                           public void handleLocationEstimate(LocationEstimate locationEstimate, TrackedDevice device)
                                  // Change getLatestLocation to getAccurateLocation if you want
                                  // a bit more accurate but a few seconds delayed location.
                                  Location loc = locationEstimate.getLatestLocation();
                             final double coX = loc.getX();
                             final double coY = loc.getY();
                             try{
                             FileWriter file = new FileWriter ("C:\\Documents and Settings\\xamule\\Desktop\\Testing\\output\\output.txt");
                             String x = Double.toString(coX);
                             String y = Double.toString(coY);
                             String coor = x + "\t" + y;
                             file.write(coor);
                             file.close();
                             catch (IOException e){
                             System.out.println("Error..." + e.toString());
                   StatusListener statusListener = new StatusListener()
                           public void handleStatus(Status status, TrackedDevice device)
                                  System.err.println(new Date()+"\tStatus for device: " + status);
                         // Add listeners and start tracking
                         device.addLocationEstimateListener(estimateListener);
                         device.addStatusListener(statusListener);
                         device.setTrackingParameter("EPE.LOCATION_UPDATE_INTERVAL","6000");
                         device.setTracking(true);
                         // Wait until user inputs something. When he/she does, stop tracking and quit application
                         //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                         //in.readLine();
                         // Stop tracking and disconnect from the positioning engine:
                         device.setTracking(false);
                         PositioningEngine.disconnect();
                   return 1;
    }

    Well, it's kind of logical that as you put more jar files (classes) in Tomcat, it changes the error to ask for the classes (inside a jar) it cannot find.
    There was a good class->jar finder on the internet some years ago, but i don't remember the address. Try looking for that and search all the missing classes (NotDefined) and their correspondig jar files.
    Good Luck!

  • Drastic problems running Forms using JavaPlugin

    I'm facing some problems running my Forms application using JRE/JPI. My Forms version is 10g release 1 and JRE version is 1.4.2_13. I've upgraded my Application Server with patch to make it run smoothly with JRE. Patch ID is p4948949_9043_WINNT (patch 3). So my upgraded Forms version is 9.0.4.3.
    Problems are as follows:
    ** There's a problem in Font, it's not appearing on application as configured. So I want to unistall the patch and restore my Forms version to previous version but I don't know how to uninstall this patch.
    ** Another issue which seems to be JRE related problem is I can't use mouse to select control on my Forms running application. I've to press TAB key to navigate through controls such as TEXT_ITEM. When I'm running application using JInitiator, this problem doesn't occur, I can click on any control of Forms , so I think it's JRE related problem.
    Ours is a large scale application...this is why I'm in great problem now. Could someone help me resolve these issues?
    Regards
    Rashed

    Sun has suggested that Oracle bug 5512094 will not be included into a production release until 1.5.0_13. For reasons unknown to us, the fix will not likely make it into _12. Since we are not responsible for their releases, this information may or may not be accurate. You will need to contact Sun for the latest details regarding their releases.
    In the mean time, it is recommended you continue to use the special release you were provided by Oracle Support. However, also ensure that you have installed the latest one-off patches on the server which address several focus issues. Below is a list of the latest based on which version you may be using.
    Forms 9.0.4.3 > Metalink Patch ID# 5750167 (New as of Jan 24, 2007)
    Forms 10.1.2.0.2 > Metalink Patch ID# 5677148
    Forms 10.1.2.2 > Metalink Patch ID# 5750193
    As mentioned, both Oracle and Sun are investigating several other focus issues, so these patches may not correct your issue.
    The best suggestion would be to create a reproducible test case and provide it to Support. This will help Oracle to better determine if your issue is one which we are already aware of or if yours is a new issue.

  • Problem using PJA tools Gif/Image Encoder

    hi
    can someone tell me where i am going wrong ...I am getting the following error after i ran a servlet .
    Internal error: Unexpected error condition thrown (java.lang.NoClassDefFoundError: Acme/JPM/Encoders/ImageEncoder,Acme/JPM/Encoders/ImageEncoder), stack: java.lang.NoClassDefFoundError: Acme/JPM/Encoders/ImageEncoder
    at java.lang.ClassLoader.resolveClass0(Native Method)
    at java.lang.ClassLoader.resolveClass(ClassLoader.java:597)
    at com.iplanet.server.http.servlet.NSServletLoader.loadClass(NSServletLoader.java:114)
    at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:337)
    at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
    at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:427)
    I added both the GifEncoder and ImageEncoder class files to the classpath . Still the same problem ...
    I need some help ..pls..
    prabhu

    Try copying the GifEncoder and ImageEncoder files or the jar file to the app server lib directory.

  • Problems running program using Runtime.exec()

    Hello everyone. I have a quick problem that perhaps someone can help me with... I'm trying to write a frontend for a command line program. I've found plenty of examples for using exec() to launch this program but I can't quite get the effect that I desire. The program itself launches it's own window (using a graphics library called SDL) but the user interacts with the program through the command prompt.
    The problem that I'm having is that my InputStream thread does not seem to execute until I close the SDL window. I've tried about 10 different combinations of threading this application but nothing seems to work.
    Below I've attached some sample code that I found here on the Sun site... The code does as I described before, the InputStream does not display any text until I close the SDL window.
    Can anyone help out?
    import java.io.*;
    // class StreamGobbler omitted for brevity
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    OutputStream os;
    StreamGobbler(InputStream is, String type)
    this(is, type, null);
    StreamGobbler(InputStream is, String type, OutputStream redirect)
    this.is = is;
    this.type = type;
    this.os = redirect;
    public void run()
    try
    PrintWriter pw = null;
    if (os != null)
    pw = new PrintWriter(os);
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    if (pw != null)
    pw.println(line);
    System.out.println(type + ">" + line);
    if (pw != null)
    pw.flush();
    } catch (IOException ioe)
    ioe.printStackTrace();
    public class TestExec
    public static void main(String args[])
    if (args.length < 1)
    System.out.println("USAGE: java TestExec \"cmd\"");
    System.exit(1);
    try
    String cmd = args[0];
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERR");
    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();

    I'm pretty sure, because if you run the application without any parameters you don't get the SDL window, you just get a list of possible command line switches, that part works fine... It just seems that when the SDL window is open, the thread won't grab and display the individual lines until that window is closed, which will not work for my purposes...

  • Problem running reports using webutil in Forms 10g

    This is about 3 dll files related to webutil functionality in forms 10g
    d2kwut60.dll
    jacob.dll
    JNIsharedstubs.dll
    I am running report which is using webutil functionality. So when I try to run report, our application server try to download above dlls to my local machine on path C:\Program Files\Java\jre6\bin
    Due to security policy, our company doesn't allow write access to folder C:\Program Files\Java\jre6\bin and hence report is failing to run.
    We need solution for this issue so that we should be able to run report successfully?
    Details as below:
    Application server : Forms 10g - 10.1.2.3 ( Using Sun jre and not jinitiator). We do not want to use jinitiator
    Browser - IE8

    Curious, typically Java will store these "temporary" files in the cache not in the BIN directory. Unfortunately, the only way I know to change the location of the CACHE (temporary files) directory is through the Java Control Panel applet. Open the Control Panel and start the Java Control Panel. On the General tab click the Settings... button in the Temporary Internet Files section. In the Location section - click the Change button which will bring up a "Temporary Files Location" dialog box. Simply navigate to a directory that your security policy will allow files to be written too.
    The ideal solution would be to push this type of change out to all of your users rather than have to manually change each workstation. I don't know if there is a way to push this change out, but you can check the Java website for more information.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Running Servlet Using ServletRunner(Midlet Connectivity)

    Hi I've made a program that connects a midlet to a servlet for DB connectivity.But when i compile the servlet class it gives error Http servlet not found.I want to ask in which folder of (JSDK2.0) should i keep my servlet file so as to compile it & in which folder should the class file be placed so as to run on the localhost.Please help me as its urgently needed for my project.Thanks.......

    Usually to manage servlet you have to create a WEB-INF directory where to put your web.xml file and a 'classes' sub directory where to put the servlet (.java & .class).

  • Running servlet using Tomcat

    I have installed tomcat4.1.12..Ihave set up the environment variables also.
    set JAVA_HOME=C:\j2sdk1.4.0_02;
    set CATALINA_HOME=C:\jakarta-tomcat-4.1.12;
    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%CATALINA_HOME%\jakarta-tomcat-4.1.12\common\lib\servlet.jar;
    When i try to start tomcat its showing the following error .
    CATALINA_HOME ENVIRONMENT IS NOT DEFINED PROPERLY.
    Can anyone please tell me whats going on..?
    thanks in advance
    iby

    set JAVA_HOME=C:\j2sdk1.4.0_02;
    set CATALINA_HOME=C:\jakarta-tomcat-4.1.12;what are those semicolons doing there? Win2K (guessing from C:\ and backslashes) actually takes them as part of the environment variable. And your directories are probably not named "C:\j2sdk1.4.0_02;" and "C:\jakarta-tomcat-4.1.12;"???

  • Running OpenOffice using X11?

    I have a couple of problems running OpenOffice using X11 with Leopard 10.5.1. When I try to start OpenOffice from the dock, it opens an X11 window but then says "Command timed out." before launching OpenOffice. OpenOffice then launches when I click "O.K." in the message window but the wizards (e.g., fax wizard in Writer) don't work. I get a message saying, "OpenOffice.org requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart OpenOffice.org." I thought I had a JRE installed with Leopard. No?
    Any help with either of these issues would be greatly appreciated. I'm trying to get away from MS Word and like that OpenOffice is free and available in the Windows platform as well. Thanks.

    It's an X11 issue.
    See this article:
    http://homepage.mac.com/sao1/X11/index.html
    I installed the lastest version of xquartz - http://trac.macosforge.org/projects/xquartz
    but it did not help much with open office.
    For now NeoOffice 2.2.2 patch 8 is the cat's meow.
    http://www.neooffice.org/neojava/en/index.php

  • UNIX: problem running an DEV & QA environment using form/report servlets

    UNIX: problem running an DEV & QA environment using form/report servlets
    I am trying to setup on one server an DEV and QA environment using the Forms Servlet, Forms Listener Servlet and Report Servlet.
    I think I have the Forms Servlet and Forms Listener Servlet running properly. The problem is setting up the DEV and QA environment for running reports.
    For example, when in DEV environment I would like to run a report from a directory specified in the REPORTS60_PATH. This doesn't seem possible.
    It might be easier if I describe my configuration first:
    DEV: run all forms and reports from the directory /data/release/dev
    QA: run all forms and reports from the directory /data/release/qa
    ---DEV & QA Settings Forms Listener Servlet:
    zone.properties:
    # DEV
    servlet.fl60dev.code=oracle.forms.servlet.ListenerServlet
    servlet.fl60dev.initArgs=EnvFile=/u01/app/oracle/product/ias/6iserver/forms60/server/dev.env
    # QA
    servlet.fl60qa.code=oracle.forms.servlet.ListenerServlet
    servlet.fl60qa.initArgs=EnvFile=/u01/app/oracle/product/ias/6iserver/forms60/server/qa.env
    ---DEV & QA Settings Forms Servlet:
    servlet.f60servlet.code=oracle.forms.servlet.FormsServlet
    --- Settings for Reports Servlet:
    servlet.RWServlet.code=oracle.reports.rwcgi.RWServlet
    Custom Env files since we are using Developer 6i Patch 7
    dev.env and qa.env
    Here I specify FORMS60_PATH and REPORTS60_PATH,
    eg: DEV -> FORMS60_PATH=/data/release/dev
    REPORTS60_PATH=/data/release/dev
    likewise for QA ../qa
    In the formsweb.cfg file i have something like:
    [dev]
    serverURL=/servlet/fl60dev
    form=test.fmx
    [qa]
    serverURL=/servlet/fl60dev
    form=test2.fmx
    I have tested the following and they work without problems:
    1. forms listener test page, eg: http://webserver:7777/servlet/fl60dev
    2. running forms from the 2 environments
    eg: http://webserver:7777/servlet/f60servlet?config=dev
    this runs the form in the FORMS60_PATH (/data/release/dev)
    Now my problems start with Reports.
    When I run a report from forms (using run_report_object) it will not run any reports
    as specified in the REPORTS60_PATH
    Even using this url:
    http://webserver:7777/servlet/RWServlet?server=rep60&report=test.rdf&destype=cache&desformat=html&
    userid=scott/tiger@test9i
    It NEVER seems to pickup and use the REPORTS60_PATH. I have tried nearly everything.
    I have gone throught the instructions in "Integrating Oracle9iAS Reports in Oracle9iAS Forms -
    White Paper"
    (http://otn.oracle.com/products/forms/pdf/277282.pdf)
    and Forms6i Patch 7: Oracle Forms Listner Servlet for Deployment of FOrms on the Internet
    (http://otn.oracle.com/products/forms/pdf/p7listenerservlet.pdf)
    plus any other documents in metalink relating to forms, or report servlets. I am
    totally confused, please help.
    I have tried setting the REPORTS60_PATH in the following files without success:
    custom.env (as specified by initArgs=EnvFile in zone.properties)
    jserv.properties
    in the zone.properties I have tried to set a custom env file for the report servlet:
    servlet.RWServlet.code=oracle.reports.rwcgi.RWServlet
    servlet.RWServlet.initArgs=EnvFile=/u01/app/oracle/product/ias/6iserver/forms60/server/dev_rep.env
    NO LUCK.
    The only place that I can set the REPORTS60_PATH
    is in "[6iserver home]/reports60_server" file when I start the reports server (did I even
    get this right - I do have to have a reports server running don't I?)
    Does this meaan I have to run multiple report servers for each of my environments?
    Based on all the documentation I thought that REPORTS60_PATH as specified in the files relating
    to the forms servlet would be the place to specify the path.
    As you will understand I am getting really fustrated with this and it seems to
    me that the reports servlet configuration in 6i is really half baked and since 9i
    is coming out it will never be fixed.

    I am even not able to run forms servlets from two different forms60_path, Is there any configuration do you make other than what you have mentioned in this post.
    I already open a TAR in this regard, I am still waiting reply from ORACLE.
    Thanks,
    Shaik Ather Ahmed

  • Unable to run Servlet program using J2EE SDK

    Hello,
    i am a newbie to all this j2ee stuff and servlets even.so the problem that i have maybe a very common one and i hope that most of you may have a fix to it...
    i use J2EE SDK to compile and run Servlet programs.I have a Servlet program with the class name defined as
    public class MyServlet extends HttpServlet ....
    the file is stored as MyServlet.java
    i set the CLASSPATH variable so that the required classes for the compilation of the program can be located.
    the program compiles without any glitches.
    However when i run the program by saying
    java MyServlet
    ( i dont think its any different to run servlet code is it?)
    i get the message
    java.lang.NoClassDefFoundException:MyServlet
    Can someone suggest a remedy?
    thank you
    -NDK

    First, I don't understand what you are trying to do. Running a servlet ?
    Servlets are ran by an application server ! (Apache Tomcat ....).
    Second, is your class in any package ?

  • How to run servlet by using main?

    How can I use main to run servlet?
    I cannot put request and response object into doGet(request, response) method
    I want this because I want to run this servlet daily and I plan to put it in cron job
    Calvin

    Hi
    Perhaps you cannot run servlet without using browser. But you can make that program as an application in order to run in Dos or Unix shell.
    But still you can run servlet without using browser How?
    You can debug servlets with the same jdb commands you use to debug an applet or an application. The JavaTM Servlet Development Kit (JSDK) provides a standalone program
    called servletrunner that lets you run a servlet without a web browser. On most systems, this program simply runs the java sun.servlet.http.HttpServer command. You
    can, therefore, start a jdb session with the HttpServer class.
    A key point to remember when debugging servlets is that Java Web server and servletrunner achieve servlet loading and unloading by not including the servlets directory on
    the CLASSPATH. This means the servlets are loaded using a custom classloader and not the default system classloader.
    Running servletrunner in Debug Mode
    Running Java Web ServerTM in Debug Mode
    Running servletrunner in Debug Mode
    In this example, the servlets examples directory is included on the CLASSPATH. You can configure the CLASSPATH for debug mode as follows:
    Unix
    $ export CLASSPATH=./lib/jsdk.jar:./examples:$CLASSPATH
    Windows
    $ set CLASSPATH=lib\jsdk.jar;examples;%classpath%
    To start the servletrunner program you can either run the supplied startup script called servletrunner or just supply the servletrunner classes as a parameter to jdb. This
    example uses the parameter to servletrunner.
    $ jdb sun.servlet.http.HttpServer
    Initializing jdb...
    0xee2fa2f8:class(sun.servlet.http.HttpServer)
    > stop in SnoopServlet.doGet
    Breakpoint set in SnoopServlet.doGet
    > run
    run sun.servlet.http.HttpServer
    running ...
    main[1] servletrunner starting with settings:
    port = 8080
    backlog = 50
    max handlers = 100
    timeout = 5000
    servlet dir = ./examples
    document dir = ./examples
    servlet propfile = ./examples/servlet.properties
    To run SnoopServlet in debug mode, enter the following URL in a browser where yourmachine is the machine where you started servlet runner and 8080 is the port number
    displayed in the settings output.
    http://yourmachine:8080/servlet/SnoopServlet
    In this example jdb stops at the first line of the servlet's doGet method. The browser will wait for a response from your servlet until a timeout is reached.
    main[1] SnoopServlet: init
    Breakpoint hit: SnoopServlet.doGet (SnoopServlet:45)
    Thread-105[1]
    We can use the list command to work out where jdb has stopped in the source.
    Thread-105[1] list
    41 throws ServletException, IOException
    42 {
    43 PrintWriter out;
    44
    45 => res.setContentType("text/html");
    46 out = res.getWriter ();
    47
    48 out.println("<html>");
    49 out.println("<head>
    <title>Snoop Servlet
    </title></head>");
    Thread-105[1]
    The servlet can continue using the cont command.
    Thread-105[1] cont
    Running Java Web Server in Debug Mode
    The JSDK release does not contain classes available in the Java Web server and it also has its own special servlet configuration. If you cannot run your servlet from
    servletrunner, then the other option is to run the Java Web server in debug mode.
    To do this add the -debug flag for the first parameter after the java program. For example in the script bin/js change the JAVA line to look like the following. In releases prior
    to the Java 2 platform release, you will also need to change the program pointed to by the variable $JAVA to java_g instead of java.
    Before:
    exec $JAVA $THREADS $JITCOMPILER $COMPILER $MS $MX \
    After:
    exec $JAVA -debug $THREADS $JITCOMPILER
    $COMPILER $MS $MX \
    Here is how to remotely connect to the Java Web Server. The agent password is generated on the standard output from the Java Web Server so it can be redirected into a file
    somewhere. You can find out where by checking the Java Web Server startup scripts.
    jdb -host localhost -password <the agent password>
    The servlets are loaded by a separate classloader if they are contained in the servlets directory, which is not on the CLASSPATH used when starting the Java Web server.
    Unfortunately, when debugging remotely with jdb, you cannot control the custom classloader and request it to load the servlet, so you have to either include the servlets
    directory on the CLASSPATH for debugging or load the servlet by requesting it through a web browser and then placing a breakpoint once the servlet has run.
    In this next example, the jdc.WebServer.PasswordServlet is included on the CLASSPATH when Java Web server starts. The example sets a breakpoint to stop in the service
    method of this servlet, which is the main processing method of this servlet.
    The Java Web Server standard output produces this message, which lets you proceed with the remote jdb session:
    Agent password=3yg23k
    $ jdb -host localhost -password 3yg23k
    Initializing jdb...
    > stop in jdc.WebServer.PasswordServlet:service
    Breakpoint set in jdc.WebServer.PasswordServlet.service
    > stop
    Current breakpoints set:
    jdc.WebServer.PasswordServlet:111
    The second stop lists the current breakpoints in this session and shows the line number where the breakpoint is set. You can now call the servlet through your HTML page. In
    this example, the servlet is run as a POST operation
    <FORM METHOD="post" action="/servlet/PasswordServlet">
    <INPUT TYPE=TEXT SIZE=15 Name="user" Value="">
    <INPUT TYPE=SUBMIT Name="Submit" Value="Submit">
    </FORM>
    You get control of the Java Web Server thread when the breakpoint is reached, and you can continue debugging using the same techniques as used in the Remote Debugging
    section.
    Breakpoint hit: jdc.WebServer.PasswordServlet.service
    (PasswordServlet:111) webpageservice Handler[1] where
    [1] jdc.WebServer.PasswordServlet.service
    (PasswordServlet:111)
    [2] javax.servlet.http.HttpServlet.service
    (HttpServlet:588)
    [3] com.sun.server.ServletState.callService
    (ServletState:204)
    [4] com.sun.server.ServletManager.callServletService
    (ServletManager:940)
    [5] com.sun.server.http.InvokerServlet.service
    (InvokerServlet:101)
    A common problem when using the Java WebServer and other servlet environments is that Exceptions are thrown but are caught and handled outside the scope of your servlet.
    The catch command allows you to trap all these exceptions.
    webpageservice Handler[1] catch java.io.IOException
    webpageservice Handler[1]
    Exception: java.io.FileNotFoundException
    at com.sun.server.http.FileServlet.sendResponse(
    FileServlet.java:153)
    at com.sun.server.http.FileServlet.service(
    FileServlet.java:114)
    at com.sun.server.webserver.FileServlet.service(
    FileServlet.java:202)
    at javax.servlet.http.HttpServlet.service(
    HttpServlet.java:588)
    at com.sun.server.ServletManager.callServletService(
    ServletManager.java:936)
    at com.sun.server.webserver.HttpServiceHandler
    .handleRequest(HttpServiceHandler.java:416)
    at com.sun.server.webserver.HttpServiceHandler
    .handleRequest(HttpServiceHandler.java:246)
    at com.sun.server.HandlerThread.run(
    HandlerThread.java:154)
    This simple example was generated when the file was not found, but this technique can be used for problems with posted data. Remember to use cont to allow the web server
    to proceed. To clear this trap use the ignore command.
    webpageservice Handler[1] ignore java.io.IOException
    webpageservice Handler[1] catch
    webpageservice Handler[1]
    I hope this will help you.
    Thanks
    Bakrudeen

  • Problem in using WSDL2Java tool in axis

    Hi all,
    When we make our Webservices in Apache Axis at Server,the first step is to generate the WSDL file by using Java2WSDL tool and passing the interface and ip address of server as argument.For example,
    org.apache.axis.wsdl.Java2WSDL -o AddService.wsdl -l"http://127.0.0.1:8080/axis/services/AddService" -n AddService
    Then we use WSDL2Java to generate java files and write our code there.
    My problem is that I do not know what will be the IP address of the machine where this service will be deployed.So is there any way so that we can make all the java files in our application but provide the ip address during deployment.

    I was able to compile and build the codes in j2eetutorials14 recently. Now after few days I need to compile the code again .
    But when I am running 'asant build' command as given i tutorials I am getting ''asant' is not recognized as an internal or external command,
    operable program or batch file." error.
    I am not able to find out why suddenly asant is not available???
    Any pointers will be highly appreciated.
    Thanks

  • I am unable to view google ads running alongside and under videos on YouTube. This is only a problem when I use Firefox. If I use another browser, I can see the ads. I do not have adlock as it does not appear in my plug-ins/add ons. Please help..

    I have been using Firefox for about two years. For about a month now I have been unable to view any Google advertisements that run on YouTube pages alongside and under videos. This is important for my business. I would like to stay with Firefox, but this is only a problem when I use Firefox and is not a problem with Internet Explorer or Google Chrome as I checked. I tried uninstalling Firefox and all plugs ins and add ons and then reinstalling it. This did not work. Firefox seems to be blocking the Google codes that enable the ads to run on the pages. I look forward to your help. Thank you.

    CS2 is very old and reached its "end of life" a while back.  So probably won't run on modern operating systems.  If you can still run it, you'll need to uninstall what you have and re-install with the download link below to activate it.
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Nancy O.

  • A problem with servlet  mapping , using a servlet to produce some chart in

    Hi
    Thank you for reading my post.
    My problem is about using a Chart library which works well in jsf application but it does not works in JSF portlets.
    I think i find the problem but i do not know the solution.
    to use this charting library we should add a servlet to web.xml
    something like :
    <servlet>
    <servlet-name>Jenia internal servlet</servlet-name>
    <servlet-class>org.jenia.faces.util.Servlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Jenia internal servlet</servlet-name>
    <url-pattern>/jenia4faces/*</url-pattern>
    </servlet-mapping>
    so , when we try to load a chart , it will make the chart image source
    something like
    http://localhost:28080/Adv/jenia4faces/chart/OAReport.jspBarChart3d_id0.png
    in the above sample , adv is the name of web application which is
    deployed in a servlet container.
    and filter applied to make the chart render-able.
    to use the chart library in jsf portlet , i add the servlet
    description as i did for web application , so i add
    <servlet>
    <servlet-name>Jenia internal servlet</servlet-name>
    <servlet-class>org.jenia.faces.util.Servlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Jenia internal servlet</servlet-name>
    <url-pattern>/jenia4faces/*</url-pattern>
    </servlet-mapping>
    to my portlet web.xml file.
    when we have portlet , the url to access that portlet (which indeed is a
    web application) changes
    for example
    url for a sample portlet with same web application name
    will be like
    http:// localhost:28080/pluto/portal/Adv/
    as you can see there are some prefix to web application name in the url
    , but when i use chart component to show
    same chart , it still look for the chart in url like :
    http://localhost:28080/Adv/jenia4faces/chart/OAReport.jspBarChart3d_id0.png
    As you may already sugest , the image will not render because browser is
    looking in wrong place.
    now i
    think if i find some way to map that servlet to correct url
    pattern it will works.
    my question is :
    1-what will be new servlet url pattern ?
    2-is my assumption correct ?
    Thank you very much for reading such a long post

    i wrote an app i.e servlet which would select the data from the database and retrive the data.but i want to send this data to normal java file(which is not a servlet) and i want to display results in the normal java file.
    can any body help this concept........
    send me mail:[email protected]

Maybe you are looking for