Throw exception error everywhere in JSP!
I've wrote a JSP to access SQL Server database in J2SE sucessfully, but when
I try that on a different server using Java 1.1 I get the same type of
errors complaining about
"the method " blah blah blah" can throw the checked exception
"java/lang/ClassNotFoundException", but its invocation is neither enclosed
in a try statement that can catch that exception nor in the body of a method
or constructor that "throws" that exception."
this is another sample of my errors
31. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
<------------------------------------------->
*** Error: The method "java.lang.Class forName(java.lang.String $1);" can
throw the checked exception "java/lang/ClassNotFoundException", but its
invocation is neither enclosed in a try statement that can catch that
exception nor in the body of a method or constructor that "throws" that
exception.
33. Connection con=DriverManager.getConnection(url, "ema", "ema");
<-------------------------------------------->
*** Error: The method "java.sql.Connection getConnection(java.lang.String
$1, java.lang.String $2, java.lang.String $3);" can throw the checked
exception "java/sql/SQLException", but its invocation is neither enclosed in
a try statement that can catch that exception nor in the body of a method or
constructor that "throws" that exception.
Am I missing some libraries or calling the method incorrectly because of the
version of Java was older?
Here I also attached my code
<%
//connection and query
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:DB";
Connection con=DriverManager.getConnection(url, "sa", "password");
PreparedStatement query = con.prepareStatement("select Quarter, Month,
WeekDay, statusCode, Responded, CNT from REQUEST",
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = query.executeQuery();
rs.last();
int numrows = rs.getRow();
rs.beforeFirst();
%>
Thanks in advanced
Ku
I've wrote a JSP to access SQL Server database in J2SE sucessfully, but when
I try that on a different server using Java 1.1 I get the same type of
errors complaining about
"the method " blah blah blah" can throw the checked exception
"java/lang/ClassNotFoundException", but its invocation is neither enclosed
in a try statement that can catch that exception nor in the body of a method
or constructor that "throws" that exception."
this is another sample of my errors
31. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
<------------------------------------------->
*** Error: The method "java.lang.Class forName(java.lang.String $1);" can
throw the checked exception "java/lang/ClassNotFoundException", but its
invocation is neither enclosed in a try statement that can catch that
exception nor in the body of a method or constructor that "throws" that
exception.
33. Connection con=DriverManager.getConnection(url, "ema", "ema");
<-------------------------------------------->
*** Error: The method "java.sql.Connection getConnection(java.lang.String
$1, java.lang.String $2, java.lang.String $3);" can throw the checked
exception "java/sql/SQLException", but its invocation is neither enclosed in
a try statement that can catch that exception nor in the body of a method or
constructor that "throws" that exception.
Am I missing some libraries or calling the method incorrectly because of the
version of Java was older?
Here I also attached my code
<%
//connection and query
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:DB";
Connection con=DriverManager.getConnection(url, "sa", "password");
PreparedStatement query = con.prepareStatement("select Quarter, Month,
WeekDay, statusCode, Responded, CNT from REQUEST",
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = query.executeQuery();
rs.last();
int numrows = rs.getRow();
rs.beforeFirst();
%>
Thanks in advanced
Ku
Similar Messages
-
Exception error everywhere in JSP
I've wrote a JSP to access SQL Server database in J2SE sucessfully, but when
I try that on a different server using Java 1.1 I get the same type of
errors complaining about
"the method " blah blah blah" can throw the checked exception
"java/lang/ClassNotFoundException", but its invocation is neither enclosed
in a try statement that can catch that exception nor in the body of a method
or constructor that "throws" that exception."
this is another sample of my errors
31. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
<------------------------------------------->
*** Error: The method "java.lang.Class forName(java.lang.String $1);" can
throw the checked exception "java/lang/ClassNotFoundException", but its
invocation is neither enclosed in a try statement that can catch that
exception nor in the body of a method or constructor that "throws" that
exception.
33. Connection con=DriverManager.getConnection(url, "ema", "ema");
<-------------------------------------------->
*** Error: The method "java.sql.Connection getConnection(java.lang.String
$1, java.lang.String $2, java.lang.String $3);" can throw the checked
exception "java/sql/SQLException", but its invocation is neither enclosed in
a try statement that can catch that exception nor in the body of a method or
constructor that "throws" that exception.
Am I missing some libraries or calling the method incorrectly because of the
version of Java was older?
Here I also attached my code
<%
//connection and query
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:DB";
Connection con=DriverManager.getConnection(url, "sa", "password");
PreparedStatement query = con.prepareStatement("select Quarter, Month,
WeekDay, statusCode, Responded, CNT from REQUEST",
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = query.executeQuery();
rs.last();
int numrows = rs.getRow();
rs.beforeFirst();
%>
Thanks in advanced
Ku
The compiler is telling you that you must handle all possible thrown
exceptions
example:
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch (ClassNotFoundException anCNFExcp)
//Error page telling of error
try
Connection con=DriverManager.getConnection(url, "ema", "ema");
catch (java.sql.SQLException anSQLExcp)
//Error Page Telling Of error
you must check each method's signiture that you are calling and handle
the exceptions that it throws, a simpler way would be to handle the
whole block of code with a generic handler if you don't care what
piece of that code blows up
ex.
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:DB";
Connection con=
DriverManager.getConnection(url, "sa","password");
PreparedStatement query =
con.prepareStatement("select Quarter, Month,
WeekDay, statusCode, Responded, CNT from REQUEST",
ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = query.executeQuery();
rs.last();
int numrows = rs.getRow();
rs.beforeFirst();
catch (Exception anEx)
//Error Page
or nest the exceptions to find the specific
catch (ClassNotFoundException aCNFExcp)
//Display warning that driver could not be loaded
catch (SQLException anSQLExcp)
//display warning that SQL statements blew up
catch (Exception anEx)
//display warning that another error occured
Don Stacy
On 2 Nov 2001 15:24:05 -0800, "ku916" <[email protected]> wrote:
>
>I've wrote a JSP to access SQL Server database in J2SE sucessfully, but when
>I try that on a different server using Java 1.1 I get the same type of
>errors complaining about
>
>"the method " blah blah blah" can throw the checked exception
>"java/lang/ClassNotFoundException", but its invocation is neither enclosed
>in a try statement that can catch that exception nor in the body of a method
>or constructor that "throws" that exception."
>
>this is another sample of my errors
>
> 31. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> <------------------------------------------->
>*** Error: The method "java.lang.Class forName(java.lang.String $1);" can
>throw the checked exception "java/lang/ClassNotFoundException", but its
>invocation is neither enclosed in a try statement that can catch that
>exception nor in the body of a method or constructor that "throws" that
>exception.
>
>
> 33. Connection con=DriverManager.getConnection(url, "ema", "ema");
> <-------------------------------------------->
>*** Error: The method "java.sql.Connection getConnection(java.lang.String
>$1, java.lang.String $2, java.lang.String $3);" can throw the checked
>exception "java/sql/SQLException", but its invocation is neither enclosed in
>a try statement that can catch that exception nor in the body of a method or
>constructor that "throws" that exception.
>
>Am I missing some libraries or calling the method incorrectly because of the
>version of Java was older?
>
>Here I also attached my code
><%
>//connection and query
>Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>String url="jdbc:odbc:DB";
>Connection con=DriverManager.getConnection(url, "sa", "password");
>
>PreparedStatement query = con.prepareStatement("select Quarter, Month,
>WeekDay, statusCode, Responded, CNT from REQUEST",
>ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
>ResultSet rs = query.executeQuery();
>
>
>rs.last();
>int numrows = rs.getRow();
>rs.beforeFirst();
>
>%>
>
>Thanks in advanced
>Ku
-
Exception-Error when excecuting JSP-File in Crystal reports for Eclipse
Hi,
I have created a jsp-File from an rpt-File in Crystal report for Eclipse. When I start the jsp-File on Apache Tomact 5.5 then only errors occurs.
Coud anyone help me?
HTTP Status 500 -
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:
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.crystaldecisions.report.web.viewer.CrystalReportViewer resolves to a package
An error occurred at line: 7 in the generated java file
Only a type can be imported. com.crystaldecisions.reports.sdk.ReportClientDocument resolves to a package
An error occurred at line: 8 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.application.OpenReportOptions resolves to a package
An error occurred at line: 9 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase resolves to a package
An error occurred at line: 10 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.reportsource.IReportSource resolves to a package
An error occurred at line: 13 in the jsp file: /Bericht1-viewer.jsp
ReportClientDocument cannot be resolved to a type
10: try catch (ReportSDKExceptionBase e)
60:
An error occurred at line: 58 in the jsp file: /Bericht1-viewer.jsp
e cannot be resolved
55:
56:
57: } catch (ReportSDKExceptionBase e)
60:
61: %>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
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)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
Apache Tomcat/5.5.26
Bericht1.jsp:
<%@page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.reports.sdk.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%><%
// This sample code calls methods from the JRCHelperSample class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the JRCHelperSample class.
try {
String reportName = "Bericht1.rpt";
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// Store the report document in session
session.setAttribute(reportName, clientDoc);
// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
// Create the CrystalReportViewer object
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
// set the reportsource property of the viewer
IReportSource reportSource = clientDoc.getReportSource();
crystalReportPageViewer.setReportSource(reportSource);
// set viewer attributes
crystalReportPageViewer.setOwnPage(true);
crystalReportPageViewer.setOwnForm(true);
// Apply the viewer preference attributes
// Process the report
crystalReportPageViewer.processHttpRequest(request, response, application, null);
// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
} catch (ReportSDKExceptionBase e) {
out.println(e);
%>
Thanks
ArnoldAccording to the release notes, for the JRCHelperSample to compile, you must set the target runtime for the project.
To do this, either create a project from scratch that uses the Tomcat 5.5 target runtime, or go to the properties menu and ensure that the target runtime is set to the application server you will be using. -
Some jsps are throwing translation error in R12
Hi,
While installation some of our custom jsps are throwing Translation errors and some jsps are throws error for cannot resolve symbol for CallableStatement,ResultSet,Connection objects.
can anyone please help me out this?
Thanks
SoujanyaHi,
While installation some of our custom jsps are throwing Translation errors and some jsps are throws error for cannot resolve symbol for CallableStatement,ResultSet,Connection objects.
can anyone please help me out this?
Thanks
Soujanya -
Hello, I've been working on some Java as part of an engineering project, however my skills with Java aren't great, and my skills with GUI and Networking (which this involves) were only as a user before starting this. A problem that I haven't been able to get around is an exception error when using the actionPerformed method from java.awt.* .
My goal is to be able to, when a button is pushed, send a UDP packet with the command of the button to another PC. My understanding from tutorials is that actionPerformed is the method to use for when buttons are pushed, however creating or using a DatagramSocket inside this method causes an exception error (java.net.SocketException). Normally I would just tell it to throw exceptions, but when trying it says it cannot overwrite the method. I thought I got around this by placing the socket within another method and calling that instead, but that just simply caused a different exception (java.lang.Exception).
Any suggestions on how to make this work, or am I using the wrong method for this sort of thing?
Some code snippets:
Version 1
//when the buttons are pushed, this does the actions required.
public void actionPerformed(ActionEvent evt){
DatagramSocket socket = new DatagramSocket(11111); //Error here
Object source = evt.getSource();
Version 2
//when the buttons are pushed, this does the actions required.
public void actionPerformed(ActionEvent evt){
Object source = evt.getSource();
byte[] comm;
if (source == Identify) {
command = "identify";
comm = command.getBytes();
this.sendIt(command); //Errors here
version = this.getIt(); //and here
Version 3
//when the buttons are pushed, this does the actions required.
public void actionPerformed(ActionEvent evt)throws Exception { //Error Here
Object source = evt.getSource();
Thanks for any help.you can use the try-catch clause ...
like this:
public void actionPerformed(ActionEvent e){
try{
if(e.getSource() == myButton)
// your code here...
catch(Exception err){
err.printStackTrace(); // will print the error... read the first line error msg
} -
Why jsp throw exception , but error page can' t catch it .
I use japanese Unix.
so must add follow
<%@ page contentType="text/html;charset=SJIS" %>
then error happen
Jim Clark wrote:
> I'm not sure what the problem is, but the following works for me in WL5.1
> SP3 on NT:
>
> <%@ page errorPage="testerror.jsp" %>
> <h1>hello</h1>
> <%
> String yes = "yes";
> if ( yes.equals("yes")) throw new IllegalStateException("yes");
> %>
>
> The page that shows is my testerror.jsp. Double check your page directive
> specifying your error page.
>
> --
> Jim Clark
> Idea Integration
> http://www.idea.com
>
> "yang" <[email protected]> wrote in message news:[email protected]...
> > I use error page , but jsp have exception . error page not catch it.
> >
> > throw follow exception only
> >
> > ? 6 19 19:01:03 JST 2000:<E> <ServletContext-General> Servlet failed
> > with Exception
> >
> > java.lang.IllegalStateException: Attempt to change ContentType after
> > calling getWriter() (cannot cha
> > nge charset from 'SJIS' to 'null')
> > at java.lang.Throwable.fillInStackTrace(Native Method)
> > at java.lang.Throwable.fillInStackTrace(Compiled Code)
> > at java.lang.Throwable.<init>(Compiled Code)
> > at java.lang.Exception.<init>(Compiled Code)
> > at java.lang.RuntimeException.<init>(Compiled Code)
> > at java.lang.IllegalStateException.<init>(Compiled Code)
> > at
> > weblogic.servlet.internal.ServletResponseImpl.setEncoding(Compiled Code)
> >
> > at
> > weblogic.servlet.internal.ServletResponseImpl.setContentType(Compiled
> > Code)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
> > at
> > weblogic.servlet.internal.RequestDispatcherImpl.forward(Compiled Code)
> > at weblogic.servlet.jsp.PageContextImpl.forward(Compiled Code)
> > at
> > jsp_servlet._aeonmarket._loan._W_95_AEL032._jspService(Compiled Code)
> > at weblogic.servlet.jsp.JspBase.service(Compiled Code)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
> > at
> > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
> > Code)
> > at
> > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
> > Code)
> > at
> > weblogic.servlet.internal.ServletContextManager.invokeServlet(Compiled
> > Code)
> > at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled
> > Code)
> > at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
> > at weblogic.kernel.ExecuteThread.run(Compiled Code)
> >
-
I went away for a week. Everything fine. Since I got back (May 6 2010) when I click on any Google search result a pop-up box appears (sometimes when the search results page first appears before clicking anything) with this message:
"Debug Error:Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://ffamazonhot/content/lib/Extension.debug.js Line: 366""
Continual clicking (100+ clicks!) of the OK button eventually clears the dialogue but any subsequent search starts the whole process again. I also not that the style of the Google results p[age has changed.
I have to use a different browser for Google searches. IE7-OK Opera 9.64 - OK Chrome - OK (naturally)
I have cleared Cache, History, Cookies etc. I have tried reinstalling FF. I have disabled JavaScript in he browser. All no good.
I notice in the forums that others are having this problem in the same time range - i.e it has just started happening. I have tired contacting Google with the usual lack of success!
Help Please!
== URL of affected sites ==
http://www.google.com/search?q=google+javascript+error+in+FF+3.6.3&hl=en&start=10&sa=NAdditional information about my previous post " Google searches throw Javascript error "Debug Error: Exception...."
I have disabled the Amazon Add-on since the name Amazon appears in the debug message No change.
I attach a screen shot of the offending dialogue box
Hope someone can help. -
REQUEST HELP ON JSP ODBC EXCEPTION ERROR
hello.
1)currently im using the tomcat server 4.1.31 and am using jsp technology along with the microsoft access database as the backend. i havd placed the jsp files and the microsoft access database in a dir under the webapps/root/ on the tomcat server
2) i get the following error below and am unable to determine the root cause
3) im using the win xp professional .. please help
when i login i get the following exception error
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:498)
at org.apache.jsp.loginHandler_jsp._jspService(loginHandler_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
root cause
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at org.apache.jsp.loginHandler_jsp._jspService(loginHandler_jsp.java:54)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Apache Tomcat/4.1.31hello.
1)currently im using the tomcat server 4.1.31 and am
using jsp technology along with the microsoft access
database as the backend. i havd placed the jsp files
and the microsoft access database in a dir under the
webapps/root/ on the tomcat server
2) i get the following error below and am unable to
determine the root cause
3) im using the win xp professional .. please help
when i login i get the following exception error
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error
() that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: [Microsoft][ODBC
Microsoft Access Driver] Could not find file
'(unknown)'.
at
t
org.apache.jasper.runtime.PageContextImpl.handlePageEx
ception(PageContextImpl.java:498)
at
t
org.apache.jsp.loginHandler_jsp._jspService(loginHandl
er_jsp.java:82)
at
t
org.apache.jasper.runtime.HttpJspBase.service(HttpJspB
ase.java:92)
at
t
javax.servlet.http.HttpServlet.service(HttpServlet.jav
a:809)
at
t
org.apache.jasper.servlet.JspServletWrapper.service(Js
pServletWrapper.java:162)
at
t
org.apache.jasper.servlet.JspServlet.serviceJspFile(Js
pServlet.java:240)
at
t
org.apache.jasper.servlet.JspServlet.service(JspServle
t.java:187)
at
t
javax.servlet.http.HttpServlet.service(HttpServlet.jav
a:809)
at
t
org.apache.catalina.core.ApplicationFilterChain.intern
alDoFilter(ApplicationFilterChain.java:200)
at
t
org.apache.catalina.core.ApplicationFilterChain.doFilt
er(ApplicationFilterChain.java:146)
at
t
org.apache.catalina.core.StandardWrapperValve.invoke(S
tandardWrapperValve.java:209)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.catalina.core.StandardContextValve.invoke(S
tandardContextValve.java:144)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.catalina.core.StandardContext.invoke(Standa
rdContext.java:2358)
at
t
org.apache.catalina.core.StandardHostValve.invoke(Stan
dardHostValve.java:133)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:118)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:594)
at
t
org.apache.catalina.valves.ErrorReportValve.invoke(Err
orReportValve.java:116)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:594)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.catalina.core.StandardEngineValve.invoke(St
andardEngineValve.java:127)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.coyote.tomcat4.CoyoteAdapter.service(Coyote
Adapter.java:152)
at
t
org.apache.coyote.http11.Http11Processor.process(Http1
1Processor.java:799)
at
t
org.apache.coyote.http11.Http11Protocol$Http11Connecti
onHandler.processConnection(Http11Protocol.java:705)
at
t
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolT
cpEndpoint.java:577)
at
t
org.apache.tomcat.util.threads.ThreadPool$ControlRunna
ble.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
root cause
java.sql.SQLException: [Microsoft][ODBC Microsoft
Access Driver] Could not find file '(unknown)'.
at
t
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.jav
a:6958)
at
t
sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:711
5)
at
t
sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:
3074)
at
t
sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcCo
nnection.java:323)
at
t
sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.ja
va:174)
at
t
java.sql.DriverManager.getConnection(DriverManager.jav
a:512)
at
t
java.sql.DriverManager.getConnection(DriverManager.jav
a:193)
at
t
org.apache.jsp.loginHandler_jsp._jspService(loginHandl
er_jsp.java:54)
at
t
org.apache.jasper.runtime.HttpJspBase.service(HttpJspB
ase.java:92)
at
t
javax.servlet.http.HttpServlet.service(HttpServlet.jav
a:809)
at
t
org.apache.jasper.servlet.JspServletWrapper.service(Js
pServletWrapper.java:162)
at
t
org.apache.jasper.servlet.JspServlet.serviceJspFile(Js
pServlet.java:240)
at
t
org.apache.jasper.servlet.JspServlet.service(JspServle
t.java:187)
at
t
javax.servlet.http.HttpServlet.service(HttpServlet.jav
a:809)
at
t
org.apache.catalina.core.ApplicationFilterChain.intern
alDoFilter(ApplicationFilterChain.java:200)
at
t
org.apache.catalina.core.ApplicationFilterChain.doFilt
er(ApplicationFilterChain.java:146)
at
t
org.apache.catalina.core.StandardWrapperValve.invoke(S
tandardWrapperValve.java:209)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.catalina.core.StandardContextValve.invoke(S
tandardContextValve.java:144)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.catalina.core.StandardContext.invoke(Standa
rdContext.java:2358)
at
t
org.apache.catalina.core.StandardHostValve.invoke(Stan
dardHostValve.java:133)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:118)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:594)
at
t
org.apache.catalina.valves.ErrorReportValve.invoke(Err
orReportValve.java:116)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:594)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.catalina.core.StandardEngineValve.invoke(St
andardEngineValve.java:127)
at
t
org.apache.catalina.core.StandardPipeline$StandardPipe
lineValveContext.invokeNext(StandardPipeline.java:596)
at
t
org.apache.catalina.core.StandardPipeline.invoke(Stand
ardPipeline.java:433)
at
t
org.apache.catalina.core.ContainerBase.invoke(Containe
rBase.java:948)
at
t
org.apache.coyote.tomcat4.CoyoteAdapter.service(Coyote
Adapter.java:152)
at
t
org.apache.coyote.http11.Http11Processor.process(Http1
1Processor.java:799)
at
t
org.apache.coyote.http11.Http11Protocol$Http11Connecti
onHandler.processConnection(Http11Protocol.java:705)
at
t
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolT
cpEndpoint.java:577)
at
t
org.apache.tomcat.util.threads.ThreadPool$ControlRunna
ble.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Apache Tomcat/4.1.31*************************************************************************
Hi,
I think u didn't create the DSN for ur Microsoft Access database.
First create the DSN name by giving the location of ur .mdb file. U can browse and select the file by clicking the "select " button in the DSN creation window. U should give the DSN name in ur connection URL. If u need any further assistance let me know.
Regards
null -
PleaseHelp on jsp and Mysql connectivity and a lot of exception errors
Hi,
I am Trying to connect a JSP page with Mysql database. I am having a lot of probelms. After having a lot of problems in connecting the JSp with Mysql. Intilally it was giving me the exception error that " NO appropriate driver was found. After modifying the URl it was fine. Now It is giving the Following errors.
servlet.ServletException: Communication link failure: java.io.IOException, underlying cause: Unexpected end of input stream ** BEGIN NESTED EXCEPTION ** java.io.IOException MESSAGE: Unexpected end of input stream
In a window before loading the Explorer page it is giving the following error that The port 8081 is already in use and i should expand to other ports. Noraml JSP Files which used to work before are also not working .
Internal Tomcat JWSDP is alos not working. If i try to start the server it says that port 8081 is already in USe . A java.net.connection exception is also occuring. The normal JSP files are also not working. What is Happening. I am also giving the code i have writted. PLease tellme why so many exception errors are occuring.
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:8081/mis_project", "root", " ");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("Select study_semester FROM Semester");
while(rs.next()) {
%>
<option value="<%= rs.getString("Study_Semester") %>">
</option>
<% }
if(rs!=null) rs.close();
if(stmt!=null) stmt.close();
if(con!=null) con.close();
I am trying to connect to Mysql and automatocally populate a field in a Form in later JSp pages i intend to record the data entered in these fields into other tables.<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/myDB?user=username&password=mypass");
Statement stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY);
String cat = "";
try{
cat = request.getParameter("category");
}catch(NullPointerException npe){}
ResultSet rs = stmt.executeQuery("SELECT id,fullname FROM users WHERE category LIKE '%motor%' AND subcategory like '%"+cat+"%'");
%>
This piece gets a category parameter from a form post and uses it to search for a specific category in a database table. I think maybe u need to download JConnector from mysql site and unzip it to the classes folder of your WEB-INF in Tomcat server...... i hope this helps a bit -
Programmatically adding chart to a report throws exception
programmatically adding chart to a report throws exception "chart condition fields are not valid".
Configuration:
I am using CR4E to create web application, I've added RAS jars (rasapp.jar, rascore.jar, reporttemplate.jar, serialization.jar) to this web application. For designing reports i am using Crystal Reports 2008.
Code:
<%
// Get the previously opened report from the session.
ReportClientDocument reportClientDocument =
(ReportClientDocument)session.getAttribute("ReportClientDocument");
System.out.println(reportClientDocument.getReportDocument().getName());
// Try to get the report's DataDefinition object.
IDataDefinition dataDefinition;
try
dataDefinition = reportClientDocument.getDataDefController().getDataDefinition();
// If the DataDefinition object can not be retrieved, redirect the user to an error page.
catch (Exception e)
System.out.println("With error1");
return;
// Create a new ChartDefinition object and set its type to ChartType.group.
ChartDefinition chartDefinition = new ChartDefinition();
chartDefinition.setChartType(ChartType.group);
Get the conditional field of the report's first group. Set this conditional
field for the ChartDefinition object using the setConditonalFields method. Notice
that the conditional field is first placed in a Fields collection because the
setConditionalFields method takes a Fields object as an argument.
Fields conditionFields = new Fields();
if (!dataDefinition.getGroups().isEmpty())
IField field = dataDefinition.getGroups().getGroup(0).getConditionField();
System.out.println("Condition field name ->" + field.getLongName(Locale.ENGLISH));
conditionFields.addElement(field);
chartDefinition.setConditionFields(conditionFields);
//Get the summary field name from the form on the previous page.
String summaryFieldName = URLDecoder.decode(request.getParameter("summaryField"));
System.out.println("Summary field name ->" + summaryFieldName);
Loop through all of the report's summary fields until the one matching the name
above is found. Set this summary field for the ChartDefinition object using the
setDataFields method. Notice that the summary field is first placed in a Fields
collection because the setDataFields method takes a Fields object as an argument.
Fields dataFields = new Fields();
for (int i = 0; i < dataDefinition.getSummaryFields().size(); i++)
IField summaryField = dataDefinition.getSummaryFields().getField(i);
if (summaryField.getLongName(Locale.ENGLISH).equals(summaryFieldName))
System.out.println("Adding data field ->" + summaryFieldName);
dataFields.addElement(summaryField);
chartDefinition.setDataFields(dataFields);
Create a new ChartObject to represent the chart that will be added. Set the
ChartDefinition property of the ChartObject using the ChartDefinition object created
above.
ChartObject chartObject = new ChartObject();
chartObject.setChartDefinition(chartDefinition);
Get the chart type, chart placement, and chart title strings from the form on the
previous page. If no chart title was chosen, create a generic title.
String chartTypeString = request.getParameter("type");
String chartPlacementString = request.getParameter("placement");
String chartTitle = request.getParameter("title");
System.out.println("chartTypeString ->"+ chartTypeString + "<-chartPlacementString->" + chartPlacementString + "<-chartTitle->"+chartTitle);
if (chartTitle.equals(""))
chartTitle = "untitled";
Create a ChartStyleType object and a AreaSectionKind object based on the
the chartTypeString and chartPlacementString retrieved above. In this example
possible chart types are bar chart and pie chart. Possible chart placements
are header and footer.
ChartStyleType chartStyleType = ChartStyleType.from_string(chartTypeString);
AreaSectionKind chartPlacement = AreaSectionKind.from_string(chartPlacementString);
// Set the chart type, chart placement, and chart title for the chart.
chartObject.getChartStyle().setType(chartStyleType);
chartObject.setChartReportArea(chartPlacement);
chartObject.getChartStyle().getTextOptions().setTitle(chartTitle);
// Set the width, height, and top for the chart.
chartObject.setHeight(5000);
chartObject.setWidth(5000);
chartObject.setTop(1000);
Get a ReportDefController object that can be used to modify the report's definition.
ReportDefController reportDefController;
try
reportDefController = reportClientDocument.getReportDefController();
catch (Exception e)
System.out.println("With Error2");
return;
*Create a Section object that represents the section that will hold the chart.
If the chart placement was set header, get the header section, otherwise, if the
chart placement was set to footer, get the footer section.
Section chartSection = null;
if (chartPlacement.equals(AreaSectionKind.reportHeader))
IArea reportHeaderArea =
reportDefController.getReportDefinition().getReportHeaderArea();
chartSection = (Section)reportHeaderArea.getSections().getSection(0);
else if (chartPlacement.equals(AreaSectionKind.reportFooter))
IArea reportFooterArea =
reportDefController.getReportDefinition().getReportFooterArea();
chartSection = (Section)reportFooterArea.getSections().getSection(0);
Add the chart to the section using the ReportDefController object.
reportDefController.getReportObjectController().add(chartObject, chartSection, 1);
// Save the changes and close the report.
reportClientDocument.save();
reportClientDocument.close();
session.removeAttribute("ReportClientDocument");
%>
Trace:
com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The chart condition fields are not valid.---- Error code:-2147213287 Error code name:invalidChartObject
at com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException.throwReportDefControllerException(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.add(Unknown Source)
at org.apache.jsp.AddChart_jsp._jspService(AddChart_jsp.java:230)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)Please try this code snippet
var cs:ColumnSeries = new ColumnSeries();
cs.dataProvider = dp;
cs.displayName = "Series 2";
cs.yField = "values";
chart.series.push(cs);
OR
var temp:Array = [];
var cs:ColumnSeries = new ColumnSeries();
cs.dataProvider = dp;
cs.displayName = "Series 2";
cs.yField = "values";
temp = chart.series;
temp.add(cs);
chart.series = temp; -
Hi,
1) Internal User expected exception:
Exception: Payments,apply credits,disputes and print are not supported when multiple customer/currency transactions are selected
2) External User is throwing below error instead of throwing above exception.
Error
You are trying to access a page that is no longer active.
The referring page may have come from a previous session. Please select Home
to proceed.
found this MACCHECK from fnd logs of external user payment.
MACCHECK: . Parameter failing validation is :mode. The parameter mode with value MultiPay could not be recognized as part of Server's response on the previous request. Incoming URL is : /OA_HTML/OA.jsp?page=/oracle/apps/ar/irec/endeca/webui/EndecaDummyPG . Current URL is : /OA_HTML/OA.jsp?page=/oracle/apps/ar/irec/endeca/webui/OIREndecaCustHomePG&akRegionApplicationId=222&_ti=1125493452&oapc=10&retainAM=Y&addBreadCrumb=N&oas=6-LL4ndIUFLX-2zjQAQD6A.. . Referer URL is : https://<hostname>:4443/endeca/web/ar/customer?doAsUserLanguageId=en_US&languageId=en_US . HTTP Request Method is : POST
can someone please help.
Thanks,
RRSWell, I compared my classpath between my windows batch file and the
makefile (that comes with the samples installation) on Solaris and realized
that I am using different sets of jars.
So, I removed the extra jars from the makefile to narrow down the
problem. If I remove the /opt/SUNWam/lib/servlet.jar from the makefile,
I can reproduce this problem on the Solaris box as well.
When I include this servlet.jar on my windows machine the program works!
Only jars I have in my classpath are amclientsdk.jar and servlet.jar which
I have copied from my installation (/opt/SUNWam/lib) on the Solaris box.
Just the same way, by copying the am_services.jar, saaj-api.jar, and jaxm-api.jar,
from the Solarix box to the windows machine,
I am also able to pull the assertions from the Access Manager.
I installed Sun Java Enterprise System 2005Q1 on a Solaris 10 machine.
During the installation, I configured to install the Access Manager
in Sun Application Server.
Why do I need to have different set of jars on the windows machine
for the Access Manager client SDK ?
Could you please point me to a download link where I could download
the correct Windows Access Manager Client SDK for
Sun Java System Access Manager 6.0 (Sun JES 2005Q1)?
Thanks. -
Exceptions thrown after a jsp:include
Hi all,
At the beginning of my JSP, I can't use the JSP include directive because I
need to do a specific include from another webapp servlet context. Thus I
wrote my own include tag <mytag:include page="" context=""/> where I use
RequestDispatcher.include().
But then I am facing the following problem with this JSP :
[myjsp.jsp]
<mytaglib:include page="" context=""/>
<mytaglib:stgElse/>
if the second tag <mytaglib:stgElse> is throwing a JspException, and if I
use the error handling system of the webapp :
[web.xml]
<error-page>
<exception-type>javax.servlet.jsp.JspException</exception-type>
<location>/web/en/pf/error.jsp</location>
</error-page>
I get : "java.lang.IllegalStateException: Cannot forward a response that is
already committed"
because it tries to do a forward after an include which needed a flush of
the buffer previously, what means the response was already comitted.
Thus the question is : how to handle exceptions coming after an include was
done, that is to say after a flush of the buffer has already been committed
Thanks for any help.
Yann
In the doc, it states:
sendRedirect
If the response has already been committed, this method throws an
IllegalStateException. After using this method, the response should be
considered to be committed and should not be written to.
In other words, you must not do anything before or after with the response.
Cameron Purdy, LiveWater
"Lawrence Lourduraj" <[email protected]> wrote in message
news:8ip9p4$r0g$[email protected]..
>
Friends,
How do I do a redirect either through HttpServletResponse.sendRedirect ()or
<jsp:forward /> in a JSP that does a <jsp:include /> at the top.
I am getting a IllegalState exception.
Thanks
Regards
Lawrence Lourduraj
VocaLoca Inc. -
Error Page in JSP Having Problems.
Hi all,
I am having some issues with error pages in JSP.
I am trying to display one simple error image when my JSP is having any kind of error, lets say when it throws any exception. Here goes the code
throwError.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page errorPage="errorPage.jsp" %>
<html>
<body>
Hello All,
<%! int x = 12/0; %>
</body>
</html>errorPage.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page isErrorPage="true" %>
<html>
<body>
<img src="error.jpg" height="100" width="100">
</body>
</html>web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<error-page>
<error-code>500</error-code>
<location>/errorPage.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.ArithmeticException</exception-type>
<location>/errorPage.jsp</location>
</error-page>
</web-app>Please see if you can help
Currently when I run the throwError.jsp in Eclipse, nothing happens. It shows "500 Internal server error". But the error.jpg doesn't appear on browser. I have copied the error.jpg properly in the WebContent folder of the Web App root.
Thanks much...
GoldestRaghu,
You need to fix your syntax:
<%=someObje.getNo()>
not
<=someObje.getNo()>
Your concept of how to use error.jsp seems correct.
--BobC -
DefineObjects throws exception
I'm just trying to get a simple portlet running on 8.1 sp 2
Error opening /bookmark_01/jsp/view.jsp.
The source of this error is java.lang.NullPointerException at weblogic.utils.UnsyncHashtable.put(UnsyncHashtable.java:277)
at weblogic.servlet.jsp.PageContextImpl.setAttribute(PageContextImpl.java:163)
at com.bea.portlet.container.tags.DefineObjectsTag.doStartTag(DefineObjectsTag.java:39)
at jsp_servlet._bookmark_01._jsp.__view._jspService(view.jsp:5) at com.bea.portlet.jsp.PortletJspBase.service(PortletJspBase.java:110)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at co
<%@ page session="false" %>
<%@ page import="javax.portlet.*"%>
<%@ page import="java.util.*"%>
<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>
<portlet:defineObjects/>
Hello,<br>
I am the bookmark portlet.<br>
<br>
Current Portlet Mode: <%=renderRequest.getPortletMode()%><br>
Current Window State: <%=renderRequest.getWindowState()%><br>
<br>You need to look into the API documentation for the Scanner class. The method invocations throw an IOException. Now, since these could throw an exception, they need to be handled when the call is made. So, there should either be a try-catch block [read the Java tutorial for exception handling] to handle the exception or the method [in this case, main] should let the exception propagate further. This exception propagation is achieved by the throws clause. throws keyword indicates that the method is going to throw the exception (while causing an abrupt end to the code within it) and this needs to be handled by any method calling it.
In the specific case, since main is the entry point of the program, the exception (whenever thrown) will result in a stack trace being printed on the standard output device (screen) as a default behaviour. -
Function module JOB_CLOSE throwing exception
Hello,
We have a batch job which has 2 steps:
1) Step 1 uses job_open, job_submit and job_close and immediately schedules batch job A/P_ACCOUNTS which in turn creates batch input sessions A/P_ACCOUNTS.
2) Step 2 Processes A/P_ACCOUNTS sessions created yesterday or today.
In few cases, job_close is throwing exception job_close_failed. I believe that error is coming due to non availability of work processes. Job A/P_Accounts is defined as a class C batch job. There is a check in the FM job_close which does the following check:
- if the class of a batch job is B or C, it calculates the number of free work processes. If there are no work processes available then JOB_CLOSE throws JOB_CLOSE_FAILED exception.
- If the class is u2018Au2019, it skips this check.
We have an option of changing the class of batch job to A but there are some system critical jobs that are running as class A.
My question is:
In the code, JOB_CLOSE has been called for scheduling the job A/P_ACCOUNTS with parameter start immediately. Can anyone please let me know what will happen if function JOB_CLOSE is not called with start immediately option? Will the batch job A/P_ACCOUNTS wait till the time work processes are available?
Or, can anything else be done to solve the issue?
Regards,
SiddharthHI,
This is my experience with job_close..
when i was working in zprograms then i was able to scedule it any time i wanted..
but in my standard program when i tried it didn't worked....
so i have to use that option of starting it immediately..
and then it is working fine..
now if i schedule 5 jobs... one after another..
its get queued up...and once the processor is free...its working..
my code of job close
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = job_count
jobname = job_name
strtimmed = yes " yes = 'X'
IMPORTING
job_was_released = job_released
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9.
regards,
Yadesh
Maybe you are looking for
-
Document number ranges changes
Dear friends, While creating the document number ranges for current year, user wrongly changed the previous year number ranges, now it is giving new number ranges for new documents which are posted in previous year, how to reset the previous number r
-
This has been annoying me for about... a year now. On startup of Konqueror, it sometimes crashes instantly. Closing down the crash handler and clicking the Konq icon again: Exact same thing. It always does it two times in a row, and the third time it
-
Urgent : JMenuBar repaint problem
hello all, i'm facing a problem with jmenubar. i have developed an applet which contains a jmenubar, toolbaar & a panel. i'm doing some operation on the panel like rotating it by different angles. these operations are given in the menu. i have given
-
Auto download of podcasts a prescribed time
Is there a way to have windows or itunes (or some other program) automatically download one or more podcasts at a predetermined time? I am on satellite and they penalized me if I down load more than 200MB in a singel day except that they do not inclu
-
When making a magic iDVD is there a way to get all of the movies that you save to the project to play back to back automatically?