Why am I getting this error?

Hello,
I am trying to call my Java class from a JSP page. I am getting this error:
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\em\jsp\Test_0005fSummarySBU_0005fscreen$jsp.java:82: Wrong number of arguments in constructor.
strQuery=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
I don't understand why I am getting this error as I pass three paramters to the Java class, and I accept three parameters in the constructor.
JSP:
<!-- META TAG is necessary to ensure page recompiles--------------->
<META Http-Equiv="Expires" Content="0">
<META Http-Equiv="Pragma" Content="no-cache">
<HTML>
<!-- The two Java Classes used to build the AlphaBlox query -->
<%@ page import="com.home.tool.reporting.*" %>
<%@ page errorPage="run_error.jsp" %>
<%@ page import="java.util.List,
                 java.util.Collection,
            java.net.URLDecoder" %>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Economic Model - Summary SBU Report</TITLE>
<!--Run the onload here, re-retrieve params BM and Breport, pass to onload---------->
<BODY bgcolor=#ffffff>
<%
                Collection strQuery = null;
                String strEssUser = "test";
                String strProcessingMonth = "JUL";
                String strProcessingYear = "2002";
                strQuery=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
                System.out.println(strQuery);
%>
</BODY>
</HTML>Java class:
package com.home.tool.reporting;
import java.net.URL;
import java.sql.*;
import java.io.*;
import java.util.*;
public class ListReturn extends ReportQueryBuilder
        public void ListReturn()
        public Collection ListReturn(String userID, String pMonth, String pYear)
            throws ReportQueryBuilderException
            //declare Collection store Value-Object pairs
            Collection c = new ArrayList();
            //declare and initialize variables
            CallableStatement cs = null;
            ResultSet rs = null;
            // declare call for stored procedure to pass in three parameters
            String pass = "{Call dbo.p_rep_srSbuList(?, ?, ?)}";
            try
                //open CallableStatement using JDBC connection to SQL database
                cs = con.prepareCall(pass);
                //set IN parameters
                cs.setString(1, userID);
                cs.setString(2, pMonth);
                cs.setString(3, pYear);
                //execute call and return result set
                rs = cs.executeQuery();
                //loop through result set storing each record as a Value-Object pair
                while(rs.next())
                    c.add(new ListBoxValueObjects(rs.getString(1), rs.getString(2)));
            catch (SQLException sqle)
          throw new ReportQueryBuilderException(replaceToken("Problems executing query: "+sqle.getMessage(), "'", "\\'"));
            finally
                try
                    //close the Result Set and CallableStatement
                    rs.close();
                    cs.close();
                catch(Exception e)
                    System.out.print("\nFATAL   : " + e);
                    System.out.print("\nFATAL   : " + e);
            return c;
}Does anyone see whay I am getting this error??
I can't figure out the problem!

change this:
<%
     Collection strQuery = null;
     String strEssUser = "test";
     String strProcessingMonth = "JUL";
     String strProcessingYear = "2002";
     strQuery=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
     System.out.println(strQuery);
%>To this:
<%
     Collection strQuery=null;
     String strEssUser="test";
     String strProcessingMonth="JUL";
     String strProcessingYear="2002";
     lr=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
     System.out.println(lr.getQuery())
%>Then make a new public method in your Java called getQuery()
public Collection getQuery();Do what you need to do to process it and return the value in getQuery. You will also probably need to make private variables in you declaration to do the processing on.

Similar Messages

  • I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?

    I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?

    In relation to my previous inquiry regarding inability to view a pdf file using Safari...
    Is it possible that I can view other online bills from other website but not this particular bill from one specific website?
    Sorry if I missed any important point in this article -->Apple Safari 5.1 and Adobe Reader/Acrobat Advisory
    Thanks again!

  • Why do I get this error message when I open Organizer in Photoshop Elements 11 "Elements Organizer has stopped working"? My only option is to Close Program so I am effectively locked out of my photo catalogue.  I have reinstalled the program to no avail.

    Why do I get this error message when I open Organizer in Photoshop Elements 11 "Elements Organizer has stopped working"? My only option is to Close Program so I am effectively locked out of my photo catalogue. I have tried reinstalling the program but it made no difference to the error message.
    Could someone help please?  Steph

    Hi,
    Please give a try to Photoshop Elements (PSE) knowledge base. steps mentioned on this and see if it works.
    Regards
    Kishan

  • Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.

  • More than maximum 5 filtered album lists trying to register. This will fail,Why i am getting this error when i pick video from Photo library.

    I am able to pick 4 videos from the Photo library in my iPhoneAPP but when i try to pick 5th one it throws an error:
    "More than maximum 5 filtered album lists trying to register. This will fail,Why i am getting this error when i pick video from Photo library."

    Hello Tate r Bulic
    I don't have any idea how to remove this error,can i pick more than 5 videos from the photo library...
    If it's then please help me and gimme idea..Thanks

  • According to my network provider (Amaysim/Optus) Tethering is enabled, so why do I get this error message "to enable personal hotspot on this account, contact OPTUS"

    According to my network provider (Amaysim/Optus) Tethering is enabled, so why do I get this error message "to enable personal hotspot on this account, contact OPTUS"
    Amysim/Optus support can not help.
    I can not check or change any network settings (no APN settings)
    I have synced phone using latest itunes (10.5.3).
    Phone software is up to date (5.0.1).
    Network settings have been reset.
    SIM card has been taken out and put back in.
    Phone has been switched off/on again.
    Another sim card from virgin works ok (hotspot option is visible and can be turned on/off as required)
    The Amaysim/Optus SIM card can be put into another phone (android) and tethering/hotspot works fine.
    Can anyone provide solution to this nightmare?

    I am having the same issue although i have an iphone 5. I have contacted Live connected numerous times an tried everything imaginable to solve the issue. Is it possibly a handset issue? I cant recieve any help from optus as im with live connected, they cant help me and apple keep telling me to contact your carrier ( live connected). Seems to make me want to switch providers pretty shortly..
    please let me know if you can solve your issue and maybe it can help me too..

  • Why am i getting this error? they are not the same?

    1021: Duplicate function definition.
    1021: Duplicate function definition.
    stop();
    import flash.events.MouseEvent;
    // home button definition \\
    // Portfolio button definition \\
    Portfolio_btn.addEventListener(MouseEvent.CLICK, pClick);
    function pClick(event:MouseEvent):void{
        gotoAndStop("getPortfolio");
    // Contact Me button defintion \\
    Contact_btn.addEventListener(MouseEvent.CLICK, cClick);
    function cClick(event:MouseEvent):void{
        gotoAndPlay("contactme");
    why am i getting this error the functions have different names... idk what to do they are for two different buttons I am using action script 3.0

    i did what u said and it said these two lines were the same
    // Portfolio button definition \\
    Portfolio_btn.addEventListener(MouseEvent.CLICK, pClick);
    function pClick(event:MouseEvent):void{                                                         <--------this one
        gotoAndStop("getPortfolio");
    // Contact Me button defintion \\
    Contact_btn.addEventListener(MouseEvent.CLICK, cClick);
    function cClick(event:MouseEvent):void{                                                           <--------and this one
        gotoAndPlay("contactme");
    it gave me the same error but they are not the same

  • Why am I getting this error message......."Adobe Reader could not open 'SBA 413.pdf' because it is e

    why am I getting this error message when I try to open a PDF file?  Adobe Reader could not open 'SBA 413.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

    It's difficult for anyone to say how to fix it. Try getting a new copy of it. Did you download it from a web site, as an email attachment, or something else?
    I donwloaded that form from the SBA web site and it worked fine for me. It is an XFA form created in LiveCycle Designer, but those should work fine with the desktop versions of Adobe Reader. So try downloading it: http://www.sba.gov/sites/default/files/SBA%20413_0.pdf

  • Why am I getting this error message when I try to import? "The following files were not imported because they could not be read. (645)" I can see them :(

    Why am I getting this error message when I try to import? "The following files were not imported because they could not be read. (645)" I can see them
    Is was working this morning!

    Depends on your operating system
    Go to google, try typing in
    Change permissions Windows
    or
    Change permissions Mac

  • Your message was not sent. Tap "try again" to send this message. Why do i get this error?

    your message was not sent. Tap "try again" to send this message. Why do i get this error?

    Hi babychriss,
    Thanks for visiting Apple Support Communities.
    There are several possible reasons why a message might not send. I'd recommend starting with the troubleshooting steps in this article:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Regards,
    Jeremy

  • When I want to scroll through My picks why do I get this Error message (A necessary data reference could not be resolved."

    When I want to scroll through My pictures  why do I get this Error message (A necessary data reference could not be resolved)

    Before anyone can help, they need information to work with. Basic stuff:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. What were you doing when the problem arose?
    - Did it ever work properly?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    Anything else you can think of that might allow someone else to understand your issue.
    With this kind of information somebody can develop a starting point for troubleshooting the issue.
    Posts that consist of "iPhoto doesn't work. Help" or "iPhoto won't print" or "Suddenly I have no photos!!!!!!!!!!" mean that any helper is simply guessing. With information, s/he may be able to get your issue resolved sooner.

  • GetLastError: 1392 - why do I get this error message when I try to uninstall Acrobat XI Pro?

    GetLastError: 1392 - why do I get this error message when I try to uninstall Acrobat XI Pro?

    Hi uckldag,
    Please try uninstalling using Acrobat Cleaner tool ( Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs ) and check.
    Regards,
    Rave

  • Why do I get this Error Code:6

    Why do I get this Error Code:6 When I try to open my CC Photoshop CS5?
    I uninstall and I reinstall the product,But this problem continues occurs.Why?

    Run CC Cleaner and try to install again
    CS Cleaner Tool for installation problems | CCM, CS6, CS5.5, CS5, CS4, CS3
      http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

  • Why do I get this error when I want to run a test using Ant?

    Why do I get this error when I run the Ant build file?
    Testsuite: JUnit
    Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    Caused an ERROR
    JUnit
    java.lang.ClassNotFoundException: JUnit
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

    Abder-Rahman wrote:
    In the "XML" file, I was giving the name of the test as JUnit ---> <test name="JUnit">Well, do you have a class called just "JUnit" that contains a test?

  • Why i am getting this error:205 while downloading creative cloud

    why i am getting this error:205 while downloading creative cloud?

    Please check the points and steps below:
    Computer should be on Home network.
    Disable the firewall.
    Reset internet explorer & disabled add ons.
    Disable any Anti-Virus installed on the machine.
    Try in Safe mode in case of Windows & root user for Mac.
    -Ankit

Maybe you are looking for

  • Macbook Air HDMI adapter not working

    I know there are other threads about this but they are a bit outdated. So anyway I bought an hdmi adapter for my macbook air and it was working perfectly for about an hour and a half when suddenly the tv registered "no signal" yet the macbook was sti

  • Convert internal table to pdf and send the attachment trough bcs method

    Hi everyone , I try to send an pdf attachment trough bcs method but I failed. I use scms_text_to_xstring then use method cl_document_bcs=>xstring_to_solix and then add attachment with the bcs method. Thanks in advance. Create the attachment       CLA

  • Bogus Invalid Object in MERGE Statement

    Let me begin by saying that I have been working with MERGE since its inception, and I am familiar with the fundamental gotcha's. This problem is more inexplicable. (It's one of those things that I expect, when someone explains it, will be a DOH! mome

  • Will a protective cover or slick wrap protect the iphone 4 or 4s from drops?

    I love the feeling of the iphone without the case. I love it's sleek form factor and I was thinking of getting a slick wrap carbon fiber protection thingy. I know it protects againest scratches and scuffs but will the iphone 4s 's  glass break if it

  • BAdI SMOD_RSR00004 for Jump from BW Query to R/3 transaction

    Hi, I have to create a jump query to an R/3 transaction. The I/O 'Object key' in the BW corresponds to the r/3 field OBJKY of the NAST table. After trying out all the possibilities/ assignments in RSBBS(BW) also its not working. Can anybody pls guide