473,626 Members | 3,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.ChartRequest is an abstract class. It can't be instantiated.

When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni
Jul 17 '05 #1
10 4514
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni


Prove it. Post code.
Jul 17 '05 #2
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni


Prove it. Post code.
Jul 17 '05 #3
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message news:<0t******* *************@t exas.net>...
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni


Prove it. Post code.


// Decompiled by Jad v1.5.7. Copyright 1997-99 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconVall.../8617/jad.html
// Decompiler options: packimports(3) fullnames fieldsfirst
// Source File Name: ChartServlet.ja va

import java.io.*;
import java.util.*;
import java.text.*;
import java.awt.*;
import java.awt.image. *;
import javax.servlet.* ;
import javax.servlet.h ttp.*;

import it.finsiel.tea. nhcnwi.datimete o.ejb.*;
import it.finsiel.tea. nhcnwi.datimete o.util.*;
import it.finsiel.tea. nhxnwi.util.*;

import javachart.utili ty.ChartRequest ;
import javachart.contr ib.*;
import javachart.servl et.*;

// Referenced classes of package javachart.servl et:
// Bean, CacheManager, barApp

public class ChartServlet extends HttpServlet
{
protected RicercaDatimete oValue rdm = new RicercaDatimete oValue();
protected HttpSession session;
protected String writeDirectory = "";
protected String imageWidth = "";
private SimpleDateForma t sdf = new SimpleDateForma t("yyyyMMddHH") ;

// Initializes this servlet
public void init(ServletCon fig config) throws ServletExceptio n {

super.init(conf ig);

writeDirectory = config.getInitP arameter("kawac hartWriteDirect ory");
imageWidth = config.getInitP arameter("image Width");
............... ............... ............... ............... ............... ............and
so on
Jul 17 '05 #4
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message news:<0t******* *************@t exas.net>...
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni


Prove it. Post code.

Is is possible it give me that error as I don't define all the methods
of the interface HttpServletRequ est ??
thanks
Jul 17 '05 #5
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message news:<0t******* *************@t exas.net>...
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni


Prove it. Post code.


Im sorry that is the class which the compiler consider abstract ...
but can't read abstract nowhere .... Thanks for the help
// Decompiled by DJ v3.5.5.77 Copyright 2003 Atanas Neshkov Date:
11/11/2003 16.52.59
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check
often for new version!
// Decompiler options: packimports(3)
// Source File Name: ChartRequest.ja va

package javachart.utili ty;

import java.io.Buffere dReader;
import java.io.IOExcep tion;
import java.util.Enume ration;
import java.util.Hasht able;
import javax.servlet.S ervletInputStre am;
import javax.servlet.S ervletRequest;
import javax.servlet.h ttp.*;

public class ChartRequest
implements HttpServletRequ est
{

public ChartRequest(Ht tpServletReques t httpservletrequ est)
{
table = new Hashtable();
r = httpservletrequ est;
}

public void clearTable()
{
table = new Hashtable();
}

public Object getAttribute(St ring s)
{
return r.getAttribute( s);
}

public String getAuthType()
{
return r.getAuthType() ;
}

public String getCharacterEnc oding()
{
return r.getCharacterE ncoding();
}

public int getContentLengt h()
{
return r.getContentLen gth();
}

public String getContentType( )
{
return r.getContentTyp e();
}

public Cookie[] getCookies()
{
return r.getCookies();
}

public long getDateHeader(S tring s)
{
return r.getDateHeader (s);
}

public String getHeader(Strin g s)
{
return r.getHeader(s);
}

public Enumeration getHeaderNames( )
{
return r.getHeaderName s();
}

public ServletInputStr eam getInputStream( )
throws IOException
{
return r.getInputStrea m();
}

public int getIntHeader(St ring s)
{
return r.getIntHeader( s);
}

public String getMethod()
{
return r.getMethod();
}

public String getParameter(St ring s)
{
return (String)table.g et(s);
}

public Enumeration getParameterNam es()
{
return table.elements( );
}

public String[] getParameterVal ues(String s)
{
return r.getParameterV alues(s);
}

public String getPathInfo()
{
return r.getPathInfo() ;
}

public String getPathTranslat ed()
{
return r.getPathTransl ated();
}

public String getProtocol()
{
return r.getProtocol() ;
}

public String getQueryString( )
{
return r.getQueryStrin g();
}

public BufferedReader getReader()
throws IOException
{
return r.getReader();
}

public String getRealPath(Str ing s)
{
return r.getRealPath(s );
}

public String getRemoteAddr()
{
return r.getRemoteAddr ();
}

public String getRemoteHost()
{
return r.getRemoteHost ();
}

public String getRemoteUser()
{
return r.getRemoteUser ();
}

public String getRequestedSes sionId()
{
return r.getRequestedS essionId();
}

public String getRequestURI()
{
return r.getRequestURI ();
}

public String getScheme()
{
return r.getScheme();
}

public String getServerName()
{
return r.getServerName ();
}

public int getServerPort()
{
return r.getServerPort ();
}

public String getServletPath( )
{
return r.getServletPat h();
}

public HttpSession getSession(bool ean flag)
{
return r.getSession(fl ag);
}

public boolean isRequestedSess ionIdFromCookie ()
{
return r.isRequestedSe ssionIdFromCook ie();
}

public boolean isRequestedSess ionIdFromUrl()
{
return r.isRequestedSe ssionIdFromUrl( );
}

public boolean isRequestedSess ionIdValid()
{
return r.isRequestedSe ssionIdValid();
}

public void setParameter(St ring s, String s1)
{
table.put(s, s1);
}

HttpServletRequ est r;
Hashtable table;
}
Jul 17 '05 #6
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message

news:<0t******* *************@t exas.net>...
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
When I compile my class I get this strange message.
The message is strange as that class is not abstract !!!!
Please help!
Gianni


Prove it. Post code.


Im sorry that is the class which the compiler consider abstract ...
but can't read abstract nowhere .... Thanks for the help
// Decompiled by DJ v3.5.5.77 Copyright 2003 Atanas Neshkov Date:
11/11/2003 16.52.59
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check
often for new version!
// Decompiler options: packimports(3)
// Source File Name: ChartRequest.ja va

package javachart.utili ty;

import java.io.Buffere dReader;
import java.io.IOExcep tion;
import java.util.Enume ration;
import java.util.Hasht able;
import javax.servlet.S ervletInputStre am;
import javax.servlet.S ervletRequest;
import javax.servlet.h ttp.*;

public class ChartRequest
implements HttpServletRequ est
{

public ChartRequest(Ht tpServletReques t httpservletrequ est)
{
table = new Hashtable();
r = httpservletrequ est;
}

public void clearTable()
{
table = new Hashtable();
}

public Object getAttribute(St ring s)
{
return r.getAttribute( s);
}

public String getAuthType()
{
return r.getAuthType() ;
}

public String getCharacterEnc oding()
{
return r.getCharacterE ncoding();
}

public int getContentLengt h()
{
return r.getContentLen gth();
}

public String getContentType( )
{
return r.getContentTyp e();
}

public Cookie[] getCookies()
{
return r.getCookies();
}

public long getDateHeader(S tring s)
{
return r.getDateHeader (s);
}

public String getHeader(Strin g s)
{
return r.getHeader(s);
}

public Enumeration getHeaderNames( )
{
return r.getHeaderName s();
}

public ServletInputStr eam getInputStream( )
throws IOException
{
return r.getInputStrea m();
}

public int getIntHeader(St ring s)
{
return r.getIntHeader( s);
}

public String getMethod()
{
return r.getMethod();
}

public String getParameter(St ring s)
{
return (String)table.g et(s);
}

public Enumeration getParameterNam es()
{
return table.elements( );
}

public String[] getParameterVal ues(String s)
{
return r.getParameterV alues(s);
}

public String getPathInfo()
{
return r.getPathInfo() ;
}

public String getPathTranslat ed()
{
return r.getPathTransl ated();
}

public String getProtocol()
{
return r.getProtocol() ;
}

public String getQueryString( )
{
return r.getQueryStrin g();
}

public BufferedReader getReader()
throws IOException
{
return r.getReader();
}

public String getRealPath(Str ing s)
{
return r.getRealPath(s );
}

public String getRemoteAddr()
{
return r.getRemoteAddr ();
}

public String getRemoteHost()
{
return r.getRemoteHost ();
}

public String getRemoteUser()
{
return r.getRemoteUser ();
}

public String getRequestedSes sionId()
{
return r.getRequestedS essionId();
}

public String getRequestURI()
{
return r.getRequestURI ();
}

public String getScheme()
{
return r.getScheme();
}

public String getServerName()
{
return r.getServerName ();
}

public int getServerPort()
{
return r.getServerPort ();
}

public String getServletPath( )
{
return r.getServletPat h();
}

public HttpSession getSession(bool ean flag)
{
return r.getSession(fl ag);
}

public boolean isRequestedSess ionIdFromCookie ()
{
return r.isRequestedSe ssionIdFromCook ie();
}

public boolean isRequestedSess ionIdFromUrl()
{
return r.isRequestedSe ssionIdFromUrl( );
}

public boolean isRequestedSess ionIdValid()
{
return r.isRequestedSe ssionIdValid();
}

public void setParameter(St ring s, String s1)
{
table.put(s, s1);
}

HttpServletRequ est r;
Hashtable table;
}


By my count, this class is missing 16 methods specified in
HttpServletRequ est or ServletRequest. That will most definitely keep you
from instantiating it.
Jul 17 '05 #7
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message news:<W8******* *************@t exas.net>...
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message

news:<0t******* *************@t exas.net>...
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
> When I compile my class I get this strange message.
> The message is strange as that class is not abstract !!!!
> Please help!
> Gianni

Prove it. Post code.


Im sorry that is the class which the compiler consider abstract ...
but can't read abstract nowhere .... Thanks for the help
// Decompiled by DJ v3.5.5.77 Copyright 2003 Atanas Neshkov Date:
11/11/2003 16.52.59
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check
often for new version!
// Decompiler options: packimports(3)
// Source File Name: ChartRequest.ja va

package javachart.utili ty;

import java.io.Buffere dReader;
import java.io.IOExcep tion;
import java.util.Enume ration;
import java.util.Hasht able;
import javax.servlet.S ervletInputStre am;
import javax.servlet.S ervletRequest;
import javax.servlet.h ttp.*;

public class ChartRequest
implements HttpServletRequ est
{

public ChartRequest(Ht tpServletReques t httpservletrequ est)
{
table = new Hashtable();
r = httpservletrequ est;
}

public void clearTable()
{
table = new Hashtable();
}

public Object getAttribute(St ring s)
{
return r.getAttribute( s);
}

public String getAuthType()
{
return r.getAuthType() ;
}

public String getCharacterEnc oding()
{
return r.getCharacterE ncoding();
}

public int getContentLengt h()
{
return r.getContentLen gth();
}

public String getContentType( )
{
return r.getContentTyp e();
}

public Cookie[] getCookies()
{
return r.getCookies();
}

public long getDateHeader(S tring s)
{
return r.getDateHeader (s);
}

public String getHeader(Strin g s)
{
return r.getHeader(s);
}

public Enumeration getHeaderNames( )
{
return r.getHeaderName s();
}

public ServletInputStr eam getInputStream( )
throws IOException
{
return r.getInputStrea m();
}

public int getIntHeader(St ring s)
{
return r.getIntHeader( s);
}

public String getMethod()
{
return r.getMethod();
}

public String getParameter(St ring s)
{
return (String)table.g et(s);
}

public Enumeration getParameterNam es()
{
return table.elements( );
}

public String[] getParameterVal ues(String s)
{
return r.getParameterV alues(s);
}

public String getPathInfo()
{
return r.getPathInfo() ;
}

public String getPathTranslat ed()
{
return r.getPathTransl ated();
}

public String getProtocol()
{
return r.getProtocol() ;
}

public String getQueryString( )
{
return r.getQueryStrin g();
}

public BufferedReader getReader()
throws IOException
{
return r.getReader();
}

public String getRealPath(Str ing s)
{
return r.getRealPath(s );
}

public String getRemoteAddr()
{
return r.getRemoteAddr ();
}

public String getRemoteHost()
{
return r.getRemoteHost ();
}

public String getRemoteUser()
{
return r.getRemoteUser ();
}

public String getRequestedSes sionId()
{
return r.getRequestedS essionId();
}

public String getRequestURI()
{
return r.getRequestURI ();
}

public String getScheme()
{
return r.getScheme();
}

public String getServerName()
{
return r.getServerName ();
}

public int getServerPort()
{
return r.getServerPort ();
}

public String getServletPath( )
{
return r.getServletPat h();
}

public HttpSession getSession(bool ean flag)
{
return r.getSession(fl ag);
}

public boolean isRequestedSess ionIdFromCookie ()
{
return r.isRequestedSe ssionIdFromCook ie();
}

public boolean isRequestedSess ionIdFromUrl()
{
return r.isRequestedSe ssionIdFromUrl( );
}

public boolean isRequestedSess ionIdValid()
{
return r.isRequestedSe ssionIdValid();
}

public void setParameter(St ring s, String s1)
{
table.put(s, s1);
}

HttpServletRequ est r;
Hashtable table;
}


By my count, this class is missing 16 methods specified in
HttpServletRequ est or ServletRequest. That will most definitely keep you
from instantiating it.

Forgive my complete ignorance!
If it s possible to instantiate a:
public Object getAttribute(St ring s)
{
return r.getAttribute( s);
}
or a String

public String getAuthType()
{
return r.getAuthType() ;
}

How can you implement
an
public abstract Principal getUserPrincipa l();

thanks for your help
Jul 17 '05 #8
"Gianni" <pi***********@ yahoo.it> wrote in message
news:3c******** *************** **@posting.goog le.com...
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message

news:<W8******* *************@t exas.net>...
By my count, this class is missing 16 methods specified in
HttpServletRequ est or ServletRequest. That will most definitely keep you
from instantiating it.

Forgive my complete ignorance!
If it s possible to instantiate a:
public Object getAttribute(St ring s)
{
return r.getAttribute( s);
}
or a String

public String getAuthType()
{
return r.getAuthType() ;
}

How can you implement
an
public abstract Principal getUserPrincipa l();

thanks for your help


Well, if you have an HttpServletRequ est object stored in your class that
you're using for everything else, why not use it for this? What's wrong
with:
public Principal getUserPrincipa l() {
return r.getUserPrinci pal()
}

Apart from that, why exactly are you writing this huge class when all you're
doing is passing method calls through to the request object? Wouldn't
something like this suit your needs and be a much nicer design?
public class ChartRequest {
private HashTable t = new HashTable();
private HttpServletRequ est r;

public ChartRequest(Ht tpServletReques t httpservletrequ est) {
r = httpservletrequ est;
}

public HttpServletRequ est getRequest() {
return r;
}

// Your table-related methods here
}

That way, if you want to use the request object, just grab it and use it
like you normally would. Then you can concentrate on creating the
functionality for your table instead of rewriting a bunch of code that
already exists.
Jul 17 '05 #9
I implemented all the methods of HttpServletRequ est as that class is
an interface but still have this problem . Do I have to implement all
the methotd of HttpServletRequ est's superclass ?? Thanks

I compile-web:
[javac] Compiling 27 source files to C:\siasprod\sia s-web
[javac] C:\siasprod\src \sias-web\ChartReques t.java:18: class
javachart.util
ty.ChartRequest must be declared abstract. It does not define
javax.servlet.h tt
..HttpSession getSession() from interface
javax.servlet.h ttp.HttpServlet Request.
[javac] public class ChartRequest
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2788
by: Yasutaka Ito | last post by:
Hi folks! I have a BaseForm class that inherits System.Windows.Forms.Form. It has a property, whose value I need supplied by the class that inherits it. The BaseForm usees the value supplied into this property in its Load event. So, I gave the BaseForm and the property 'abstract' modifier, and put the implementation of the property in the inherited class; say MyForm. However, when I did this, I no longer can open MyForm in the design...
9
4635
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
3
1170
by: sank | last post by:
hello all, i am a c++ programmar. i want to know other methodes of making abstract other than pure virtual class. thank u all.
16
3514
by: Merlin | last post by:
Hi Been reading the GOF book and started to make the distinction between Class and Interface inheritance. One question though: Do pure abstract classes have representations? (data members?) What about abstract classes? Should abstract classes have a destructor and or constructor? What about pure abstract classes?
4
2304
by: Tony Johansson | last post by:
Hello! Assume you have an abstract class called Body and a derived class called cylinder. When you have an abstract class you can't instansiate an object. As you can see in the abstract class there are one data member called density that you can't access because there will not be any object of class Body. The data member density will be inheritated and all the member functions. So when you have an instance of class Cylinder and you...
1
12374
by: Tony Johansson | last post by:
Hello!! Assume you have two classes one class called Base which is an abstract class and one derived class called Derived. You are not allowed to create an object of class Base like new Base(); or just Base base;. But when you instansiate an object of class Derived the constructor in Base is called implicitly.
5
1728
by: Tony Johansson | last post by:
Hello!! Is it possible to have abstract destructor. //Tony
8
21715
by: Dev | last post by:
Hello, Why an Abstract Base Class cannot be instantiated ? Does anybody know of the object construction internals ? What is the missing information that prevents the construction ? TIA. Dev
12
3080
by: Daedalus.OS | last post by:
Ok first I'm pretty new to OOP, so my question may sound stupid to some of you. If the only answer you can provide is "get a book about OOP" then don't loose your time and mine cause it's already ordered. I'm just too curious about this one to wait for the book. I would like to know is if it's good php programming practice to use abstract classes instead of singleton classes. For exemple a login class. I've made one as an abstract class...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.