Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


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


Advertisement
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
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
websphere vs weblogic
websphere vs weblogic  websphere vs weblogic Why you are using websphere instead of weblogic
Weblogic server - Java Beginners
Weblogic server  how can we create connection poolong in weblogic 9.1 application server
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
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
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
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
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
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
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
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
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
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 - WebSevices
Servlet  How to deploy servlet in weblogic 8.1
Weblogic Training
Weblogic Training     Description of BEA Weblogic Application Server  BEA WebLogic is a Server... advanced J2EE 1.3 features.  Weblogic Training Summary 
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.... You can download the BEA WebLogic Server for http://www.bea.com... WebLogic Server?, is world class Web and Wireless Application Server
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
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
servlets using weblogic server - Java Beginners
servlets using weblogic server  [J2EE:160043]Missing deployment... msg in weblogic server...rgv.war is wat i hav creaated. can u pls send me the detail procedure to deploy a web application module using weblogic..thnx
Servlet - Servlet Interview Questions
Servlet  How To WAR servlet programs and how to deploy in weblogic
Advertisements
 

 

 

DMCA.com