JavaMail Exceptions in JSP
Hi,
I encountered a few exceptions when i deployed an application in the Win 98 OS, but no exceptions encountered when using Win2K OS and Win NT.
Is it that JavaMail cannot not be deployed in Win 98 OS?
or could it be that the smtp host is not valid?
Please advice...
Merci!!!
JavaMail works perfectly well in Windows 98, I have done it. From what you have told us, the problem could be almost anything.
Similar Messages
-
Exception in JSP during import roles from BO to SAP
Good day,
I have installed SAP Integration Kit but during Import Role action at Authentification - SAP I have error:
Exception in JSP: /jsp/auth/sapsec_import_role.jsp:16 13: <%@ taglib prefix="b" uri="com.businessobjects.webutil.jsf.controls_1.0"%> 14: 15: 16: <jsp:useBean id="secSAPR3ImportRoleBean" 17: class="com.businessobjects.clientaction.sap.auth.importrole.SAPR3AuthImportRoleBean" 18: scope="session" /> 19: Stacktrace:
OS - AIX 5.3 64 bit
Java Connector 2.1.8 32 bit
Best regards, Iurii Tiunov.Hi,
BOBJ 12.0.1
BOBJ INTGR. FOR SAP XI 3.1
I Try to install FixPack 1.3 for BOBJ INTGR. FOR SAP XI 3.1 but error is the same:
Exception in JSP: /jsp/auth/sapsec_import_role.jsp:16 13: <%@ taglib prefix="b" uri="com.businessobjects.webutil.jsf.controls_1.0"%> 14: 15: 16: <jsp:useBean id="secSAPR3ImportRoleBean" 17: class="com.businessobjects.clientaction.sap.auth.importrole.SAPR3AuthImportRoleBean" 18: scope="session" /> 19: Stacktrace:
Best regards, Iurii Tiunov. -
Problem with Handling Exception in Jsp
hi
I am unable to handling exception in Jsp.
In my Simple Form i taken a simple text field named salary.
Details.jsp
<%@ page language="java" isErrorPage="true" errorPage="Det.jsp"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<html:html>
<html:form action="/det.do">
Enter Salary<html:text property="sal"/><br>
<br>
<html:submit value="SEND" />
</html:form>
</html:html>and my Actionclass is:
package com.gurukul.util;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class DetUserAction extends Action {
String s=null;
int sal;
public ActionForward execute(ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
try
sal=Integer.parseInt(req.getParameter("sal"));
if (sal>0)
s="success";
else
throw new SalException(sal);}
catch(SalException e)
e.getMessage();
return map.findForward(s);
and my Formbean is
package com.gurukul.util;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class DetUserAction extends Action {
String s=null;
int sal;
public ActionForward execute(ActionMapping map,ActionForm form,HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
try
sal=Integer.parseInt(req.getParameter("sal"));
if (sal>0)
s="success";
else
throw new SalException(sal);}
catch(SalException e)
e.getMessage();
return map.findForward(s);
}and my struts-config.xml is
</form-bean>
<form-bean name="DetUser"
type="com.gurukul.util.DetUserForm">
</form-bean>
<action path="/det"
type="com.gurukul.util.DetUserAction"
name="DetUser"
input="/Details.jsp"
scope="request">
<exception key="errors.sal"
type="com.gurukul.util.SalException"
path="/jsp/Det.jsp"/>
<forward name="success" path="/jsp/DetailList.jsp" />
<forward name="failure" path="/jsp/Details.jsp"/>
</action>and Det.jsp(i.e error jsp) is
<%@ page language="java" isErrorPage="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<html:html>
<center><b>
Invalid Salary</b></center>
<%= exception.getMessage() %>
</html:html>but i didnt get exception on jsp.
please help me
Regards
VAShi
can you please guide me how to handle exceptions in Jsp(struts)? -
hi guys
cany any one guide me what are the steps to be followed while handling exceptions in jsp
regards
VS"DriverManager cannot be resolved" means the compiler doesn't know what class this is which prbably means you left off an import statement.
<%@page import="java.sql.*" %> -
How to catch exception in JSP????
how to catch exception in JSP?
I use JDeveloper 3.1
I use connection with database .
When I insert record in database
when have duplicate of primary key
how to catch this exception and
back to previous page?
I trying with folowing:
<jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
<% try {
RowEditor.setUseJS(true);
RowEditor.initialize(pageContext, "package2_Package2Module.Drzavi1View");
RowEditor.setSubmitText("Save");
RowEditor.setTargetUrl("Drzavi1View_SubmitInsertForm.jsp");
RowEditor.createNewRow();
RowEditor.setReleaseApplicationResources(true);
RowEditor.render();
catch(Exception e) {
%>
<script>
alert("primary key duplication");
history.back();
</script>
<% } %>
but i't not working
please help mei catch exceptions as you do, i don't have any problem...
are you throwing the exception from your bean?
actually i don't catch an Exception, but an SQLException...
but it works... here is my code...
try
myclass.addElement(); // this is an insert into Oracle
catch( DataBaseFailException e ) /// an exception that i throws inside after i receive an SQLException
session.setAttribute("gMessage","e.getMessage()); // error code -
Exception:oracle.jsp.parse.JspParseException
hi,
I deploy my bibeans application via jdeveloper in to application server and copy my lib file named bibeans.jar in web-inf/lib. after I try to view my jsp page which view my graph my browser show internal server error message (error 500 in IE)and following error in my log file :
04/12/14 11:00:31 Started
04/12/14 11:00:33 webapp: jsp: init
04/12/14 11:00:33 webapp: uix: init
04/12/14 11:00:33 webapp: 9.0.4.0.0 Started
04/12/14 11:02:42 webapp: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %>
Error: Unable to load taghandler class: http://xmlns.oracle.com/bibeans
04/12/14 11:04:22 webapp: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %>
Error: Unable to load taghandler class: http://xmlns.oracle.com/bibeans
what should I do ???
thanks in advance,
shimaTo the web.xml file add a taglib element.
<taglib>
<taglib-uri>http://xmlns.oracle.com/bibeans/</taglib-uri>
<taglib-location>/WEB-INF/BITags.tld</taglib-location>
</taglib> -
How to run exception using JSP?
How to run exception using JSP?
Why would you need the <%%> between the if else blocks? Even if you attempt to write some data within the blocks in java, you will still get an error. For example, this is illegal:
if(done)
System.out.println(true);
System.out.println("Hello World");
else
System.out.println(false);
}The compiler is expecting the 'else' to be directly after the body of the if. If it encounters anything else, it will complain. So you cannot do this in jsp either, regardless if it's a different technology, it's the same compiler. -
I am a beginner to JSF , I am getting the following error when I try to invoke using the following URL
http://localhost:8080/Loginjsf/
I have copied web.xml,faces-config.xml,index.jsp, userLogin.jsp and also the list of jars I am using.
java version I am using jdk1.5.0_14
tomcat version 5.5.25
JSF Version 1.1_01
---------------------------------------------------------------------this is the error------------------------------------------------------------------
exception
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:7
4: </head>
5: <body>
6: </body>
7: <jsp:forward page="userLogin.jsp"></jsp:forward>
8: </html>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
org.apache.jasper.JasperException: Exception in JSP: /userLogin.jsp:15
12: </head>
13:
14: <body>
15: <f:view>
16: <h:form id="UserName">
17: <f:loadBundle basename ="com.demo.MessageBundle" var="bundle"/> <br>
18: <h:inputText></h:inputText>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: Cannot find FacesContext
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:92)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.jsp.JspException: Cannot find FacesContext
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:399)
com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
org.apache.jsp.userLogin_jsp._jspx_meth_f_005fview_005f0(userLogin_jsp.java:107)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
THE WEB.XML FILE I AM USING IS
The web.xml, faces-config.xml files which I am using ,
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
</description>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!--Tomcat 5 Workaround: Listener used to initialize JSF on startup-->
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
</web-app>
THE FACES-CONFIG.XML I AM USING
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config >
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
<managed-bean>
<managed-bean-name>UserBean</managed-bean-name>
<managed-bean-class>com.demo.bean.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>userName</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
<managed-property>
<property-name>password</property-name>
<property-class>java.lang.String</property-class>
<value></value>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/userLogin.jsp</from-view-id>
<navigation-case><from-outcome>failure</from-outcome>
<to-view-id>/loginForm.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>success</from-action>
<to-view-id>/userLoginSuccess.jsp</to-view-id>
</navigation-case></navigation-rule>
<navigation-rule>
<from-view-id>/userLoginSuccess.jsp</from-view-id>
</navigation-rule>
<navigation-rule>
<from-view-id>/loginForm.jsp</from-view-id>
</navigation-rule>
</faces-config>
THE INDEX.JSP I AM USING
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
</head>
<body>
</body>
<jsp:forward page="userLogin.jsp"></jsp:forward>
</html>
THE USERLOGIN.JSP is
<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h"%>
<%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f"%>
<html>
<head>
<title>My JSF 'userLogin' starting page</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<f:view>
<h:form id="UserName">
<f:loadBundle basename ="com.demo.MessageBundle" var="bundle"/> <br>
<h:inputText></h:inputText>
<h:outputLabel value="UserName"></h:outputLabel>
<h:inputText></h:inputText>
<h:outputLabel for="Password" value="Password" id="Password"></h:outputLabel>
</h:form>
</f:view>
</body>
</html>
THE JAR FILES LOCATED AT tomcat-5.5\webapps\Loginjsf\WEB-INF\lib
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
el-api.jar
el-ri.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jstl.jar
standard.jar
It would be great if you could help me in resolving this problem, what is that I am doing wrong?Thanks for your suggestions, I updated the web.xml and index.jsp accordingly but this time I am getting a different kind of error as below
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6
3: <head>
4: </head>
5: <body>
6: <jsp:forward page="userLogin.faces"></jsp:forward>
7: </body>
8: </html>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: Error Parsing /userLogin.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
com.sun.facelets.FaceletException: Error Parsing /userLogin.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
com.sun.facelets.compiler.Compiler.compile(Compiler.java:105)
com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:496)
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:546)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) -
Error:null pointer exception in jsp
I try to write a programme for copying from one file to another file in a text format.but it is displaying the error.why the null pointer exception is coming.also i want to write the contents from combobox and text box to that same file.for that what to do? can u explain.
the code is like that.... the disining part in another page..
<%@ page language="java"%>
<%@ page import="java.io.*"%>
<%@ page import="java.text.*"%>
<html>
<head>
<title>
</title>
</head>
<body>
<%
String cname=request.getParameter("cname");
String category=request.getParameter("category");
String submit=request.getParameter("submit");
%>
<%
try
File f1=new File(request.getParameter("file"));
File f2=new File("/ee/file1.txt");
InputStream is=new FileInputStream(f1);
OutputStream os=new FileOutputStream(f2);
byte buf[]=new byte[1024];
int len;
if(submit.equals("submit"))
%>
Company Name is:<%out.println(cname);%>
Category :<%out.println(category);%>
<%
while((len=is.read(buf))>0)
os.write(buf,0,len);
out.println("file copied");
else
out.println("invalid data");
is.close();
os.close();
out.println("file copied");
catch(FileNotFoundException ex)
out.println(ex);
catch(IOException eo)
out.println(eo);
catch(Exception e)
out.println(e);
finally
out.println("");
%>
</body>
</html>Hi,
Am not getting exception now.In the jsp wer I ve written connection,am taking some values using request.getParameter("msg") . I had opened the connection statement before getting these parameter values.Think I ws getting null pointer exception due to this.Now I have opened connection after getting these parameter values...anyway am not getting the exception now...
Thanks. -
DMS Console Exception in JSP Page
Hello. I have a simple jsp page that calls a method in a class file. In the class I have a function, where I get an error when the connection is attempted.
I know that the connection is the problem because the jsp page calls it ( <%=opduser.count()%>) fine when the connection line is commented out. The error is posted below, I have ojdbc14_g, and classes12_dms, classes12_g jar files in my classpath, I have tried different combinations of jars as well.
THANKS IN ADVANCE
JAVA CODE
package world;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
import java.sql.*;
import oracle.jdbc.driver.OracleDriver;
import javax.servlet.*;
import java.text.*;
import java.util.*;
//import util.HTMLFilter;
import javax.servlet.jsp.tagext.*;
import java.sql.*; // Package for JDBC core API
import javax.naming.*;
//import oracle.jdbc.pool.OracleDataSource; // Oracle Data source class
import javax.servlet.Filter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import java.lang.*;
public class opd// extends HttpServlet
//HttpServletResponse response;
public int count()throws IOException, SQLException{
int number=-1;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle9ia:1521:xxxxx", "xxx", "xxx Statement stmt = conn.createStatement();
Statement stmt2 = conn.createStatement();
ResultSet rset = stmt.executeQuery("select * from project_access_passwords where project_user='opd'");
rset.next();
number=rset.getInt(3);
number++;
stmt2.executeUpdate("update project_access_passwords set project_access='"+number+"' where project_user='opd'");
stmt2.executeUpdate("commit");
catch(Exception e){}
return number;
ERROR RECEIVED
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: oracle/dms/console/DMSConsole
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.opd_005findex_jsp._jspService(opd_005findex_jsp.java:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole
oracle.jdbc.driver.DMSFactory.<clinit>(DMSFactory.java:28)
oracle.jdbc.driver.OracleConnection.createDMSSensors(OracleConnection.java:662)
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:325)
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
java.sql.DriverManager.getConnection(DriverManager.java:512)
java.sql.DriverManager.getConnection(DriverManager.java:171)
world.opd.count(opd.java:39)
org.apache.jsp.opd_005findex_jsp._jspService(opd_005findex_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.Hi,
Could you find a solution to this problem..? I am also getting the same kind of error. If so, kindly email me at : [email protected]
Thanks,
Jyoti. -
Null pointer exception in jsp ,data missing in chat application
Hi all....
I have a chat application in jsp using ajax.I have opened a d/b connection in a jsp which is called each time I sent a message.But sometimes I get null pointer exception in this page when msgs are sent so fast...also I miss some of the msgs I sent....I can't avoid that connection ther..When I commented all those d/b connection statements...everything is working fine..Please suggest me any solution...
Thanks in advance.Hi,
Am not getting exception now.In the jsp wer I ve written connection,am taking some values using request.getParameter("msg") . I had opened the connection statement before getting these parameter values.Think I ws getting null pointer exception due to this.Now I have opened connection after getting these parameter values...anyway am not getting the exception now...
Thanks. -
Class cast exception in jsp plz help
i have written a jsp where i displayed a text box with value given by user inside it
when the user enters some other value in text box and clicks on update button then i forwarded reqeust to servlet which will some data base work
servlet will forward again to the same jsp with the new value in text box.
but i am getting CLASS CAST EXCEPTION when servlet is forwarding reqeust to same JSP
help me what to do ........
thanking you in advance ..cheersdisplay cart.jsp file:
<%@ page import="java.util.*,org.*" %>
<html>
<body>
<%
Vector cartupdate = (Vector)session.getAttribute("cartlist");
for (int i = 0; i < cartupdate.size(); i++) {
CartListBean clb = (CartListBean)cartupdate.elementAt(i);
%>
<form name="itemslist<%=i%>" action="updateCart" method="post">
<input type="hidden" name="itemcode" value="<%=clb.getItemCode()%>">
<input type="hidden" name="itemname" value="<%= clb.getItemName()%>">
<input type="hidden" name="price" value="<%= clb.getPrice()%>">
<%= clb.getItemName() %>
<input type="text" name="qty" value="<%=clb.getQuantity()%>">
<input type="submit" name="<%=clb.getItemCode()%>" value="update">
</form>
<br>
<%
%>
<form name="tobuy" action="buysrv" method="post">
<input type="submit" name="buy" value="BUY">
</form>
</body>
</html>
updatecart servlet code:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import org.*;
import java.sql.*;
import java.util.*;
public class UpdateCart extends HttpServlet
public void service(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
HttpSession session=request.getSession(false);
Vector cartupdate = (Vector)session.getAttribute("cartlist");
for (int i = 0; i < cartupdate.size(); i++) {
org.CartListBean cart = (org.CartListBean)cartupdate.elementAt(i);
if((cart.getItemCode()).equals(request.getParameter("itemcode")))
org.CartListBean clb=new org.CartListBean();
clb.setItemCode(request.getParameter("itemcode"));
clb.setQuantity(request.getParameter("qty"));
clb.setItemName(request.getParameter("itemname"));
clb.setPrice(request.getParameter("price"));
cartupdate.setElementAt(clb,i);
session.setAttribute("cartlist",cart);
ServletContext application=getServletContext();
System.out.println("got finished");
RequestDispatcher rd=application.getRequestDispatcher("/displaycart.jsp");
rd.forward(request,response);
Message was edited by:
143java -
Class Cast Exception in JSP of the component
Hi,
I am trying to call a web service from the JSP of the component.I have written the java code as a scriplets in the JSP. The problem i am facing is Class Cast Exception. The code is as follows
String strKey = "wsclients/proxies/sap.com/CCMSContentBroker/com.sap.ccmscontentbroker.CCMSContentProxy";
java.lang.Object obj ;
obj = context.lookup(strKey);
str1 = obj.getClass().getName();
ContentBroker objCB= null;
objCB = (ContentBroker)obj; // getting error here
ContentBroker is an web service interface. The same code is working if i write it in the component but not in the scriplet of the JSP.
Can't we do the type cast in the JSP ?
Cant we call the web services in the JSP?
How to eliminate this Class cast Exception in my code?
Thanks and Regards,
SaravananHi Harini,
Thanks for your reply. I have checked all the import statements in the JSP.The problem is in the Type casting of object <b>obj</b> to ContentBroker variable <b>objCB</b>.
Are u saying typr casting is not possible in JSP or organising imports in the JSP.
These are my imports statements in the JSP
<%@ page import = "java.util.ResourceBundle" %>
<%@ page import = "com.sapportals.htmlb.*" %>
<%@ page import = "com.intel.ccmt.ccmscontentbroker.* "%>
<%@ page import = "com.intel.ccmt.ccmscontentbroker.types.* "%>
<%@ page import = "com.sapportals.portal.prt.contentconversion.XSLConverter" %>
<%@ page import = "com.sapportals.portal.prt.component.IPortalComponentRequest" %>
<%@ page import="java.io.File" %>
<%@ page import="javax.naming.Context" %>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="javax.naming.NamingException" %>
<%@ page import="java.util.StringTokenizer"%>
Can u help me on rectifying this class cast Exception ?
Thanks and Regards,
Saravanan -
Hi All,
Softwares used : UI--> JSP/Flex Grid/Dojo framwork
Spring MVC
Back end : EJB 3.0
application Server : Jboss 4.2.2
i have one Ajax call witch will update my flex grid after getting the data from Backend.
i am able to get responce object but i am getting the class cast exception in the jsp.
This ajax call used for upload the file.i have filter witch contains the wrap the request like
(HttpServletRequest) Proxy.newProxyInstance(
(javax.servlet.http.HttpServletRequest.class).getClassLoader(),
getInterfacesForObject(request), new HttpServletRequestProxy(
request, entries));
exception given below
19:54:04,372 ERROR [[ifx]] Servlet.service() for servlet ifx threw exception
java.lang.ClassCastException: $Proxy333
at org.apache.catalina.core.ApplicationDispatcher.unwrapRequest(ApplicationDispatcher.java:776)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:240)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:258)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1174)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:901)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
Can you help me out for resolve this issue.
Regards,
Ritesh Kumar K.riteshkumar wrote:
but we are using copying and pasting the application related lib's in the jboss\lib folder along with default jboss lib'sI am not sure if I understand you.
any way i tried but it's not resolving my problem.No other causes comes to mind. Sorry, can't help you further. Good luck with solving. -
Our weblogic is 6.1/linux, run jsp Recently the weblogic throw some exception:
1. >>>>>
####<Nov 20, 2003 10:52:48 AM CST> <Error> <XML> <wap.any8.com> <any8webserver>
<ExecuteThread: '14' for queue: 'default'> <> <> <130034> <Failed to parse given
XML document. Failed to retrieve SYSTEM id. The root element is required in a
well-formed document.>
####<Nov 20, 2003 10:52:48 AM CST> <Error> <XML> <wap.any8.com> <any8webserver>
<ExecuteThread: '14' for queue: 'default'> <> <> <130034> <Failed to parse given
XML document. Failed to retrieve root tag. The root element is required in a well-formed
document.>
####<Nov 20, 2003 10:52:48 AM CST> <Error> <XML> <wap.any8.com> <any8webserver>
<ExecuteThread: '14' for queue: 'default'> <> <> <130003> <Could not instantiate
factory class specified in the Server console. Invalid parameters: at least one
of publicId, systemId, rootTag must be non-null>
2 >>>>>>>>
####<Nov 20, 2003 10:31:10 AM CST> <Error> <HTTP> <wap.any8.com> <any8webserver>
<ExecuteThread: '18' for queue: 'default'> <> <> <101083> <Connection failure>
java.net.SocketException: Error in poll for fd: '25', revents: '24' at weblogic.socket.PosixSocketMuxer.deliverBadNews(PosixSocketMuxer.java:429)
at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:384)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
we don't know what's the reason, can anybody tell me, thanks firstly!
Does the XML document have a root element?
Does the XML document have a DOCTYPE declaration with a SYSTEM or PUBLIC Id?
Refer to BEA-130034
http://edocs.bea.com/wls/docs81/messages/XML.html
"newlifeq" <[email protected]> wrote:
>
>Our weblogic is 6.1/linux, run jsp Recently the weblogic throw some exception:
>
>
>1. >>>>>
>####<Nov 20, 2003 10:52:48 AM CST> <Error> <XML> <wap.any8.com> <any8webserver>
><ExecuteThread: '14' for queue: 'default'> <> <> <130034> <Failed to
>parse given
>XML document. Failed to retrieve SYSTEM id. The root element is required
>in a
>well-formed document.>
>####<Nov 20, 2003 10:52:48 AM CST> <Error> <XML> <wap.any8.com> <any8webserver>
><ExecuteThread: '14' for queue: 'default'> <> <> <130034> <Failed to
>parse given
>XML document. Failed to retrieve root tag. The root element is required
>in a well-formed
>document.>
>####<Nov 20, 2003 10:52:48 AM CST> <Error> <XML> <wap.any8.com> <any8webserver>
><ExecuteThread: '14' for queue: 'default'> <> <> <130003> <Could not
>instantiate
>factory class specified in the Server console. Invalid parameters: at
>least one
>of publicId, systemId, rootTag must be non-null>
>
>
>2 >>>>>>>>
>####<Nov 20, 2003 10:31:10 AM CST> <Error> <HTTP> <wap.any8.com> <any8webserver>
><ExecuteThread: '18' for queue: 'default'> <> <> <101083> <Connection
>failure>
>java.net.SocketException: Error in poll for fd: '25', revents: '24' at
>weblogic.socket.PosixSocketMuxer.deliverBadNews(PosixSocketMuxer.java:429)
>at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:384)
>at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
>at
>weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>we don't know what's the reason, can anybody tell me, thanks firstly!
>
Maybe you are looking for
-
I use my 13" MBP in my home office with the lid closed, connected to a cinema display and wireless keyboard & mouse. At the other end of the house is our Airport Extreme base station. Everything works fine throughout the house (two laptops, iMac, two
-
Very Strange occurance when page with effect viewed in IE 7
I applied the spry (Fade/Appear) effect to a container. The container contains text and images. When I test the page, I noticed the images has strange white marks or scratches on them. Has anyone noticed this? This only happens in IE 7. Not Firefox.
-
I have a pix 501, with vpn users authenticating off of MS 2000 IAS. Works great although I want to filter a few users to only be able access a couple PC's when they come in through the pix. I created a new group on NT called Vendors, added the users
-
PLSQL Practice-----Please help!!!
Hi, I'm a beginner for the PLSQL. if someone give me some tips, It's really helpful for me. There two table. Table A (Transaction table : keep coming a rows) A_id B 111 aaa,bbb,ccc 222 yyy,ss,ccc 333 sss,yyy,ddd Table B (Fixed code table) X_id Y xxx
-
No picture in Source/Program Windows
Not sure whats going on here, suddenly cant view anything. is there a way of toggling video preview on and off?