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
Related Tutorials/Questions & Answers:
servlet with weblogicservlet 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.1Servlet 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 - EJBWeblogic How can i download the
weblogic sever of application develop could u provide the link for that. Hi friend,
Download the
weblogic sever of application visit to :
http://www.roseindia.net/javabeans
weblogic serverweblogic 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
weblogic 9.1 - WebSevicesweblogic 9.1 How to working on
weblogic server ??? how to deploy on
weblogic server ???? how to retrieve data for te server ???? differt bettw
weblogic 8.1 ,9.1 & 10
websphere vs weblogicwebsphere vs weblogic websphere vs
weblogic
Why you are using websphere instead of
weblogic Related to weblogic server8.1Related 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.3weblogic 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 portalRegarding
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 - FrameworkWeblogic 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 - JSP-Servletservlet 1.how can i run
servlet program without creating html and xml program on
tomcat 5.0?
2.how to use
weblogic for
servlet WebServices deployment in Weblogic - WebSevicesWebServices deployment in Weblogic Hi, I want to create a service using Axis2 and deploy the service in
Weblogic, along with my application war file. What is the common practice?
Thanks in Advance,
VJ
Weblogic Portal - JSP-Interview QuestionsWeblogic Portal Hi,
Can any please give me the details of
1)
Weblogic portal interview questions & answers ?
2)
Weblogic portal learning step by step websites?
Thanks for your help in advance
WEBLOGIC - Java BeginnersWEBLOGIC DEAR SIR,
HOW TO RUN THE PROGRAMS IN
WEBLOGIC AND TELL HOW TO GIVE ENVIRONMENTAL PATH IN CPNTROLPANNEL. Hi Friend,
Please visit the following link:
http://www.roseindia.net/javabeans/javabeans.shtml
Mockstrutstest case in Weblogic - MavenMockstrutstest case in Weblogic Hello All,
I'm testing junits with Maven 2 using MockStrutsTestCase.
The web.xml file is not loading even after I set the
servlet config file with setServletConfigFile.
I get the follwoing
Weblogic Hot Deployment - Development processWeblogic Hot Deployment How to do auto-deployment on
weblogic 9.2... to restart the
Weblogic server, whcih I dont like doing.
My problem is, that I... in
Weblogic only for "CoreBO.jar"
Thanks in advance .
Amit Jain http
Weblogic Training
Weblogic Training
Description of BEA
Weblogic Application Server
BEA
WebLogic is a Server... advanced J2EE 1.3
features.
ADS_TO_REPLACE_1
Weblogic Training
ServletServlet how to navigate one
servlet page to another
servlet page
servletservlet is there any way to include pdf's in
servlet servletservlet How many times the
servlet is accessed
Workshop for WebLogic 10.1 Workshop for
WebLogic 10.1
BEA Workshop for
WebLogic 10.1 offers nothing less than
the #1 Commercial Eclipse-based IDE for BEA
WebLogic Service-Oriented