servlet with weblogic
hi everyone....
When I'm running this program on weblogic server8.1
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
class DataInsertion extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter out=res.getWriter();
String url="jdbc:oracle:thin:@localhost:1521:xe";
Connection conn;
ResultSet rs;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn=DriverManager.getConnection(url,"system","oracle");
Statement stmt=conn.createStatement();
String qry="insert into emp values('101','ram','design','12000')";
int i=stmt.executeUpdate(qry);
if(i!=0){
out.println("The record has been updated");
}
else{
out.println("Sorry! Failure");
}
rs=stmt.executeQuery("select * from emp");
while(rs.next()){
out.println(rs.getInt(1)+"\t"+rs.getString(2)+"\t"+rs.getString(3)+"\t"+rs.getInt(4));
}
rs.close();
stmt.close();
conn.close();
}catch(Exception e){
System.out.println(e);
}
}
}
this error shown...
Error 500--Internal Server Error
javax.servlet.ServletException: Servlet class: 'DataInsertion' couldn't be instantiated
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run()Ljava/lang/Object;(ServletStubImpl.java:1108)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(Optimized Method)
at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax/servlet/Servlet;(ServletStubImpl.java:970)
at weblogic.servlet.internal.ServletStubImpl.createInstances()V(ServletStubImpl.java:949)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(Lweblogic/servlet/internal/RequestCallback;)V(ServletStubImpl.java:888)
at weblogic.servlet.internal.ServletStubImpl.getServlet(Lweblogic/servlet/internal/RequestCallback;)Ljavax/servlet/Servlet;(ServletStubImpl.java:598)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:406)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6981)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(Optimized Method)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
plz tell me how i can solve this problem..
Thanks
View Answers
Ads
Related Tutorials/Questions & Answers:
servlet with weblogic
servlet with weblogic hi everyone....
When I'm running this program on
weblogic server8.1
import java.io.*;
import java.sql.*;
import...
javax.servlet.ServletException:
Servlet class: 'DataInsertion' couldn't
Servlet using Weblogic 8.1
Servlet using
Weblogic 8.1 I am developing a simple application in
servlet, Which will accept a name and after produce the name with Welcome Message.
I am using
Weblogic 8.1.
My Html Page is
<html>
<head>
Advertisements
weblogic server
weblogic server as a java developer how much knowledge he has to know about the
weblogic sever,if one know please give me reply
WebLogic is a server software application that runs on a middle tier, between back-end
websphere vs weblogic
websphere vs weblogic websphere vs
weblogic
Why you are using websphere instead of
weblogic
Related to weblogic server8.1
Related to
weblogic server8.1 hi Everybody,
i have write a simple
servlet program and deploy on weblogic8.1 server. when I'm running this app. when...=firstApp,context-path=/firstApp)]:
Servlet class WelcomeServlet for
servlet s1
ModuleNotFoundError: No module named 'weblogic'
ModuleNotFoundError: No module named '
weblogic' Hi,
My Python... '
weblogic'
How to remove the ModuleNotFoundError: No module named '
weblogic... to install padas library.
You can install
weblogic python with following
weblogic portal 10.3
weblogic portal 10.3 Hi ,
Please let me know what are good websites for learning step by step
Weblogic Portal 10.3.
Thanks
Ramanuja
Regarding weblogic portal
Regarding
weblogic portal Hi,
My name is Ramanuja.i am working on
weblogic portal.if u know any info regarding plz provide the materials or information to me.plz help me.
Thanks in advance
Dumps related to weblogic certification
Dumps related to
weblogic certification I want to perform the
weblogic certification exam code 1z0-110. Can anybody please provide me the dumps related to 1z0-110
Thanks in advance
Weblogic portal - Framework
Weblogic portal Hi all,
Please let me know what are good websites for learning step by step
Weblogic Portal 10.3.
Thanks
Manoj Hi Friend,
Please visit the following link:
http://www.roseindia.net
Servlet
Servlet how to navigate one
servlet page to another
servlet page
servlet
servlet is there any way to include pdf's in
servlet
servlet
servlet what are the methods and interfaces in the
servlet api ?
Servlet Tutorials
servlet
servlet what are the all necessary configuration to run a
servlet
servlet
servlet how to interact with a
servlet from a swing program
servlet
servlet I designed 1 html form & a
servlet but when I click on form I don't get output of
servlet Please help
servlet
servlet I designed 1 html form & a
servlet but when I click on form I don't get output of
servlet Please help
servlet
servlet i want to create a login page with
servlet using database mysql? only in
servlet not in jsp plzz help me out
Servlet
override Service method in the
servlet when you extend GenericServlet to create
servlet as it is mandatory to override it. But, when you extend HttpServlet to create a
servlet then you can't override service method as there is a need to override
servlet
servlet i want a program for counting the no of times the
servlet has been invoked
servlet
servlet how to create a login form using
servlet using submit,edit delete button
servlet
servlet dear sir
servlet and html not run on eclips plz help me
servlet
servlet can i stoar record in variable which selected from table in
servlet
servlet
of the
Servlet API. It contains the classes necessary for a standard, protocol-independent
servlet. Every
servlet must implement the
Servlet interface in one
Servlet
Servlet I want to know the steps to write a simple
servlet program... .
Hello Friend,
Follow these steps:
Put
servlet-api.jar inside the lib folder of apache tomcat.
1)create a
servlet.
import java.io.*;
import
Servlet
Servlet Can a user defined function be included in a
servlet? I need information regarding
servlet syntax and not JSP.
Yes, you can create user defined function in Servlets.
Have a look at the following link:
http