servlet with weblogic



Share on Google+Share on Google+

Nitin Kumar
servlet with weblogic
0 Answer(s)      6 years ago
Posted in : Servlet Interview Questions

hi everyone....

When I'm running this program on weblogic server8.1

import*; 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({ 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$;( at;Ljava/security/PrivilegedAction;)Ljava/lang/Object;( at;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(Optimized Method) at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax/servlet/Servlet;( at weblogic.servlet.internal.ServletStubImpl.createInstances()V( at weblogic.servlet.internal.ServletStubImpl.prepareServlet(Lweblogic/servlet/internal/RequestCallback;)V( at weblogic.servlet.internal.ServletStubImpl.getServlet(Lweblogic/servlet/internal/RequestCallback;)Ljavax/servlet/Servlet;( at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V( at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V( at weblogic.servlet.internal.WebAppServletContext$;( at;Ljava/security/PrivilegedAction;)Ljava/lang/Object;( at;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( at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V( at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V( at 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*; 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>
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 :
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 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
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
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
Servlet - WebSevices
Servlet  How to deploy servlet in weblogic 8.1
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:
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
what is the Difference between weblogic and jboss?
what is the Difference between weblogic and jboss?  what is the Difference between weblogic and jboss
Servlet - Servlet Interview Questions
Servlet  How To WAR servlet programs and how to deploy in weblogic
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
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
servlet - JSP-Servlet
servlet can i run servlet program without creating html and xml program on tomcat 5.0? to use weblogic for servlet
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
Weblogic Training
Weblogic Training     Description of BEA Weblogic Application Server  BEA WebLogic is a Server... advanced J2EE 1.3 features.  Weblogic Training Summary 


Advertisement null