The Artima Developer Community
Sponsored Link

Java Answers Forum
ERROR: uncaught servlet exception

2 replies on 1 page. Most recent reply: Oct 20, 2003 9:09 PM by Ari Nirens

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Ari Nirens

Posts: 2
Nickname: anirens
Registered: Oct, 2003

ERROR: uncaught servlet exception Posted: Oct 19, 2003 6:22 PM
Reply to this message Reply
Advertisement
Hi All,

Not to sure if I'm in the right place, so I hope someone here can give me a hand as I'm new to this kind of technology.

I am attempting to use the XML DB functionality of Oracle9i Enterprise
Edition Release 9.2.0.3.0 and was wondering if anyone had any idea as to why
I am getting the below error when attempting to access a (or any!) servlet
via HTTP/URL. (An example of such a method is in Oracle9i XML Database
Developer's Guide - Chapter 20: Writing Oracle XML DB Applications in Java)

In the browser I get an 'internal 500 error' and checking the DB trace file,
this is the message displayed:

========================================
*** 2003-10-16 11:52:44.000
*** SESSION ID:(17.15311) 2003-10-16 11:52:44.000
XDB: Uncaught servlet exception (java.lang.ClassCastException)
java.lang.ClassCastException
at
oracle.xdb.servl et.XDBServletContainer.initServlet(XDBServletContainer.java:
67)
at
oracle.xdb.s ervlet.XDBServletContainer.handleRequest(XDBServletContainer.jav
a:87)
========= ===============================

I have searched EVERYWHERE for info on this error but have come up with
nothing. (including the relevant OTN forums)

Here is an example of a servlet I've been trying to access:

package oracle.otnsamples;

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

public class testserv extends HttpServlet
{

protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{

ServletOutputStream sos = resp.getOutputStream();

sos.println("Testing servlet invocation");

sos.close();

}

}


Any help would be greatly appreciated as I am desperate!!

Thanks in advance,
Ari


Joe Parks

Posts: 107
Nickname: joeparks
Registered: Aug, 2003

Re: ERROR: uncaught servlet exception Posted: Oct 20, 2003 4:49 AM
Reply to this message Reply
I've never used any of the XML DB functionality, but do the servlets to be run with the "XDBServletContainer" perhaps need to extend something other than HttpServlet? Or implement a special interface?
I don't know if the ClassCastException is caused by your code or the container. It happens in the container, but I think that's because it's expecting your code to (apparently) do something special.

If I get a chance, I'll look into it a little more, but post back if you find anything.

Ari Nirens

Posts: 2
Nickname: anirens
Registered: Oct, 2003

Re: ERROR: uncaught servlet exception Posted: Oct 20, 2003 9:09 PM
Reply to this message Reply
Hi Joe,

I'm sure that there's nothing wrong with the code as it has come straight from examples provided by Oracle for use with the XML DB (I've tried more than one piece of code). The OTN crew have confirmed this too and cannot seem to replicate the problem which is on the server/database side.

I'm just clutching at straws here hoping that someone has heard of this "uncaught servlet exception" error!

If you have anymore ideas though, they're much appreciated.

Thanks and Regards,
Ari

Flat View: This topic has 2 replies on 1 page
Topic: substrings Previous Topic   Next Topic Topic: applet display

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use