Abstract Method Error in retrieving Blob
Hi!
while (rs.next())
Blob blob=rs.getBlob(1);
throws Abstract Method Error
why?
Thanxs in advance
You'll probably find that the JDBC driver that you are using doesn't support blobs. Check the documentation that comes with your driver, it should tell you what parts of the JDBC specification it supports.
Col
Similar Messages
-
Abstract Method Error and XML Parsing
I am using wl6sp1. I am parsing an XML file from within the
servlet using jaxp1.1 and crimson.
Following is code:
1- SAXParserFactory spf = SAXParserFactory.newInstance();
2- sp = spf.newSAXParser();
3- xr = sp.getXMLReader();
4- xr.setContentHandler(new ParseXML());
5- xr.parse( new InputSource("Example3.xml"));
This program works fine when execute from command line but in servlet on line
3 it says:
"Abstract Method Error"
I have created XML Registry to use Crimson as XML parser rather than default.
I think somehow wl is still using jaxp1.0 which is built in
support in wlsp1.
Whats wrong with the code...or what configuration i am missing???I'm assuming you have already put crimson.jar first in the classpath for the java
command you use to start WebLogic. If so, have you tried putting the servlet in
a .war file with the crimson.jar in its' WEB-INF/lib directory?
Regards,
Mike Wooten
"anyz" <[email protected]> wrote:
>
I am using wl6sp1. I am parsing an XML file from within the
servlet using jaxp1.1 and crimson.
Following is code:
1- SAXParserFactory spf = SAXParserFactory.newInstance();
2- sp = spf.newSAXParser();
3- xr = sp.getXMLReader();
4- xr.setContentHandler(new ParseXML());
5- xr.parse( new InputSource("Example3.xml"));
This program works fine when execute from command line but in servlet
on line
3 it says:
"Abstract Method Error"
I have created XML Registry to use Crimson as XML parser rather than
default.
I think somehow wl is still using jaxp1.0 which is built in
support in wlsp1.
Whats wrong with the code...or what configuration i am missing??? -
Is not abstract and does not override abstract method ERROR
Hello. I'm new at all this, and am attempting to recreate a sample code out of my book (Teach Yourself XML in 24 Hours), and I keep getting an error. I appriciate any help.
This is the Error that I get:
DocumentPrinter is not abstract and does not override abstract method skippedEntity(java.lang.String) in org.xml.sax.ContentHandler
public class DocumentPrinter implements ContentHandler, ErrorHandler
^This is the sourcecode:
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.ErrorHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
public class DocumentPrinter implements ContentHandler, ErrorHandler
// A Constant containing the name of the SAX parser to use.
private static final String PARSER_NAME = "org.apache.xerces.parsers.SAXParser";
public static void main(String[] args)
// Check to see whether the user supplied any command line arguments. If not, print an error and exit.
if (args.length == 0)
System.out.println("No XML document path specified.");
System.exit(1);
// Create a new instance of the DocumentPrinter class.
DocumentPrinter dp = new DocumentPrinter();
try
// Create a new instance of the XML Parser.
XMLReader parser = (XMLReader)Class.forName(PARSER_NAME).newInstance();
// Set the parser's content handler
// parser.setContentHandler(dp);
// Set the parsers error handler
parser.setErrorHandler(dp);
// Parse the file named in the argument
parser.parse(args[0]);
catch (Exception ex)
System.out.println(ex.getMessage());
ex.printStackTrace();
public void characters(char[] ch, int start, int length)
String chars ="";
for (int i = start; i < start + length; i++)
chars = chars + ch;
System.out.println("Recieved characters: " + chars);
public void startDocument()
System.out.println("Start Document.");
public void endDocument()
System.out.println("End of Document.");
public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
System.out.println("Start element: " + localName);
for (int i = 0; i < atts.getLength(); i++)
System.out.println(" Attribute: " + atts.getLocalName(i));
System.out.println(" Value: " + atts.getValue(i));
public void endElement(String namespaceURI, String localName, String qName)
System.out.println("End of element: " + localName);
public void startPrefixMapping(String prefix, String uri)
System.out.println("Prefix mapping: " + prefix);
System.out.println("URI: " + uri);
public void endPrefixMapping(String prefix)
System.out.println("End of prefix mapping: " + prefix);
public void ignorableWhitespace(char[] ch, int start, int length)
System.out.println("Recieved whitespace.");
public void processingInstruction(String target, String data)
System.out.println("Recieved processing instruction:");
System.out.println("Target: " + target);
System.out.println("Data: " + data);
public void setDocumentLocation(Locator locator)
// Nada
public void error(SAXParseException exception)
System.out.println("Parsing error on line " + exception.getLineNumber());
public void fatalError(SAXParseException exception)
System.out.println("Fatal parsing error on line " + exception.getLineNumber());
public void warning(SAXParseException exception)
System.out.println("Warning on line " + exception.getLineNumber());Check to make sure that the arguments are consistent with your ContentHandler class. Probably the wrong type.
I think you forgot to include the skippedEntity method, it seems to be missing. Even if an implemented class has a method that you are not using, you still have to include the method in your code even if it doesn't do anything.
Message was edited by:
ChargersTule1 -
Hi All ....
i m having problem when i call the method Connection.createStatemen(int,int). it gives the error java.lang.AbstractMethodError. i m calling from inside servlet. same error occures when i call method getRow() of ResultSet. here is all the code.
please tell me i m wrong Or some thing else is there.
thanks in advance
Connection conn=pool.getConnection();
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
//Statement stmt=conn.createStatement();
sql="Select * from TblClients";
ResultSet rs=stmt.executeQuery(sql);
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>All User Info</TITLE>");
out.println("</HEAD>");
out.println("<BODY bgcolor='white'>");
out.println("Result Set => "+rs);
out.println("Has Records => "+rs.next());
//out.println("Start => "+rs.getRow() );
out.println("<br>");
//out.println("Moved => "+rs.absolute(3));
out.println("<br>");
//out.println("Moved To => "+rs.getRow());
out.println("</BODY>");
out.println("</HTML>");thanks for ur such a quick responses .....
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Shahid Faiz ([email protected]):
Hi All ....
i m having problem when i call the method Connection.createStatemen(int,int). it gives the error java.lang.AbstractMethodError. i m calling from inside servlet. same error occures when i call method getRow() of ResultSet. here is all the code.
please tell me i m wrong Or some thing else is there.
thanks in advance
Connection conn=pool.getConnection();
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
//Statement stmt=conn.createStatement();
sql="Select * from TblClients";
ResultSet rs=stmt.executeQuery(sql);
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>All User Info</TITLE>");
out.println("</HEAD>");
out.println("<BODY bgcolor='white'>");
out.println("Result Set => "+rs);
out.println("Has Records => "+rs.next());
//out.println("Start => "+rs.getRow() );
out.println("<br>");
//out.println("Moved => "+rs.absolute(3));
out.println("<br>");
//out.println("Moved To => "+rs.getRow());
out.println("</BODY>");
out.println("</HTML>"); <HR></BLOCKQUOTE>
null -
I am using the weblogic driver with Allaire JRun.
Using these lines, I am trying to make my resultsets scrollable and updatable.
dbConnection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE
ResultSet rs = queryStatement.executeQuery(query);
When I run the code, I get this error ..
java.lang.AbstractMethodError
at allaire.jrun.sql.ConnectionProxy.createStatement(../sql/ConnectionProxy.java:413)
at com.mindseye.utils.database.DBAccessor.executeQuery(DBAccessor.java:35)
at com.fao.shopping.tag.HandleShoppingCartTag.checkExists(HandleShoppingCartTag.java:635)
at com.fao.shopping.tag.HandleShoppingCartTag.doStartTag(HandleShoppingCartTag.java:90)
at jrun__jsp__shoppingbag2ejsp14._jspService(jrun__jsp__shoppingbag2ejsp14.java:45)
at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
Everything works fine when I do not try and specify attributes to the statement
object. (i.e. dbConnection.createStatement();)
Anybody know what is going on?
thanks,
randyHi. I don't see our code anywhere in the stacktrace, but I'll assume
it's there somewhere. The basic fact is that our MS SQLServer driver
implements practically zero of the JDBC 2.0 methods. There is a way
to connect to this driver that has the methods defined, but then all
the difference will be that you'll get an exception saying 'this jdbc 2.0
method not implemented'.
Joe
randy shepherd wrote:
>
I am using the weblogic driver with Allaire JRun.
Using these lines, I am trying to make my resultsets scrollable and updatable.
dbConnection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE
ResultSet rs = queryStatement.executeQuery(query);
When I run the code, I get this error ..
java.lang.AbstractMethodError
at allaire.jrun.sql.ConnectionProxy.createStatement(../sql/ConnectionProxy.java:413)
at com.mindseye.utils.database.DBAccessor.executeQuery(DBAccessor.java:35)
at com.fao.shopping.tag.HandleShoppingCartTag.checkExists(HandleShoppingCartTag.java:635)
at com.fao.shopping.tag.HandleShoppingCartTag.doStartTag(HandleShoppingCartTag.java:90)
at jrun__jsp__shoppingbag2ejsp14._jspService(jrun__jsp__shoppingbag2ejsp14.java:45)
at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
Everything works fine when I do not try and specify attributes to the statement
object. (i.e. dbConnection.createStatement();)
Anybody know what is going on?
thanks,
randy -
Getting error while creating abstract method
hi folks,
i facing issue for ABSTRACT Class.
I am trying to create abstarct method, (refered example from saptechnical site),
I created one attribute i-num, created one method AREA, in implementation area , i made it as Abstract, then i did syntax check, then it is giving below error.
*Class ZTEST_CLASS01_AB,Method AREA
The abstract method "AREA" can only be implemented after its
redefinition (METHODS AREA REDEFINITION).*
i tried all the ways..
created subclass for this, i writted some code in AREA of Sub-class, there it is giving dump, because first one is not activated properly..
could you please somebody help me on this.
SriHello Arshad,
Create a class(ZABSTRACT) and make its type as Abstract( Which means atleast one of its methods is abstract)
We can have abstract classes with all it's methods as non-abstract or concrete. A small example is given below:
CLASS gcl_abstract DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS concrete. "Concrete
ENDCLASS. "gcl_abstract DEFINITION
* CLASS gcl_abstract IMPLEMENTATION
CLASS gcl_abstract IMPLEMENTATION.
METHOD concrete.
WRITE: / `I'm a concrete method`.
ENDMETHOD. "concrete
ENDCLASS. "gcl_abstract IMPLEMENTATION
* CLASS gcl_abstract_sub DEFINITION
CLASS gcl_abstract_sub DEFINITION INHERITING FROM gcl_abstract.
PUBLIC SECTION.
METHODS concrete REDEFINITION.
ENDCLASS. "gcl_abstract_sub DEFINITION
* CLASS gcl_abstract_sub IMPLEMENTATION
CLASS gcl_abstract_sub IMPLEMENTATION.
METHOD concrete.
super->concrete( ).
WRITE: / 'Abstract class might not have abstract methods at all!'.
ENDMETHOD. "concrete
ENDCLASS. "gcl_abstract_sub IMPLEMENTATION
START-OF-SELECTION.
DATA: go_abstract TYPE REF TO gcl_abstract_sub.
CREATE OBJECT go_abstract.
go_abstract->concrete( ).
Although i will agree there is no point in making a class as abstract & having no abstract method
@Sri: Looks like you're trying to implement the abstract method "AREA" in the abstract class hence the error. For abstract method you cannot define their implementation in the corres. abstract class.
BR,
Suhas
Edited by: Suhas Saha on Mar 30, 2011 12:04 PM -
Is not abstract and does not override abstract method actionPerformed
I dont how to corr. Please help!! and thank you very much!!
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class test extends JFrame implements ActionListener, ItemListener
private CenterPanel centerPanel;
private QuestionPanel questionPanel;
private ButtonPanel buttonPanel;
private ResponsePanel responsePanel;
private JButton b1,b2,b3,b4,b5; //Create five references to Jbutton instances
private JTextField t1,t2,t3,t4,t5; //Create five references to JTextField instances
private JLabel label1; //Create one references to JLabel instances
private JRadioButton q1,q2,q3; //Create three references to JRadioButton instances
private ButtonGroup radioGroup; //Create one references to Button Group instances
private int que1[] = new int[5]; //Create int[4] Array
private int que2[] = new int[5];
private int que3[] = new int[5];
private String temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10,
temp11, temp12, temp13, temp14, temp15;
public test (String header)
super(header);
Container container = getContentPane();
label1 = new JLabel ("PLease click on your response to ");
q1 = new JRadioButton("I understand most of the content of this subject",true);
add(q1);
q2 = new JRadioButton("I see the relevance of the subject to my degree",false);
add(q2);
q3 = new JRadioButton("The workload in this subject is appropriate",false);
add(q3);
radioGroup = new ButtonGroup(); //JRadioButton belong to ButtonGroup
radioGroup.add(q1);
radioGroup.add(q2);
radioGroup.add(q3);
JPanel buttonPanel = new JPanel();
JPanel responsePanel = new JPanel();
JPanel questionPanel = new JPanel();
JPanel centerPanel = new JPanel();
b1 = new JButton ("Strongly DISAGREE"); //Instantiate JButton with text
b1.addActionListener (this); //Register JButtons to receive events
b2 = new JButton ("DISAGREE");
b2.addActionListener (this);
b3 = new JButton ("Neither AGREE or DISAGREE");
b3.addActionListener (this);
b4 = new JButton ("AGREE");
b4.addActionListener (this);
b5 = new JButton ("Strongly AGREE");
b5.addActionListener (this);
buttonPanel.setLayout(new GridLayout(5,1));
buttonPanel.add(b1);
buttonPanel.add(b2);
buttonPanel.add(b3);
buttonPanel.add(b4);
buttonPanel.add(b5);
t1 = new JTextField ("0",3); //JTextField contains empty string
t2 = new JTextField ("0",3);
t3 = new JTextField ("0",3);
t4 = new JTextField ("0",3);
t5 = new JTextField ("0",3);
t1.setEditable( false );
t2.setEditable( false );
t3.setEditable( false );
t4.setEditable( false );
t5.setEditable( false );
responsePanel.setLayout(new GridLayout(5,1));
responsePanel.add(t1);
responsePanel.add(t2);
responsePanel.add(t3);
responsePanel.add(t4);
responsePanel.add(t5);
questionPanel.setLayout(new GridLayout(4,1));
questionPanel.add(label1);
questionPanel.add(q1);
questionPanel.add(q2);
questionPanel.add(q3);
centerPanel.add(buttonPanel,BorderLayout.CENTER);
centerPanel.add(responsePanel,BorderLayout.EAST);
container.add(centerPanel,BorderLayout.WEST);
container.add(questionPanel,BorderLayout.NORTH);
q1.addActionListener(
new ActionListener(){
public void actionPerformed( ActionEvent e )
{ //actionPerformed of all registered listeners
if (e.getSource() == b1) {
que1[0] = Integer.parseInt(t1.getText()) + 1;
String temp1 = String.valueOf(que1[0]);
t1.setText(temp1);
else if (e.getSource() == b2) {
que1[1] = Integer.parseInt(t2.getText()) + 1;
String temp2 = String.valueOf(que1[1]);
t2.setText(temp2);
else if (e.getSource() == b3) {
que1[2] = Integer.parseInt(t3.getText()) + 1;
String temp3 = String.valueOf(que1[2]);
t3.setText(temp3);
else if (e.getSource() == b4) {
que1[3] = Integer.parseInt(t4.getText()) + 1;
String temp4 = String.valueOf(que1[3]);
t4.setText(temp4);
else if (e.getSource() == b5) {
que1[4] = Integer.parseInt(t5.getText()) + 1;
String temp5 = String.valueOf(que1[4]);
t5.setText(temp5);
} //end action performed
q2.addActionListener(
new ActionListener(){
public void actionPerformed( ActionEvent e )
{ //actionPerformed of all registered listeners
if (e.getSource() == b1) {
que2[0] = Integer.parseInt(t1.getText()) + 1;
String temp6 = String.valueOf(que2[0]);
t1.setText(temp1);
else if (e.getSource() == b2) {
que2[1] = Integer.parseInt(t2.getText()) + 1;
String temp7 = String.valueOf(que2[1]);
t2.setText(temp7);
else if (e.getSource() == b3) {
que2[2] = Integer.parseInt(t3.getText()) + 1;
String temp8 = String.valueOf(que2[2]);
t3.setText(temp8);
else if (e.getSource() == b4) {
que2[3] = Integer.parseInt(t4.getText()) + 1;
String temp9 = String.valueOf(que2[3]);
t4.setText(temp9);
else if (e.getSource() == b5) {
que2[4] = Integer.parseInt(t5.getText()) + 1;
String temp10 = String.valueOf(que2[4]);
t5.setText(temp10);
} //end action performed
q3.addActionListener(
new ActionListener(){
public void actionPerformed( ActionEvent e )
{ //actionPerformed of all registered listeners
if (e.getSource() == b1) {
que3[0] = Integer.parseInt(t1.getText()) + 1;
String temp11 = String.valueOf(que3[0]);
t1.setText(temp11);
else if (e.getSource() == b2) {
que3[1] = Integer.parseInt(t2.getText()) + 1;
String temp12 = String.valueOf(que3[1]);
t2.setText(temp12);
else if (e.getSource() == b3) {
que3[2] = Integer.parseInt(t3.getText()) + 1;
String temp13 = String.valueOf(que3[2]);
t3.setText(temp13);
else if (e.getSource() == b4) {
que3[3] = Integer.parseInt(t4.getText()) + 1;
String temp14 = String.valueOf(que3[3]);
t4.setText(temp14);
else if (e.getSource() == b5) {
que3[4] = Integer.parseInt(t5.getText()) + 1;
String temp15 = String.valueOf(que3[4]);
t5.setText(temp15);
} //end action performed
}//end constructor test
public void itemStateChanged(ItemEvent item) {
//int state = item.getStateChange();
//if (q1 == item.SELECTED)
public class ButtonPanel extends JPanel
public ButtonPanel()
public class CenterPanel extends JPanel
public CenterPanel()
public class QuestionPanel extends JPanel
public QuestionPanel()
public class ResponsePanel extends JPanel
public ResponsePanel()
public static void main(String [] args)
test surveyFrame = new test("Student Survey") ;
surveyFrame.setSize( 500,300 );
surveyFrame.setVisible(true);
surveyFrame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
}//end main
}//end class testis not abstract and does not override abstract method actionPerformed
Oh, I see that the title of your post is an error message? Ok. Well, the test class is declared as implementing an ActionListener. That means the test class must have an actionPerformed() method. Your test class apparently does not.
It does not appear that the test class needs to implement ActionListener. You are using annonymous classes as listeners. -
Is not abstract and does not override abstract method tablechanged
I will remove all the gui code to make it shorter, but my problem lies with my InteractiveTableModelListener.
public class Meet extends JPanel{
private static void createAndShowGUI() {
JFrame frame = new JFrame("MEET_dataTable");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new Meet(), BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
public class InteractiveTableModelListener implements TableModelListener {
public void TableChanged(TableModelEvent evt) {
if (evt.getType() == TableModelEvent.UPDATE) {
int column = evt.getColumn();
int row = evt.getFirstRow();
dataTable.setColumnSelectionInterval(column + 1, column + 1);
dataTable.setRowSelectionInterval(row, row);
class InteractiveRenderer extends DefaultTableCellRenderer {
protected int interactiveColumn;
public InteractiveRenderer(int interactiveColumn) {
this.interactiveColumn = interactiveColumn;
public Component getTableCellRendererComponent(JTable dataTable,
Object value, boolean isSelected, boolean hasFocus, int row,
int column)
Component c = super.getTableCellRendererComponent(dataTable, value, isSelected, hasFocus, row, column);
if (column == interactiveColumn && hasFocus) {
if ((Meet.this.tableModel.getRowCount() - 1) == row &&
!Meet.this.tableModel.hasEmptyRow())
Meet.this.tableModel.addEmptyRow();
highlightLastRow(row);
return c;
public void highlightLastRow(int row) {
int lastrow = tableModel.getRowCount();
if (row == lastrow - 1) {
dataTable.setRowSelectionInterval(lastrow - 1, lastrow - 1);
else {
dataTable.setRowSelectionInterval(row + 1, row + 1);
dataTable.setColumnSelectionInterval(0, 0);
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
UIManager.put("swing.boldMetal", Boolean.FALSE);
createAndShowGUI();
}As i say, i have removed all the gui code to make it shorter, but in this code i create the table and add all the model to it. I am being returned with the error
Meet.InteractiveTableModelListener is not abstract and does not override abstract method tableChanged(javax.swing.event.TableModelEvent)in javax.swing.event.TableModelListener
what would be causing this error?
CheersSorry, just figured out my silly error, the method is tableChanged not TableChanged.
cheers
TOPIC CLOSED
Edited by: nick2price on Sep 11, 2008 7:08 AM -
...is not abstract and does not override abstract method compare
Why am I getting the above compile error when I am very clearly overriding abstract method compare (ditto abstract method compareTo)? Here is my code -- which was presented 1.5 code and I'm trying to retrofit to 1.4 -- followed by the complete compile time error. Thanks in advance for your help (even though I'm sure this is an easy question for you experts):
import java.util.*;
This program sorts a set of item by comparing
their descriptions.
public class TreeSetTest
public static void main(String[] args)
SortedSet parts = new TreeSet();
parts.add(new Item("Toaster", 1234));
parts.add(new Item("Widget", 4562));
parts.add(new Item("Modem", 9912));
System.out.println(parts);
SortedSet sortByDescription = new TreeSet(new
Comparator()
public int compare(Item a, Item b) // LINE CAUSING THE ERROR
String descrA = a.getDescription();
String descrB = b.getDescription();
return descrA.compareTo(descrB);
sortByDescription.addAll(parts);
System.out.println(sortByDescription);
An item with a description and a part number.
class Item implements Comparable
Constructs an item.
@param aDescription the item's description
@param aPartNumber the item's part number
public Item(String aDescription, int aPartNumber)
description = aDescription;
partNumber = aPartNumber;
Gets the description of this item.
@return the description
public String getDescription()
return description;
public String toString()
return "[descripion=" + description
+ ", partNumber=" + partNumber + "]";
public boolean equals(Object otherObject)
if (this == otherObject) return true;
if (otherObject == null) return false;
if (getClass() != otherObject.getClass()) return false;
Item other = (Item) otherObject;
return description.equals(other.description)
&& partNumber == other.partNumber;
public int hashCode()
return 13 * description.hashCode() + 17 * partNumber;
public int compareTo(Item other) // OTHER LINE CAUSING THE ERROR
return partNumber - other.partNumber;
private String description;
private int partNumber;
}Compiler error:
TreeSetTest.java:25: <anonymous TreeSetTest$1> is not abstract and does not over
ride abstract method compare(java.lang.Object,java.lang.Object) in java.util.Com
parator
public int compare(Item a, Item b)
^
TreeSetTest.java:41: Item is not abstract and does not override abstract method
compareTo(java.lang.Object) in java.lang.Comparable
class Item implements Comparable
^
2 errorsAccording to the book I'm reading, if you merely take
out the generic from the code, it should compile and
run in v1.4 (assuming, of course, that the class
exists in 1.4). I don't know what book you are reading but that's certainly incorrect or incomplete at least. I've manually retrofitted code to 1.4, and you'll be inserting casts as well as replacing type references with Object (or the erased type, to be more precise).
These interfaces do exist in 1.4, and
without the generics.Exactly. Which means compareTo takes an Object, and you should change your overriding method accordingly.
But this raises a new question: how does my 1.4
compiler know anything about generics? It doesn't and it can't. As the compiler is telling you, those interfaces expect Object. Think about it, you want to implement one interface which declares a method argument type of Object, in several classes, each with a different type. Obviously all of those are not valid overrides. -
Product is not abstract and does not override abstract method
Received the following errors.
Product.java:3: Product is not abstract and does not override abstract method ge
tDisplayText() in Displayable
public class Product implements Displayable
^
Product.java:16: getDisplayText() in Product cannot implement getDisplayText() i
n Displayable; attempting to use incompatible return type
found : void
required: java.lang.String
public void getDisplayText()
^
2 errors
Code reads as follows
import java.text.NumberFormat;
public class Product implements Displayable
private String code;
private String description;
private double price;
public Product()
this.code = "";
this.description = "";
this.price = 0;
public void getDisplayText()
String message =
"Code: " + code + "\n" +
"Description: " + description + "\n" +
"Price: " + this.getFormattedPrice() + "\n";
public Product(String code, String description, double price)
this.code = code;
this.description = description;
this.price = price;
public void setCode(String code)
this.code = code;
public String getCode(){
return code;
public void setDescription(String description)
this.description = description;
public String getDescription()
return description;
public void setPrice(double price)
this.price = price;
public double getPrice()
return price;
public String getFormattedPrice()
NumberFormat currency = NumberFormat.getCurrencyInstance();
return currency.format(price);
Please help!Received the following errors.
Product.java:3: Product is not abstract and does not
override abstract method ge
tDisplayText() in Displayable
public class Product implements Displayable
^
Product.java:16: getDisplayText() in Product cannot
implement getDisplayText() i
n Displayable; attempting to use incompatible return
type
found : void
required: java.lang.String
public void getDisplayText()
^
2 errors
Code reads as follows
Please use the code tags when posting code. There is a code button right above the text box where you enter your post. Click on it and put the code between the code tags.
These error messages are quite clear in telling what is wrong. You have an Interface called Displayable that specifies a method something like thispublic String getDisplayText() {But in your Product source code, you created thismethodpublic void getDisplayText() {The compiler is complaining because the methods are not the same.
You also need to return a String in the method probalby like thisreturn message; -
Error while retrieving a password for credential
Hi All,
I am getting following error while deploying ADS application.
Please help me to resolve it.
NWDS 04s.
Adobe Version 7.02
error:
com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: ADS Render Exception occured. Append "sap-wd-errorPdf=true" to the URL and access the application once again. This time you will get an error PDF. Save the error PDF on the file system. This is a helpful attachment in case of an OSS message. com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRights: java.lang.Exception: Could not retrieve a password for credential: ReaderRights Exception Stack Trace: com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRights: java.lang.Exception: Could not retrieve a password for credential: ReaderRights at com.adobe.ads.request.UsageRights.execute(UsageRights.java:202) at com.adobe.BaseADSRequest.doWork(BaseADSRequest.java:111) at com.adobe.AdobeDocumentServicesWorker.execute(AdobeDocumentServicesWorker.java:758) at com.adobe.AdobeDocumentServicesEJB.processRequest(AdobeDocumentServicesEJB.java:130) at com.adobe.AdobeDocumentServicesEJB.rpData(AdobeDocumentServicesEJB.java:108) at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0.java:120) 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:324) at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126) at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157) at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79) at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92) at SoapServlet.doPost(SoapServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) atHi,
did you provide your credential during the Adobe installation process (as far as I know, you have to install the Adobe Document and not only deploy these).
You have to provide the credential and enter a password during the process, or it does not work.
The last info I have is that you get credentials by entering a customer request at SAP, component BC-SRV-FP, but that might have changed...
Kind regards,
Carl -
Need Urgent help Error while retrieving a password for credential: ReaderRi
I am receving the following error while deploying my web dynpro application containig a adobe form .The issue is that when i perform teh following test
Enter the following URL in the browser
http://<server>:<port>/AdobeDocumentServices/Config
The web page of the web service AdobeDocumentServices is displayed. Choose Test.
Choose rpdata(test )
Choose the Send button without entering any parameters
Enter the user name and password
User Name: ADSUser
Password: <Your admin password>
Choose Submit
I get the version number
but when i deploy the application i get this eror
com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to UPDATEDATAINPDF
at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:398)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:887)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:752)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:705)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process Render Request.
at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:98)
at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:121)
at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:342)
... 29 more
Caused by: com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException:
Processing exception during a "UsageRights" operation.
Request start time: Wed Oct 03 14:43:25 PDT 2007
com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRightsHi Namit,
Have you installed a credential file to your ADSServer?
This is required to apply the usageRights onto the PDF.
You need to install the ReaderRights credential file. Follow the steps from this URL:
Re: Interactive form application error
Make sure that the password and the expiry date of the ReaderRights credential file are valid.
Hope this helps. -
Error inserting a Blob in the database
Hi Everyone.
I have a TABLE (Oracle) which has a Blob field, when I catalogue it the data type inside the BPM is Binary.
Everything goes fine, but when I try to INSERT a row in that table I get the following exception:
Caused by: java.lang.ClassCastException: fuego.sql.BlobImpl
at oracle.jdbc.driver.OraclePreparedStatement.setBlob(OraclePreparedStatement.java:6466)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBlob(OraclePreparedStatementWrapper.java:126)
at fuego.jdbc.FaultTolerantPreparedStatement.setBlob(FaultTolerantPreparedStatement.java:136)
at fuego.sql.SQLUtils.setParameter(SQLUtils.java:424)
at fuego.sql.SQLObject.setFldParams(SQLObject.java:465)
at fuego.sql.SQLObject.setFldParams(SQLObject.java:455)
at fuego.sql.TableSQLObject.update(TableSQLObject.java:909)
at fuego.sql.TableSQLObject.implicitStore(TableSQLObject.java:378)
at fuego.sql.TableSQLObject.store(TableSQLObject.java:340)
at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.sql.SQLObject.invoke(SQLObject.java:364)
at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
at OFERTAS_COMERCIALES.ABMOfertasNuevo.Default_1_0.Instance.CIL_testBLOG(Instance.xcdl:21)
at OFERTAS_COMERCIALES.ABMOfertasNuevo.Default_1_0.Instance.CIL_testBLOG(Instance.xcdl)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512)
... 35 more
The statement is
TABLE.id = 1;
TABLE.contenido = at.contents
store(TABLE)
also tried:
params as Any[] = []
params[] = 1
params[] = Binary(data : at.contents).data
retVal as Int
query as String = "INSERT INTO TABLE(id, contenido) VALUES (?,?)"
extResource as String = "db"
retVal = executeUpdate(DynamicSQL, sentence : query,
implname : extResource,
inParameters : params)
and the result was the same.
The select statments works fine.
Any idea???
I'm working with Studio Version: 10.3.2 Build: #100524
Thanks in advance.
CarlosHi,
Plz check the following thread, you may have the similar issue.
Insert and Retrieve BLOB column with Oracle BPM
Bibhu -
How to declare abstract method
given - work worked at first .
fact - then i went to add new entity object names ScottOafE0 . went through all the next sand finished. a package and entity obj already exist. i also tried to put a new package and ScottOafAM in a seperate place. still a no go
when i went to run the form it errors out w/ below msg.
Error(14,8): class xxxoaf.oracle.apps.xxuab.hr.newforms.server.ScottOafEOImpl should be declared abstract; it does not define method setLastUpdateLogin(oracle.jbo.domain.Number) in class oracle.apps.fnd.framework.server.OAEntityImpl
Guess - i tired to put import oracle.apps.fnd.framework.server.OAEntityImpl in the controller file . didnt work
any idea how to define abstract method ?
thanks
scottYou dont need to define your class as abstract, that would not resolve your issue, what is happening is
oracle.apps.fnd.framework.server.OAEntityImpl is a abstract class, and has a method declared as setLastUpdateLogin(oracle.jbo.domain.Number) in class
Now, any class (xxxoaf.oracle.apps.xxuab.hr.newforms.server.ScottOafEOImpl ) extending from this class must either provide a definition to this method (provide the implementation logic), or must itself be declared abstract.
We had a discussion on this issue in the forum , look for the thread.
Thanks
Tapash -
Abstract Method Overriding Problem
I have an abstract class called "Employee" with an abstract method called "ReturnBasicInfo()" defined.
I have two subclasses, SalariedEmployee and HourlyEmployee, and each has their own version of ReturnBasicInfo(). The compiler is not letting me do this, however, and I have no idea why.
I keep getting this error:
SalariedEmployee.java:6: SalariedEmployee is not abstract and does not override
abstract method returnBasicInfo() in Employee.The abstract method signature is this:
public abstract String returnBasicInfo(Employee e);Any idea why this might be happening? I have another abstract method called toVector() that's overriden in the subclasses and that one works fine, so I'm stumped on this. The only difference between the two is that this method takes arguments and the other doesn't. Is that why it can't be overriden?
Thanks in advance for any help!"...In the instructor's example code, he actually
overrode toString with this method. I thought I might
be using the real toString(), though, so that's why I
changed the name to returnBasicInfo(). I didn't end up
using toString(), though. Maybe I ought to go back to
calling it toString()..."
Yes, this SHOULD be overridden in toString(). Do go
back to it.
The "real" toString()? Do you mean the default
version in java.lang.Object, the one that just prints
out the object reference when it's called?
Hmm, I guess. I got confused because I'm swapping between String and double values a lot. Taking in an entered number as a String and converting it to a double.
I think I originally confused toString() with String.valueOf().
I wouldn't have getYearlySalary() for SalariedEmployee
and getHourlySalary() for HourlyEmployee. That
defeats the purpose of polymorphism and dynamic
typing. Yes, but I do have one polymorphic method --pay(). Each Employee is paid a different way. The one method we were supposed to be able to call on all Employees is just pay(). There is one version of pay() for HourlyEmployees that uses gethourly_rate() and gethours_worked() to get hourly rate and hours worked. The other version of pay() in SalariedEmployees takes in their yearly salary and number of pay periods worked.
Better to have a getSalary() method in your
Employee interface and let each subclass implement it
the way they want to. SalariedEmployee will return
their yearly salary, HourlyEmployee will return
hourlySalary*hoursWorkedOK, that's one idea.
But darnit, I would still like to know how to get my original design to work. So I should change returnBasicInfo() to toString(), you think?
Maybe you are looking for
-
A problem in an appraisal function
Hello, When I use the function HRHAP_DOCUMENT_SAVE , I succeed to create a full appraisal record except remarks. For the remarks I use table T_BODY_CELL_NOTES in the function. For example, for a remark that is belong to criteria No. 5 in the template
-
Error in basic web dynpro application
i went through the following link https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cb243c45-0801-0010-eb9c-88669007f130 and it has a tutorial to creating a web dynpro application i have done all the steps,but when the explorer
-
Sony files imported as DNG into Lightroom 5 have no thumbnails in Finder
I use Lightroom 5 and always convert my RAW files into DNG format when I import photos. Since I converted to OS X the DNG thumbnails from my Sony NEX camera do not show up in Finder. The DNG files coming from my Canon camera do show up as thumbnail
-
Cannot drop a Mapping !!!
OMBCC is used to change context to Oracle Target Module When running OMBDROP MAPPING 'mapname' OMB+ generates PUB01010: Object is not deletable. Urgent. Please reply .. - Jojo Message was edited by: user467494
-
Unable to print PDFs in Abode 8 or 9.
I am using adobe reader. I am unable to PDF of greater than 2 pages. the error message indicates the program is not responding. Please help.