소스는 이건데요 import java.sql.*;
public class databasetest
{
public static void main(String argv[])
{
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(ClassNotFoundException e)
{
System.out.println(e.getMessage());
}
try
{
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ora81","ora8i","ora8i");
System.out.println(" CONNECTION SUCCESS 추카 짝짝짝");
}
catch(java.lang.Exception ex)
{ ex.printStackTrace();
}
}
}
이런 에러가
http://localhost/servlet/databasetest
하니가 다음 에러가
500 Internal Server Error
The servlet named databasetest at the requested URL
http://localhost:8080/servlet/databasetest
reported this exception: databasetest. Please report this to the administrator of the web server.
java.lang.ClassCastException: databasetest at com.sun.server.ServletManager.instantiateLocalServlet(ServletManager.java:515) at com.sun.server.ServletManager.instantiateServlet(ServletManager.java:474) at com.sun.server.ServletManager.loadServlet(ServletManager.java:689) at com.sun.server.ServletManager.loadServlet(ServletManager.java:606) at com.sun.server.ServletManager.getAndLoadServletState(ServletManager.java:819) at com.sun.server.ServletManager.getAndLoadServletState(ServletManager.java:802) at com.sun.server.ServletManager.callServletService(ServletManager.java:934) at com.sun.server.http.servlet.InvokerServlet.service(InvokerServlet.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423) at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79) at com.sun.server.http.stages.Runner.process(Runner.java:79) at com.sun.server.ProcessingSupport.process(Compiled Code) at com.sun.server.Service.process(Service.java:204) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374) at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at com.sun.server.HandlerThread.run(Compiled Code)
cmd 창에서는
클래스 만들고 나서 그다음에
java databasetest 하니가
정의된 클래스를 찾을수가 없다는 말을 하더군여
저의 클래스패스는 잡았는데
d:\jdk1.3\lib\classes111.zip(oracle jdbc dirver)
왜그런지 몰르겠어요 가르쳐 주세용 ^^
|