JSP Page threw a non-Exception Throwable
Friends,
I have Servr JRun 3.1. The application has been workin fine since it has been deployed last year.
Suddenly, I have started getting the following error.
javax.servlet.ServletException: JSP Page threw a non-Exception Throwable.
at jrun__*****__***__************ejsp1d._jspService(jrun__******__***__**************2ejsp1d.java, Compiled Code)
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java, Compiled Code)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java, Compiled Code)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java, Compiled Code)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java, Compiled Code)
at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code)
I can tell that none of the file has been changed in last one year. I checked the code but did not understand what I should look for.
Can anybody help me out ???
Regards,
Nirav
Well what does the jsp being invoked do?
at jrun__*****__***__************ejsp1d._jspService(jrun__******__***__**************2ejsp1d.java, Compiled Code)
I presume you have obfuscated this with the asterisks? That should identify which jsp the error is occurring on.
Do you have your own "throwable" which does not extend exception?
Is there a more complete message/stack trace in the logs?
Similar Messages
-
JSP Page threw a non-Exception
Friends,
I have Servr JRun 3.1. The application has been workin fine since it has been deployed last year.
Suddenly, I have started getting the following error.
javax.servlet.ServletException: JSP Page threw a non-Exception Throwable.
at jrun__*****__***__************ejsp1d._jspService(jrun__******__***__**************2ejsp1d.java, Compiled Code)
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java, Compiled Code)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java, Compiled Code)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.session.JRunSessionService.service(JRunSessionService.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java, Compiled Code)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java, Compiled Code)
at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code)
I can tell that none of the file has been changed in last one year. I checked the code but did not understand what I should look for.
Can anybody help me out ???
Regards,
NiravDON'T cross-post. It's considered rude:
http://forum.java.sun.com/thread.jspa?threadID=5199029&start=0&tstart=0
% -
Exception Handling for many bean objects of a container class in a JSP page
Hello,
I have on container bean class. In this container class, there are several others class objects and the getter methods to get these objects out to the JSP pages.
I have one JSP page which will use different objects in the container class object through the getter methods of the container class.
My question is how to implement the exception handler for all the objects in the container so that the JSP page can handle all exceptions if occurrs in any object in the container?
Please give me some suggestions. Thanks
TuThanks for your reply.
Since the container is the accessor class, I have no other super class for this container class, I think I will try the try catch block in the getter methods. -
How can we pass selected combo box value to a jsp pag?
Hi All,
I want to pass selected combo box value to a same jsp page's variable.
i am using javascript
<select onchange="this.options[this.selectedIndex].text">
</select>
this selected value should be invoked for a jsp page's variable.
Excepting for favorable reply
Vanshselect2.jsp
<script>
function x()
alert(document.f.s.options[document.f.s.selectedIndex].text);
document.f.submit();
</script>
<body>
<form method="get" name="f" action="select2.jsp">
<select name="s" onchange="x()">
<option checked>--select--</option>
<option value="1"> vijay </option>
<option value="2"> kumar </option>
</select>
</form>
</body> -
Why jsp page cause exceptions in J2EE App. Server
I installed j2ee App Server on my Windows 2000, wrote a simple .jsp, moved the code to domains\domain1\docroot, ran the .jsp from the browser and saw the following exception. I could not find the directory common/lib for my Tomcat server. Please instruct.
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:132)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:356)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:420)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:557)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
****************************************************************************************************************This is a known issue.
The error message about the missing Java compiler is very misleading, and
is being caused by a bug in the way compilation error messages are
being propagated.
Following is a detailed explanation of the behaviour you are seeing:
The misleading error message is printed only in the case where a javac
compilation error line number cannot be mapped back to a line number
in the JSP source code.
The internal representation of a JSP element ("JSP node") in the JSP compiler
contains the following info:
- The begin line number of the JSP element in the JSP page
- The begin and end line numbers ("range") of the Java code that was
generated for the JSP element
When attempting to map a javac error line number back to the JSP
source line, we determine the range into which the javac error line
number falls, and retrieve the JSP source number of the JSP element
associated with that range.
However, in some cases, it is impossible to trace a javac error line
number back to the JSP element that caused the error. For example,
consider the following scriptlet:
<%
String query = request.getParameter("query");
if(query != null) {
out.println(query);
} else {
out.println("(null)");
// } // <-- !Missing brace syntax error
%>
Since the JSP compiler wraps the generated code into a
try-catch-finally block, the above syntax error in the scriptlet
causes havoc with that try-catch-finally block, and results in 3 javac
errors:
<file>jsp.java:<line1>: 'catch' without 'try'
} catch (Throwable t) {
^
<file>jsp.java:<line2>: 'try' without 'catch' or 'finally'
try {
^
<file>jsp.java:<line3>: '}' expected
Notice that all of the above javac error numbers are outside the range
of the java line numbers corresponding to the scriptlet that caused the
error, and therefore cannot be mapped back to any line numbers in the
JSP page source.
AS 8.0 PE does not handle this case correctly, and prints out the
misleading error message (though the real error message can be found
in the server log).
Notice that this problem is going to be fixed in AS 8.1, so that if a
javac error line number cannot be mapped back to a JSP page line
number, the javac error is still returned to the client.
As far as your particular JSP page is concerned, I don't see anything
wrong with it, and it compiles just fine for me.
Do you still have any problems with it?
Jan -
When i was trying to forward control to invalidSession page from a JSP
if someone tries to log in without entering password....he must be directed to invalidsession page...
but this is giving exception on line 6...
The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /pages/regError.jsp at line 6
3: <%@page session="true"%>
4: <% if(session.getAttribute("password")==null)
5: {%>
6: <jsp:forward page="/pages/invalidSession.jsp" />
7: <%}
8: %>
9: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
web2.Login.processRequest(Login.java:68)
web2.Login.doPost(Login.java:95)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.apache.jasper.JasperException: javax.servlet.ServletException: File "/pages/index.jsp" not found
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
org.apache.jsp.pages.regError_jsp._jspService(regError_jsp.java:60)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
web2.Login.processRequest(Login.java:68)
web2.Login.doPost(Login.java:95)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)From the stack trace it is written:
org.apache.jasper.JasperException:
javax.servlet.ServletException:
File "/pages/index.jsp" not foundYou have to check for path of index.jsp.
Edited by: ngpgeeta on Jan 20, 2009 8:01 AM -
Custom tag in included JSP page cause exception (WLS 5.1 SP 9)
An application use custom tags (JSP Tag extensions) in JSP page
included into another JSP page by means <jsp:include> instruction.
After we had installed Service Pack 9 for Weblogic 5.1
browser's call of including JSP began show an error.
When I remove Weblogic510sp9.jar and Weblogic510sp9boot.jar
references from startWebLogic.cmd, the error diagnostic disappear.
Is Service Pack Number 9 wrong?
==========================
Web browser diagnostic:
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling
the request.
==========================
Console diagnostic:
Tue Jun 05 17:40:14 MSD 2001:<I> <WebAppServletContext-dscat> looking for taglib
uri /exttags.tld as resource /WEB-INF/e
xttags.tld in Web Application root:
Tue Jun 05 17:40:15 MSD 2001:<I> <WebAppServletContext-dscat> Generated java file:
C:\weblogic\dscat\WEB-INF\_tmp_war_ds
cat\jsp_servlet\_jsp\_opos\_catalog.java
Tue Jun 05 17:40:25 MSD 2001:<E> <WebAppServletContext-dscat> Servlet failed with
Exception
java.lang.VerifyError: (class: jsp_servlet/_jsp/_opos/_catalog, method: _jspService
signature: (Ljavax/servlet/http/Http
ServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Register 12 contains
wrong type
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:469)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java,
Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:228)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
==========================
Including JSP file:
<%@ include file="catalog_real.jsp" %>
==========================
Included JSP file:
<%@ taglib uri="/exttags.tld" prefix="dscat" %>
<dscat:pageheader>Catalog header</dscat:pageheader>
==========================
Tag extansions library (WEB-INF/exttags.tld file):
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>dscat</shortname>
<tag>
<name>pageheader</name>
<tagclass>ru.ibs.xbcat.view.tag.PageHeader</tagclass>
</tag>
</taglib>
==========================
Class PageHeader:
package ru.ibs.xbcat.view.tag;
import java.io.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class PageHeader extends BodyTagSupport {
public int doStartTag() throws javax.servlet.jsp.JspException {
return BodyTag.EVAL_BODY_TAG;
public int doAfterBody() throws javax.servlet.jsp.JspException {
return(SKIP_BODY);
Are you using Jikes? See if this helps ...
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6287&utag=
Mike
"Radik Usmanov" <[email protected]> wrote:
>
>An application use custom tags (JSP Tag extensions) in JSP page
>included into another JSP page by means <jsp:include> instruction.
>
>After we had installed Service Pack 9 for Weblogic 5.1
>browser's call of including JSP began show an error.
>When I remove Weblogic510sp9.jar and Weblogic510sp9boot.jar
>references from startWebLogic.cmd, the error diagnostic disappear.
>
>Is Service Pack Number 9 wrong?
>==========================
>Web browser diagnostic:
>
>Error 500--Internal Server Error
>From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
>10.5.1 500 Internal Server Error
>The server encountered an unexpected condition which prevented it from
>fulfilling
>the request.
>
>==========================
>Console diagnostic:
>
>Tue Jun 05 17:40:14 MSD 2001:<I> <WebAppServletContext-dscat> looking
>for taglib
>uri /exttags.tld as resource /WEB-INF/e
>xttags.tld in Web Application root:
>Tue Jun 05 17:40:15 MSD 2001:<I> <WebAppServletContext-dscat> Generated
>java file:
>C:\weblogic\dscat\WEB-INF\_tmp_war_ds
>cat\jsp_servlet\_jsp\_opos\_catalog.java
>Tue Jun 05 17:40:25 MSD 2001:<E> <WebAppServletContext-dscat> Servlet
>failed with
>Exception
>java.lang.VerifyError: (class: jsp_servlet/_jsp/_opos/_catalog, method:
>_jspService
>signature: (Ljavax/servlet/http/Http
>ServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Register 12
>contains
>wrong type
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Unknown Source)
> at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:469)
> at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java,
>Compiled Code)
> at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:228)
> at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
> at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
> at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
> at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
> at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
> at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
>Code)
>
>==========================
>Including JSP file:
>...
> <%@ include file="catalog_real.jsp" %>
>...
>
>==========================
>Included JSP file:
>...
> <%@ taglib uri="/exttags.tld" prefix="dscat" %>
>...
><dscat:pageheader>Catalog header</dscat:pageheader>
>...
>==========================
>Tag extansions library (WEB-INF/exttags.tld file):
>
><?xml version="1.0" encoding="ISO-8859-1" ?>
><!DOCTYPE taglib
> PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
> "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
>
><taglib>
> <tlibversion>1.0</tlibversion>
> <jspversion>1.1</jspversion>
> <shortname>dscat</shortname>
>
> <tag>
> <name>pageheader</name>
> <tagclass>ru.ibs.xbcat.view.tag.PageHeader</tagclass>
> </tag>
>
></taglib>
>==========================
>Class PageHeader:
>
>package ru.ibs.xbcat.view.tag;
>
>import java.io.*;
>import javax.servlet.jsp.*;
>import javax.servlet.jsp.tagext.*;
>
>public class PageHeader extends BodyTagSupport {
>
> public int doStartTag() throws javax.servlet.jsp.JspException {
> return BodyTag.EVAL_BODY_TAG;
> }
>
> public int doAfterBody() throws javax.servlet.jsp.JspException {
> ...
> return(SKIP_BODY);
> }
>}
>
-
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. -
Exception occurred processing JSP page
I'm a Java newbie... I'm trying to write a very simple (I think) .jsp file to test the connectivity to our Oracle DB.
here's my entire .jsp file...
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
<%
String dname;
String query = "select DNAME from DEPT";
Connection conn = null;
ResultSet rs = null;
Statement stmt = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
// Create a connection to the database
conn = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:SID", "username", "password");
} catch (ClassNotFoundException e) {
// Could not find the database driver
} catch (SQLException e) {
// Could not connect to the database
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while ( rs.next() ) {
dname = rs.getString("dname");
System.out.println("dname: " + dname);
%>
I'm getting the following error...
org.apache.jasper.JasperException: An exception occurred processing JSP page test3.jsp at line 23
20: // Could not connect to the database
21: }
22:
23: stmt = conn.createStatement();
24:
25: rs = stmt.executeQuery(query);
26: while ( rs.next() ) {
Any help would be appreciated.
Thanks!You need to move all of this:
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while ( rs.next() ) {
dname = rs.getString("dname");
System.out.println("dname: " + dname);
}inside your try/catch. if any of them throw an exception, your not catching it.
Further you should use a finally block to close your connection.
Edited by: inryji on Feb 21, 2008 3:15 PM -
An exception occurred processing JSP page!
i am using an class DBXMLParser for my project in JSP.
but when i deploy my project in eclipse then appear an exception as following:
Root cause:
"java.lang.RuntimeException: Document has no root element!"
What is the problem, and how can I solve it ? Thanks a lotyaa,but tht code is working properly ealier ,I have made changes in other jsp page from where this upload.jsp page is called n i havn't made any changes in this upload.jsp page still am getting the mentioned error while uploading file
-
Mixing ssl and non ssl jsp pages.
Hi,
I am new to Weblogic 8.1 and I would like to learn how to setup few jsp pages in https:// and few pages to be served in http:// protocol.
I have created a managed server using 7004 for http and 7040 for https. Currently I have 2 jsp pages index.jsp and test.jsp and both the pages can be accessed using http:// or https://
I wanted to make test.jsp work only with https:// and not work with http:// How do I configure this?
In realtime webapplications. How is switching of http and https working? Are the URL's hard coded in the controller servlet?
Some tips would be helpful.
UmaHi,
To do this task do the following,
1. Create a property file in your application. for example let us take myapp.properties
2. include the following to the myapp.properties file
#sslport=7002
#nonsslport=7001
#serverip=127.0.0.1
#ctpath=myApp
# In your case
sslport=7004
nonsslport=7040
serverip=127.0.0.1
# ctpath is the web deployment directory
ctpath=yourapp
3. Create a class to read the property file say PropertyReader.java and implement the following
String sslport=Properties.getProperty("sslport");
String nonssl=Properties.getProperty("nonsslport);
String serverip=Properties.getProperty("serverip);
String cpath=Properties.getProperty("ctpath");
4. initialise the propertyReader class and
in the property class keep following variables in admin session data
String sslpath="https://"+serverip+":"+sslport+"/"+cpath
String nonsslpath="http://"+serverip+":"+nonsslport+"/"+cpath
5. use these variables for ssl or nonssl
response.senRedirect(sslpath+"/bank.jsp"); //for ssl
response.sendRedirect(nonsslpath+"/welcome.jsp"); //for non ssl
like the same way
Regards,
Nishant Kulkarni -
How to display a variable(non editable) in JSP page?
I have this java code in my JSP and I want to print it on the JSP page with a name associated to it so that it can be passed to a Java Bean. How can I do it?
String user = display.getOwnerName();whatever value you want to send it to server side, you have to put it in a "form". You can put it in HTML form input tag , JSP form, Struts form or JSF form.
for example:
<form action="getUserProfile.do">
<input type="text" value="<c:out value='display.ownerName' />" />
</form>
kind regards -
Executing long time jsp page on non blocking way
Hi,
I would save the response content of the generated HTML page into file
I want to do this in order to execute jsp page who takes long time. I will return a static page indicating that the job is now executing and i will save the result on disk and users will be able to retrieve their result later.
thanksThis is a noble idea, but what is your question here and why are you posting it 3 times?
Just wondering,
Alexander -
[b]Error during JSP page processing[/b]
hi , i'm mech.
i have some probs with jsp. i am trying to connect jsp page with database and printing the data on the browser page. i have created DSN mm using microsoft odbc for oracle and oracle9i's driver oracle in orahome90 but it is giving yet . i have this coding and error.
------------------------jsp code--------------------------
package pagecompile.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import com.sun.server.http.pagecompile.jsp.runtime.*;
import java.beans.*;
import com.sun.server.http.pagecompile.jsp.JspException;
import java.sql.*;
public class _Connect extends HttpJspBase {
static char[][] jspxhtml_data = null;
public _Connect( ) {
private static boolean jspxinited = false;
public final void jspxinit() throws JspException {
ObjectInputStream oin = null;
int numStrings = 0;
try {
FileInputStream fin = new FileInputStream("E:\\JavaWebServer2.0\\tmpdir\\default\\pagecompile\\jsp\\pagecompile.jspConnect.dat");
oin = new ObjectInputStream(fin);
jspxhtml_data = (char[][]) oin.readObject();
} catch (Exception ex) {
throw new JspException("Unable to open data file");
} finally {
if (oin != null)
try { oin.close(); } catch (IOException ignore) { }
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
boolean jspxcleared_due_to_forward = false;
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
jspxinit();
jspxinited = true;
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
out.print(_jspx_html_data[0]);
out.print(_jspx_html_data[1]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(14,2);to=(28,2)]
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myconn=DriverManager.getConnection("Jdbc:Odbc:mm","madhulika","madhulika");
Statement stmt = myconn.createStatement();
ResultSet myResultSet = stmt.executeQuery("Select * from peopletable");
if(myResultSet != null)
while(myResultSet.next())
int eid=myResultSet.getInt("id");
String fname=myResultSet.getString("firstname");
String lname=myResultSet.getString("lastname");
String mail=myResultSet.getString("email");
// end
out.print(_jspx_html_data[2]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(30,10);to=(30,13)]
out.print(eid);
// end
out.print(_jspx_html_data[3]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(31,10);to=(31,15)]
out.print(fname);
// end
out.print(_jspx_html_data[4]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(32,10);to=(32,15)]
out.print(lname);
// end
out.print(_jspx_html_data[5]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(33,10);to=(33,14)]
out.print(mail);
// end
out.print(_jspx_html_data[6]);
// begin [file="E:\\JavaWebServer2.0\\public_html\\Connect.jsp";from=(37,5);to=(43,0)]
stmt.close();
myconn.close();
// end
out.print(_jspx_html_data[7]);
} catch (Throwable t) {
if (out.getBufferSize() != 0)
out.clear();
throw new JspException("Unknown exception: ", t);
} finally {
if (!_jspx_cleared_due_to_forward)
out.flush();
_jspxFactory.releasePageContext(pageContext);
-------------------error in browser----------------------
Error during JSP page processing
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(SQLException.java:43)
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3814)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1029)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:145)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:165)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at pagecompile.jsp._Connect._jspService(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.runServlet(JspServlet.java:469)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspServlet.java:259)
at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.java:97)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.sun.server.ServletState.callService(ServletState.java:226)
at com.sun.server.ServletManager.callServletService(ServletManager.java:936)
at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423)
at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79)
at com.sun.server.http.stages.Runner.process(Runner.java:79)
at com.sun.server.ProcessingSupport.process(Compiled Code)
at com.sun.server.Service.process(Service.java:204)
at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374)
at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code)
at com.sun.server.HandlerThread.run(CompiledBacking up a moment, is there a particular reason that you're using the JDBC-ODBC bridge rather than using the Oracle JDBC driver?
Have you taken a look at the JSP sample code available on OTN? I would start by making sure you can run that.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Error, package does not exist, thrown when calling jsp page
Hi
I have downloaded sample jsp pages for interaction with Crystal reports. When I compile these jsp pages in NetBeans 3.6 there are no problems. When I deploy these pages and associated libraries to Tomcat 5, I get the following error when attempting to call the jsp page, but all the jars used in NetBeans are present in the web-inf/lib directory and I have looked in the jars and found classes in the com.crystaldecisions.report.web.viewer package. I have been unable to find any information after googling and looking at the jakarta bug database. What am I doing wrong?
The error...
2004-09-22 17:40:30 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
Generated servlet error:
[javac] Compiling 1 source file
E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:9: package com.crystaldecisions.report.web.viewer does not exist
import com.crystaldecisions.report.web.viewer.*;
^
E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:180: cannot resolve symbol
symbol : class CrystalReportInteractiveViewer
location: class org.apache.jsp.SimplePreviewReport_jsp
CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
^
An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
Generated servlet error:
E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java:180: cannot resolve symbol
symbol : class CrystalReportInteractiveViewer
location: class org.apache.jsp.SimplePreviewReport_jsp
CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
^
An error occurred at line: 1 in the jsp file: /CrystalReportsInteractiveViewer.jsp
Generated servlet error:
Note: E:\Tomcat5\work\Catalina\localhost\crystal\org\apache\jsp\SimplePreviewReport_jsp.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
3 errors
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:534)
The offending page is ....
<%
/*==========================================================================
INSTANTIATE THE VIEWER AND DISPLAY THE REPORT THROUGH THE INTERACTIVE VIEWER
============================================================================
- Create a Viewer object
- Set the source for the viewer to the client documents report source
- Process the http request to view the report
- Dispose of the viewer object
// Create an Interactive Viewer
CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer();
// Set the name for the interactive viewer
viewer.setName("Crystal_Report_Interactive_Viewer");
// Set the source for the interacive viewer to the client documents report source
viewer.setReportSource(clientDoc.getReportSource());
// Process the http request to view the report
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
// Dispose of the viewer object
viewer.dispose();
%>included in...
<%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.lib.*"%>
<%@ page import="com.crystaldecisions.report.web.viewer.*"%>
<html>
<head>
<title>Begin Here - Simple Preview Report</title>
</head>
<body>
<%
/*=================================================================
WORKING WITH THE REPORT APPLICATION SERVER AND JSP TO VIEW REPORTS
===================================================================
Authors Name: Ken Andony
Technology supported by the app: Report Application Server
ALWAYS REQUIRED STEPS
- Create a new Report Application Session
- Create a Report Application Server (RAS) Service
- Set the RAS Server to be used for the service
- Initialize the RAS Service
- Create the report client document object
- Set the RAS Server to be used for the report client document
- Open the report, and set the open type to Read Only
INSTANTIATE THE REPORT VIEWER
- Create a Viewer object
- Set the source for the viewer to the client documents report source
- Process the http request to view the report
- Dispose of the viewer object
==================================================================*/
* This line creates a string variable called reportname that we will use to pass
* the Crystal Report filename (.rpt file) to the OpenReport method contained in
* the AlwaysRequiredSteps.jsp.
String reportName ="SimplePreviewReport.rpt";
%>
<%
/* ALWAYS REQUIRED STEPS
Include the file AlwaysRequiredSteps.jsp which contains the code
for steps:
- Create a new Report Application Session
- Create a Report Application Server (RAS) Service
- Set the RAS Server to be used for the service
- Initialize the RAS Service
- Create the report client document object
- Set the RAS Server to be used for the report client document
- Open the report, and set the open type to Read Only */
%>
<%@ include file="AlwaysRequiredSteps.jsp"%>
<%
/* INSTANTIATE THE REPORT VIEWER
There are three Report Viewers:
1. Crystal Reports Interactive Viewer
2. Crystal Reports Viewer
3. Crystal Reports Parts Viewer
The choices are CrystalReportsInteractiveViewer.jsp, CrystalReportsViewer.jsp,
CrystalReportsPartsViewer.jsp
Note that to use this include you must have the appropriate .jsp file in the
same virtual directory as the main jsp page.
=============================================================================
DISPLAY THE REPORT
- display the report using one of the Thin Client DHTML viewers
Include one of the DHTML Viewers.
- Crystal Reports Interactive Viewer = CrystalReportsInteractiveViewer.jsp
- Crystal Reports Viewer = CrystalReportsViewer.jsp
- Crystal Reports Parts Viewer = CrystalReportsPartsViewer.jsp
Note** - To use the report parts viewer successfully you are required to
choose and name three objects in the report to Node0, Node1 and Node2.
You can access an objects name by using the Format Editor dialog box.
For more information on the Format Editor Dialog Box and setting objects
names, please refer to the Help Contents (Help Menu->Crystal Reports Help)
or by pressing F1
=============================================================================*/
%>
<%@ include file="CrystalReportsInteractiveViewer.jsp" %>
</body>
</html>Thanks Tien-Chih Wang. It worked...well I'm getting a new set of errors, but progress has been made!
I understand that if placed in the common directory the jar will be available to all webapps but why does it make a difference whether a jar file is placed under the $TOMAT_HOME/common/lib or $TOMAT_HOME/webapps/appname/web-inf/lib directory if I only need to access the jar from one webapp?
Maybe you are looking for
-
Some of my pictures do not show up in my camera roll
Question. I recently bought the iphone 5s and had all of my contacts, photos, etc tranferred from my old iphone 4 to the 5s. Everything transferred as it should have, except for some of my pictures in my camera roll. My camera roll shows I have 840 p
-
Black screen after installing Boot camp Win7 on iMac 27 late 2009
I've run out of ideas as to how to fix this problem. I have a late 2009 iMac quad i5, Mountain Lion, 12GB RAM, 1TB HD (recently exchanged under extended warranty). I stopped counting how many times I have tried to get this up and running but I follow
-
Airport Express operating sytstem support
Just got my airport express and it says that Mac OS X 10.5.2 won't support it? Help?
-
Classpath when executed from shell file
Running my java app directly from the command line works fine. The problem is when I create a batch file. This way, I have a Exception in thread main : java.lang NoClassDefFoundError. The batch file contains exactly the same command line I can execut
-
Have been lost, all the properties files in the CM repository (FSDB mode)
Hi, I encountered the following problem: lost all descriptions to folders and files in the CM repository, which is connected to the FSDB mode. This happened as follows. At desired time connection to the server where the repository was broken, after s