Solved

java.lang.classcastexception

Posted on 2002-05-03
3
739 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 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now