Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

java.lang.classcastexception

Posted on 2002-05-03
3
Medium Priority
?
780 Views
Last Modified: 2012-06-21
What is this telling me?  Is it saying the java.lang.classcastexception
cannot be found or is it one or more of the others that the java.lang.classcastexception calls that can't be found? Is java.lang.classcastexception not part of the base java package?  What are all those com.ibm.servlet things for?
[5/3/02 16:33:45:814 PDT] 6821c026 WebGroup      X Servlet Error-[CSUHDatabaseConnLoader]: Failed to load servlet: java.lang.ClassCastException: DatabaseConnLoader
     at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:147)
     at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:357)
     at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1172)
     at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:141)
     at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:235)
     at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:144)
     at com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:652)
     at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
     at com.ibm.ws.runtime.Server.startModule(Server.java:617)
     at com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:333)
     at com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:349)
     at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:884)
     at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
0
Comment
Question by:xoxomos
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 6990071
A ClassCastException is part of the base Java package and is throw when an invalid cast is attempted.
From the Javadoc:

Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:


     Object x = new Integer(0);
     System.out.println((String)x);

> What are all those com.ibm.servlet things for?

Thats just the stack trace showing the call stack when the error occurred.

0
 

Author Comment

by:xoxomos
ID: 6990576
The com.ibm.servlet things are from Visual Age java's Websphere Test Environment.  I compiled a bunch of servlets using VAJava then tried moving to WebSphere Application Server.  I get exceptions then have to import these packages from WTE to Websphere to get to the next exception. Finally added entire WTE as part of classpath but now its calling for a method in a class, but the method does not exist in that class.
Got a whole bunch of questions over in the Websphere section you might understand.  Will be putting this out as question later.
Error Message: com.ibm.servlet.engine.webapp.ServletReference: method isJspType()Z not found
Error Code: 500
Target Servlet: null
Error Stack:
java.lang.NoSuchMethodError: com.ibm.servlet.engine.webapp.ServletReference: method isJspType()Z not found
     at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:359)
     at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
     at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
     at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
     
0
 

Author Comment

by:xoxomos
ID: 6990612
The com.ibm.servlet things are from Visual Age java's Websphere Test Environment.  I compiled a bunch of servlets using VAJava then tried moving to WebSphere Application Server.  I get exceptions then have to import these packages from WTE to Websphere to get to the next exception. Finally added entire WTE as part of classpath but now its calling for a method in a class, but the method does not exist in that class.
Got a whole bunch of questions over in the Websphere section you might understand.  Will be putting this out as question later.
Error Message: com.ibm.servlet.engine.webapp.ServletReference: method isJspType()Z not found
Error Code: 500
Target Servlet: null
Error Stack:
java.lang.NoSuchMethodError: com.ibm.servlet.engine.webapp.ServletReference: method isJspType()Z not found
     at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:359)
     at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
     at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
     at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
     
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question