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.*; 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 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
Deploying Servlet in Weblogic 9.2 - Servlet Interview Questions
Deploying Servlet in Weblogic 9.2   Hi Friend thanks in advance, can u give me steps for deploying servlet using weblogic server 9.2
Deploying Servlet in Weblogic 9.2 - Servlet Interview Questions
Deploying Servlet in Weblogic 9.2  Hi Friends, I am new to web.... Generic servlets A servlet extends a server's functionality by offering.... For example, an HTTP servlet may provide a bank customer with details of her recent
Weblogic - EJB
Weblogic  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
Servlet - WebSevices
Servlet  How to deploy servlet in weblogic 8.1
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
weblogic
Deployment steps in weblogic 102 - Development process
Deployment steps in weblogic 102   Hi Friends, can u give me d deployment steps in weblogic server 10.2(both jsp and servlet ..... how to export war file?) ..Thank u in advance
Servlet - Servlet Interview Questions
Servlet  How To WAR servlet programs and how to deploy in weblogic
weblogic 9.1 - WebSevices
weblogic 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
Weblogic server - Java Beginners
Weblogic server  how can we create connection poolong in weblogic 9.1 application server
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
Java_Weblogic - Development process
Java_Weblogic  How to run as service bea weblogic server on unix mode
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 - JSP-Servlet
servlet  1.how can i run servlet program without creating html and xml program on tomcat 5.0? 2.how to use weblogic for servlet
what is the Difference between weblogic and jboss?
what is the Difference between weblogic and jboss?  what is the Difference between weblogic and jboss
WebServices deployment in Weblogic - WebSevices
WebServices 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 Questions
Weblogic 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 Beginners
WEBLOGIC  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
Version of ant>ant-weblogic dependency
List of Version of ant>ant-weblogic dependency
Version of opensymphony>quartz-weblogic dependency
List of Version of opensymphony>quartz-weblogic dependency
Version of quartz>quartz-weblogic dependency
List of Version of quartz>quartz-weblogic dependency
Mockstrutstest case in Weblogic - Maven
Mockstrutstest 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 process
Weblogic 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
how can i deploy web application on application server(weblogic,jboss)
how can i deploy web application on application server(weblogic,jboss)  I have develop wab application(jsp,servlet)and i can deploy my web application on tomcat easily but i want to deploy on application server(weblogic,jboss
Servlet
Servlet  What is Servlet
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
Servlet
Servlet  how to navigate one servlet page to another servlet page
Portal development with BEA Weblogic Workshop - WebSevices
Portal development with BEA Weblogic Workshop  I am developing a portal using BEA weblogic Workshop workbench. We have to use the content management system to store and retrieve files and display it on the portlets
servlet
servlet  is there any way to include pdf's in servlet
servlet
servlet  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
Downloading and Installing WebLogic server 6.0
Downloading and Installing WebLogic server 6.0... on windows machine. You can download the BEA WebLogic Server for http.... BEA WebLogic Server?, is world class Web and Wireless
Maven Dependency ant-weblogic >> 1.6
You should include the dependency code given in this page to add Maven Dependency of ant >> ant-weblogic version1.6 in your project
Maven Dependency ant-weblogic >> 1.6.1
You should include the dependency code given in this page to add Maven Dependency of ant >> ant-weblogic version1.6.1 in your project
Maven Dependency ant-weblogic >> 1.6.2
You should include the dependency code given in this page to add Maven Dependency of ant >> ant-weblogic version1.6.2 in your project
Maven Dependency ant-weblogic >> 1.6.3
You should include the dependency code given in this page to add Maven Dependency of ant >> ant-weblogic version1.6.3 in your project
Maven Dependency ant-weblogic >> 1.6.4
You should include the dependency code given in this page to add Maven Dependency of ant >> ant-weblogic version1.6.4 in your project
Maven Dependency ant-weblogic >> 1.6.5
You should include the dependency code given in this page to add Maven Dependency of ant >> ant-weblogic version1.6.5 in your project
Maven Dependency quartz-weblogic >> 1.5.0
You should include the dependency code given in this page to add Maven Dependency of opensymphony >> quartz-weblogic version1.5.0 in your project
Maven Dependency quartz-weblogic >> 1.6.1
You should include the dependency code given in this page to add Maven Dependency of opensymphony >> quartz-weblogic version1.6.1 in your project
Maven Dependency quartz-weblogic >> 1.5.0-RC1
You should include the dependency code given in this page to add Maven Dependency of quartz >> quartz-weblogic version1.5.0-RC1 in your project
Maven Dependency quartz-weblogic >> 1.5.0-RC2
You should include the dependency code given in this page to add Maven Dependency of quartz >> quartz-weblogic version1.5.0-RC2 in your project
Maven Dependency quartz-weblogic >> 1.5.1
You should include the dependency code given in this page to add Maven Dependency of quartz >> quartz-weblogic version1.5.1 in your project

Ads