Compiler says class can't be initialized

ok, i know abstract classes can't be initialized, but i am extending my base class, but my complier says that "class ClassificationParser can't be initialized" but i am not initializing it. IF anyone can point out a problem, which i just can't see please do. Thank you..
first is listed the base abstract class, second the extended class
package cattlemanager.utilities.parsers;
import java.util.Vector;
import java.io.File;
import java.io.IOException;
* Title:        ClassificationParser
* Copyright:    Copyright (c) 2001
* Company:      None
* @author Harold Smith III
* @version 1.0
public abstract class ClassificationParser
   * <p>This method returns the instance of a <code>Classification</code> objects
   * that the implementor can work with and use to there own extent. This allows
   * for the parser to read in all the file data, and insert it into the
   * <code>Classification</code> Objects that he or she wishes the user to
   * modify.</p>
   * <p><strong>Important</strong> - The <code>Vector</code> that is returned will
   *  contain a <code>Vector</code> of <code>Vector</code>'s that the implementor
   *  must work with. The reason for a <code>Vector</code> of <code>Vector</code>'s
   *  is the <code>Classification</code> data may contain several past <code>
   *  Classification</code> records.</p>
   * @return Vector the data vector.
  public Vector getData()
  { return vInternalClassificationDataObject;
   * <code>parse</code> is the default parsing mechanism for the read in data
   * that the user can integrate into there records. Using the <code>parse</code>
   * method, the implemented class will read in the specified <code>File</code>
   * and the <code>Classification</code> Objects will be initialized with tthe
   * read in data.
   * @param File the file to be parsed, should follow the specified format
   *  determined by the appropriate association.
   * @throws WrongFormatException if the file is not formatted to the standards
   *  the association has laid out.
   * @throws IOException if there is a file problem.
  public abstract void parse(File fName) throws WrongFormatException, IOException;
   * The internal <code>Vector</code> of objects that will be laid out as specified
   * in the <code>getData</code> method described within this class.
   * @see #getData
  protected Vector vInternalClassificationDataObject;
package cattlemanager.utilities.parsers;
import java.io.File;
import java.io.FileInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.EOFException;
import java.util.StringTokenizer;
import java.util.Date;
import java.util.GregorianCalendar;
* Title:        HolsteinAssociationClassificationParser
* Copyright:    Copyright (c) 2001
* Company:      None
* @author Harold Smith III
* @version 1.0
public class HolsteinAssociationClassificationParser extends ClassificationParser
  private HolsteinAssociationClassificationParser()
  { try
    { parse(new File("demo.ext"));
    catch (Exception e)
   * Doesn't work?!
  public static synchronized ClassificationParser createInstance()
  { return new HolsteinAssociationClassificationParser();
   * <code>parse</code> parses the <a href="www.holstein.com">Holstein
   *  Association</a> classification data as laid out in there <code>File</code>
   *  format. By using this parser, one can read in the records and access the
   *  data that they need.
   * @param File the name of the file to be parsed.
   * @throws WrongFormatException if the file is not properly formated
  private void parse(File fName) throws WrongFormatException, IOException
    try {
      // READ IN FILE
   * Creates an instance of a date for the format specified by the Holstein
   * Association
  private Date createDate(String time)
  { GregorianCalendar c = (GregorianCalendar) GregorianCalendar.getInstance();
    c.set(Integer.parseInt(time.substring(0,4)), Integer.parseInt(time.substring(4,6))-1, Integer.parseInt(time.substring(6,8)));
    return c.getTime();
}

ah stupid errors, i figured it out, i accidently created an instance in a class before i decided to change the class to abstract!

Similar Messages

  • "Class can't be instantiated " error message. Help !

    Dear Java People,
    In trying to do a program that outputs a sound with every button click
    I have no compilation errors but a runtime error that says:
    "class can't be instantiated"
    below is the program and below that the error message
    thank you in advance
    Norman
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.net.*;
    public abstract class MyMusicApplet_1 extends JApplet implements ActionListener, AppletContext
         //AppletContext myAppletContext =   new AppletContext();
         //Iterator i =   myAppletContext.getStreamKeys();
         JButton myJButton;
         AudioClip acSound_1;
         AudioClip acSound_2;
         AudioClip acSound_3;
         AudioClip acSound_4;
         AudioClip acSound_5;
         AudioClip acSound_6;
         AudioClip acSound_7;
         AudioClip acSound_8;
         AudioClip acSound_9;
         JButton myJButtonSound1;
         JButton myJButtonSound2;
         JButton myJButtonSound3;
         JButton myJButtonSound4;
         JButton myJButtonSound5;
         JButton myJButtonSound6;
         JButton myJButtonSound7;
         JButton myJButtonSound8;
         JButton myJButtonSound9;
      public void init()
            try
             acSound_1 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_2 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_3 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_4 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_5 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_6 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_7 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_8 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             acSound_9 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
             catch (MalformedURLException e)
               System.out.println("Error here " );
           Container myContentPane = getContentPane();
           myContentPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
            Dimension buttonSize = new Dimension(190,100);
           Font myFont = new Font("Arial", Font.BOLD,14);
           Border myEdge = BorderFactory.createRaisedBevelBorder();
                    //create 1st button's object
                     myJButtonSound1 = new JButton("sound #1");
                    myJButtonSound1.addActionListener(this);
                   //set the button's border and size, font background and foreground
                   myJButtonSound1.setBorder(myEdge);
                   myJButtonSound1.setPreferredSize(buttonSize);
                   myJButtonSound1.setFont(myFont);
                   myJButtonSound1.setBackground(Color.orange);
                   myJButtonSound1.setForeground(Color.black);
                    //create 2nd button's object
                     myJButtonSound2 = new JButton("sound #2");
                    myJButtonSound2.addActionListener(this);
                   //set the button's border and size, font, background and foreground
                   myJButtonSound2.setBorder(myEdge);
                   myJButtonSound2.setPreferredSize(buttonSize);
                   myJButtonSound2.setFont(myFont);
                   myJButtonSound2.setBackground(Color.blue);
                   myJButtonSound2.setForeground(Color.black);
                    //create 3rd button's object
                     myJButtonSound3 = new JButton("sound #3");
                    myJButtonSound1.addActionListener(this);
                   //set the button's border and size, font, background and foreground
                   myJButtonSound3.setBorder(myEdge);
                   myJButtonSound3.setPreferredSize(buttonSize);
                   myJButtonSound3.setFont(myFont);
                   myJButtonSound3.setBackground(Color.cyan);
                   myJButtonSound3.setForeground(Color.black);
                    //create 4th button's object
                     myJButtonSound4 = new JButton("sound #4");
                    myJButtonSound4.addActionListener(this);
                   //set the button's border and size, font background and foreground
                   myJButtonSound4.setBorder(myEdge);
                   myJButtonSound4.setPreferredSize(buttonSize);
                   myJButtonSound4.setFont(myFont);
                   myJButtonSound4.setBackground(Color.pink);
                   myJButtonSound4.setForeground(Color.black);
                   //create 5th button's object
                   myJButtonSound5 = new JButton("sound #5");
                  myJButtonSound5.addActionListener(this);
                 //set the button's border and size, font background and foreground
                 myJButtonSound5.setBorder(myEdge);
                 myJButtonSound5.setPreferredSize(buttonSize);
                 myJButtonSound5.setFont(myFont);
                 myJButtonSound5.setBackground(Color.red);
                 myJButtonSound5.setForeground(Color.black);
                  //create 6th button's object
                   myJButtonSound6 = new JButton("sound #6");
                  myJButtonSound6.addActionListener(this);
                 //set the button's border and size, font, background and foreground
                 myJButtonSound6.setBorder(myEdge);
                 myJButtonSound6.setPreferredSize(buttonSize);
                 myJButtonSound6.setFont(myFont);
                 myJButtonSound6.setBackground(Color.pink);
                 myJButtonSound6.setForeground(Color.black);
                  //create 7th button's object
                   myJButtonSound7 = new JButton("Choice #7");
                  myJButtonSound7.addActionListener(this);
                 //set the button's border and size, font, background and foreground
                 myJButtonSound7.setBorder(myEdge);
                 myJButtonSound7.setPreferredSize(buttonSize);
                 myJButtonSound7.setFont(myFont);
                 myJButtonSound7.setBackground(Color.cyan);
                 myJButtonSound7.setForeground(Color.black);
                  //create 8th button's object
                   myJButtonSound8 = new JButton("Choice #8");
                  myJButtonSound8.addActionListener(this);
                 //set the button's border and size, font background and foreground
                 myJButtonSound8.setBorder(myEdge);
                 myJButtonSound8.setPreferredSize(buttonSize);
                 myJButtonSound8.setFont(myFont);
                 myJButtonSound8.setBackground(Color.yellow);
                 myJButtonSound8.setForeground(Color.black);
                  //create 9th button's object
                   myJButtonSound9 = new JButton("Choice #9");
                  myJButtonSound9.addActionListener(this);
                 //set the button's border and size, font background and foreground
                 myJButtonSound9.setBorder(myEdge);
                 myJButtonSound9.setPreferredSize(buttonSize);
                 myJButtonSound9.setFont(myFont);
                 myJButtonSound9.setBackground(Color.blue);
                 myJButtonSound9.setForeground(Color.black);
                   //add the buttons to the content pane
                   myContentPane.add(myJButtonSound1);
                   myContentPane.add(myJButtonSound2);
                   myContentPane.add(myJButtonSound3);
                   myContentPane.add(myJButtonSound4);
                   myContentPane.add(myJButtonSound5);
                   myContentPane.add(myJButtonSound6);
                   myContentPane.add(myJButtonSound7);
                   myContentPane.add(myJButtonSound8);
                   myContentPane.add(myJButtonSound9);
          public void actionPerformed(ActionEvent e)
             myJButton = (JButton)e.getSource();
            if(myJButton == myJButtonSound1)
              acSound_1.play();
            if(myJButton == myJButtonSound2)
              acSound_2.play();
            if(myJButton == myJButtonSound3)
              acSound_3.play();
            if(myJButton == myJButtonSound4)
              acSound_4.play();
            if(myJButton == myJButtonSound5)
              acSound_5.play();
             if(myJButton == myJButtonSound6)
               acSound_6.play();
                       if(myJButton == myJButtonSound7)
                         acSound_7.play();
                       if(myJButton == myJButtonSound8)
                         acSound_8.play();
                        if(myJButton == myJButtonSound9)
                          acSound_9.play();
    java.lang.InstantiationException
         at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    load: stan_my_music_applet_1.MyMusicApplet_1.class can't be instantiated.
         at java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
         at sun.applet.AppletPanel.run(AppletPanel.java:292)
         at java.lang.Thread.run(Thread.java:536)

    I also tried:
    try
    for(int a=0;a<8;a++)
    {acSounds[a] = getAudioClip(getCodeBase(),(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore" + (i + 1) + ".wrk")));
    and the error message still says:
    "MyMusicApplet3.java": Error #: 300 : method getAudioClip(java.net.URL, java.net.URL) not found in class stan_my_music_applet_3.MyMusicApplet3 at line 19
    Help !
    below is the revised code
    Norman
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.net.*;
    public class MyMusicApplet3 extends JApplet implements ActionListener
      AudioClip[] acSounds= new AudioClip[9];
      public void init()
       try
            for(int a=0;a<8;a++)
            {acSounds[a] = getAudioClip(getCodeBase(),(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore" + (a + 1) + ".wrk")));
      catch (Exception e)
        System.out.println("Error here " );
            Container myContentPane = getContentPane();
            myContentPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
            myContentPane.add(getButton("1", Color.orange));
            myContentPane.add(getButton("2", Color.blue));
            myContentPane.add(getButton("3", Color.cyan));
            myContentPane.add(getButton("4", Color.pink));
            myContentPane.add(getButton("5", Color.red));
            myContentPane.add(getButton("6", Color.pink));
            myContentPane.add(getButton("7", Color.cyan));
            myContentPane.add(getButton("8", Color.yellow));
            myContentPane.add(getButton("9", Color.blue));
        public void actionPerformed(ActionEvent e)
           String command = e.getActionCommand();
           int index = Integer.parseInt(command)-1;
           acSounds[index].play();
       public JButton getButton(String label, Color fore)
         {          JButton button = new JButton("sound "+label);
                    button.setPreferredSize(new Dimension(190,100));
                    button.setFont(new Font("Arial", Font.BOLD,14));
                    button.setBorder(BorderFactory.createRaisedBevelBorder());
                    button.setForeground(fore);
                    button.setBackground(Color.orange);
                    button.addActionListener(this);
                    button.setActionCommand(label);
                    return button;
          }//"MyMusicApplet3.java": Error #: 300 :
    //method getAudioClip(java.net.URL, java.net.URL) not found in class
    // stan_my_music_applet_3.MyMusicApplet3 at line 19, column 24

  • Always get "Can't detect initial thread location" when using compiler

    Hi,
    I'm a newbie in installing java into my computer and i couldn't find any thread in this forum that discuss regarding to this matter...
    Well basically, all binary extraction was going fine and j2sdk1.4.2_04 folder was created successfully without error message at all...
    The problem is, i get this message everytime i execute java compiler...
    Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location
    java version "1.4.2_04"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
    I'm using FreeBSD 5.2.1. and running linux compatibility port... so the java sdk was extracted successfully without any modification or whatsoever...
    I appreciate if someone can help me with this...

    I had the same problem and found this thread that fixed it....
    http://www.mail-archive.com/[email protected]/msg60015.html

  • Can't compile custom classes in Release 12 environment.

    Hi ,
    We have some extensions to the OA Framework pages in Oracle Applications. The custom java files for the same are returning the following error while compiling in the release 12 environment.
    RufiReviewSubmitCO.java:78: cannot access oracle.sql.NUMBER
    bad class file: /u002/app/applmgr/R12TSTcomn/java/lib/appsborg.zip(oracle/sql/NUMBER.class)
    class file has wrong version 50.0, should be 49.0
    The same java files works without issues in a 11.5.10cu2 environment.
    The java version on the server is 1.6.0_10 and the java file was created on a client machine with java 1.6 version.
    Have you encountered this error, how to overcome this. Any help is appreciated.
    Thanks
    Sudeep

    hi
    it seems that u direct compiling the files in unix box ,one other way i can suggest , if u will compile the class using Jdeveloper compatible to your EBS and then move the file to server ,definietly it will work.Note:416708.1 on Metalink has a list of all the JDev patches for the various releases of Oracle Applications.
    thanx
    Pratap

  • Abstract Class can't be instantiated

    Hi I'm getting the following error messages while compiling. Does any one have any idea how to get RID of it?
    ERROR MESSAGES:
    EditableHeaderTableExample2.java:48: inner class EditableHeaderTableExample2. MyComboRenderer is an abstract class. It can't be instantiated.
    MyComboRenderer renderer = new MyComboRenderer(items);
    ^
    EditableHeaderTableExample2.java:79: Method redefined with different return type: javax.swing.table.TableCellRenderer getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int) was java.awt.Component getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
    public TableCellRenderer getTableCellRendererComponent(
    ^
    2 errors
    Here is the code:
    EditableHeaderTableExample2.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import javax.swing.JComponent;
    import javax.swing.JComboBox;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.*;
    import javax.swing.JTable;
    import javax.swing.plaf.metal.*;
    import javax.swing.JFrame;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableColumnModel;
    import javax.swing.DefaultCellEditor;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.DefaultTableCellRenderer;
    public class EditableHeaderTableExample2 extends JFrame {
    public static void main(String[] args) {
    EditableHeaderTableExample2 frame = new EditableHeaderTableExample2();
    frame.setSize(400,300);
         frame.setLocation(100,100);
         frame.setVisible(true);
    public EditableHeaderTableExample2(){
    JTable table = new JTable(10,10);
    TableColumnModel columnModel = table.getColumnModel();
    table.setTableHeader(new EditableHeader(columnModel));
    String[] items = {"Dog","Cat"};
    JComboBox combo = new JComboBox();
    for (int i=0;i<items.length;i++) {
    combo.addItem(items);
    MyComboRenderer renderer = new MyComboRenderer(items);
    EditableHeaderTableColumn col;
    // column 1
    col = (EditableHeaderTableColumn)table.getColumnModel().getColumn(1);
    col.setHeaderValue(combo.getItemAt(0));
    col.setHeaderRenderer(renderer);
    col.setHeaderEditor(new DefaultCellEditor(combo));
    // column 3
    col = (EditableHeaderTableColumn)table.getColumnModel().getColumn(3);
    col.setHeaderValue(combo.getItemAt(0));
    //col.setHeaderRenderer(renderer);
    col.setHeaderEditor(new DefaultCellEditor(combo));
    JScrollPane pane = new JScrollPane(table);
    getContentPane().add(pane);
    class MyComboRenderer extends JComboBox implements TableCellRenderer
    MyComboRenderer(String[] items) {
    for (int i=0;i<items.length;i++) {
    addItem(items[i]);
    public TableCellRenderer getTableCellRendererComponent(
    JTable table, Object value,
    boolean isSelected, boolean hasFocus,
    int row, int column) {
    setSelectedItem(value);
    return this;

    This is not a suggestion, it's a requirement. When you say
    class MyComboRenderer extends JComboBox implements TableCellRendererthe "implements TableCellRenderer" part is a promise that your class will include a method whose signature is
        Component getTableCellRendererComponent(JTable table, Object value,
                                 boolean isSelected, boolean hasFocus,
                                 int row, int column);

  • ORA-29534 error for Class can not be resolved

    HI,
    I am trying to load and resolve a third party jar file which has some JMS classes. But while using the loadjava utility,
    "loadjava -u scott/tiger@dbname -r -v -genmissing weblogic.jar"
    i get "ORA-29534: referenced object <Class Name> could not be resolved" error for most of the classes.
    This Jar file has around 15000 classes definitions and it takes almost a complete day to load and resolve it. Even after taking so much of time it is unable to resolve all the classes and give a runtime exception Class can not be resolved for some class.( i have created the oracle java stored procedure successfully)
    I need a help on this very urgently...
    Thanks in advance....
    Sachin

    Sachin,
    There are many possible causes for the error you are getting, for example:
    1. The DBMS_JAVA package is corrupt.
    (Have you previously successfully loaded JARs -- or even java classes -- into the database?)
    2. A java version mismatch.
    (What Oracle database version are you using, and what java version is your JAR file compatible with?)
    You say,
    Surely they are loaded but not resolvedIs this a question, or a statement? Have you verified that the classes are loaded and not resolved? I use the following query for this:
    select DBMS_LONGNAME(OBJECT_NAME), STATUS
      from USER_OBJECTS
    where OBJECT_TYPE like 'JAVA%'The value for the STATUS column should be 'VALID'.
    I'm only guessing, but you may find more information (regarding the error you are getting) in the Oracle log files. Have you checked them?
    Have you tried searching the MetaLink Web site?
    http://metalink.oracle.com
    (Search for "ORA-29516", perhaps.)
    Good Luck,
    Avi.

  • Error with signed applet "class can't be instantiated"

    hi,
    I developed an applet to make a ftp connexion to upload files from the local disk and the applet is already signed. At first I compiled it with the 1.4 version and I got (from other computers) the error "class not found". Then I used the target 1.1 option and now I get the error "class can't be instantiated"
    Do I need any additional code?
    I am using all these imports
    import java.applet.Applet;
    import java.applet.AppletContext;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.JComponent;
    import javax.swing.JProgressBar;
    import javax.swing.*;
    Thanks

    go to
    Tools->Internet Options->Advanced
    Look for "Java (Sun)" (normally near Microsoft VM). I uncheck all the Microsoft VM options but am not sure if that is really necessary.
    Also play with Control Panel, you should see "Java Plug-in" in there and be able to configure browsers a bit with that.

  • Compile Error: 'class' or 'interface' expected

    Hi all,
    I have a code which was compiling/running successfully:
    import java.net.*;
    code
    When I added the line: import java.io.*;
    import java.net.*;
    import java.io.*;
    code
    Got the following compile error:
    'class' or 'interface' expected
    import java.io.*;
    ^
    If I comment one of my import statements then it compiles, but I can't have both!
    Does anybody know what's the problem? where it comes from?
    Any help is greatly appreciated.

    I haven't post the entire code b/c it's very long, anyway here it is...
    import java.net.*; ;
    import java.io.*;
    //class TransactionOp: #1
    class TransactionOp
    int ID = 0;
    double price = 0.0;
    int subsID = 0;
    String xmlDoc = "";
    String xmlResp = "";
    String respID = "";
    String authCode = "";
    int opResult = 0;
    public TransactionOp(int anID, double aPrice, int aSubID)
         ID = anID;
         price = aPrice;
         subsID = aSubID;     
         //op done values: 1: REF, 2: DCL, 3: AUTH, 4: AUTH_NoID
         //op errors: -1: noResponse, -2: noAuthResp, -3: noStatus, -4: no gw.
    //class AddressCC: #2
    class AddressCC
    String zipcode = "";
    String city = "";
    String state = "";
    String country = "";
    String address1 = "";
    public AddressCC(String addr1, String city1, String state1, String country1, String zipcode1)
         address1 = addr1;
         city = city1;
         state = state1;
         country = country1;
         zipcode = zipcode1;
    //class InfoCC: #3
    class InfoCC
    String fullName = "";
    String number = "";
    String expDate = "";
    public InfoCC(String name, String number1, String date)
         fullName = name;
         number = number1;
         expDate = date;
    public class SurePayGW
    //instance fields
    private String merchant = "";//merchant = aMode
    private String password = "";
    private String server = "";
    private int subsID = 0;
    public SurePayGW()
         merchant = "34593";
         password = "hnbv78hj6";
         server = "xml.surepay.com";     
    }//endof constructor:SurePayGW
    //String formattedS = "\"" + s + "\"";
    public void spitDoc(SurePayGW sp, AddressCC address, InfoCC ccInfo, TransactionOp trans)
         String xmlBuf = "<!DOCTYPE pp.request PUBLIC \"-//IMALL//DTD PUREPAYMENTS 1.0//EN\" \"http://www.purepayments.com/dtd/purepayments.dtd\">";     
         xmlBuf = xmlBuf + "<pp.request merchant=" + "\"" + sp.merchant+ "\" password=" + "\"" + sp.password+ "\">";
         xmlBuf = xmlBuf + "<pp.auth ecommerce=\"true\" ordernumber=" + "\"" + trans.ID + "\" recurring=\"false\">";     
         xmlBuf = xmlBuf + "<pp.creditcard number=" + "\"" + ccInfo.number + "\" expiration=" + "\"" + ccInfo.expDate.charAt(0) + ccInfo.expDate.charAt(1)+ "/" + ccInfo.expDate.charAt(2) + ccInfo.expDate.charAt(3) + "\">";          
         xmlBuf = xmlBuf + "<pp.address type=\"billing\" zip=" + "\"" + address.zipcode + "\" city=" + "\"" + address.city + "\" state=" + "\"" + address.state + "\" country=" + "\"" + address.country + "\" fullname=" + "\"" + ccInfo.fullName + "\" address1=" + "\"" + address.address1 + "\"/>";
         xmlBuf = xmlBuf + "</pp.creditcard>";     
         xmlBuf = xmlBuf + "<pp.address type=\"shipping\" zip=" + "\"" + address.zipcode + "\" city=" + "\"" + address.city + "\" state=" + "\"" + address.state + "\" country=" + "\"" + address.country + "\" fullname=" + "\"" + ccInfo.fullName + "\" address1=" + "\"" + address.address1 + "\"/>";     
         xmlBuf = xmlBuf + "<pp.lineitem sku=\"R" + trans.subsID + "Zg\" description=\"Subscription Renewal\" taxrate=\"0\" quantity=\"1\" unitprice=\"" + trans.price + "USD\"/>";
         xmlBuf = xmlBuf + "</pp.auth></pp.request>";
         //print("@DBG [SurePayDoc.submitTransaction]: will send %s" % xmlBuf)
         trans.xmlDoc= xmlBuf;
         //System.out.println("This the final result of xmlBuf: ");
         //System.out.println(xmlBuf);
         //System.out.println("trans.xmlDoc = " + trans.xmlDoc);
    }//endof m: spitDoc
    public void submitTransaction(SurePayGW sp, TransactionOp aTrans)
         String param = "";
         HttpURLConnection connection;
         URL url;
         String urlString = "";
         String input = "";
         String response = "";
         try
              //params= urllib.urlencode({'xml' : aTrans.xmlDoc})
              param = java.net.URLEncoder.encode(aTrans.xmlDoc, "UTF-8");
              //System.out.println("The output from java.net.URLEncoder.encode: " + param);
              //link= httplib.HTTPSConnection(self.server)
              urlString = "https://" + sp.server;
              url = new URL(urlString);
              connection = (HttpURLConnection)url.openConnection();          
              System.out.println(connection.getURL());          
              System.out.println(connection.getResponseCode() + " " + connection.getResponseMessage());          
              System.out.println(connection.getURL());
              connection.setDoInput(true);
              connection.setDoOutput(true);
              connection.setUseCaches(false);
              //link.putrequest('POST', '/')
         connection.setRequestMethod("POST");
              //link.putheader('Content-type', 'application/x-www-form-urlencoded')
              //link.putheader('Content-length', ("%d" % len(params)))
              //link.putheader('Accept', 'text/plain')
              connection.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
              connection.setRequestProperty("Content-length", param.length());
              connection.setRequestProperty("Accept", "text/plain");
              //link.endheaders()
              connection.connect();
              System.out.println("Client : Connected");
              //link.send(params)
              //response= link.getresponse()
              //data= response.read()     
              DataOutputStream out = new DataOutputStream(connection.getOutputStream());
              System.out.println("Client : Writing Content");
              out.writeBytes(content);
              System.out.println("Client : Flushing Stream");
              out.flush();
              System.out.println("Client : Waiting for response from Server");
              BufferedReader in = new BufferedReader(new InputStreamReader(http.getInputStream()));
              System.out.println("Client : Opened input stream");
              while((input = in.readLine()) != null)
                   response += input + "\r";
              System.out.println("Client : received : "+response);
              //I'm not bothering to close the streams or http connection yet.
         }//endof: try
         catch (MalformedURLException e)
              e.printStackTrace();
         catch (Exception e)
              e.printStackTrace();
    }//endof m:submitTransaction
    }//endof class:SurePayGW

  • How to re-compile the class after modification??

    Hello All,
    I found that in 'SearchResourceRenderer' Target window is hardcoded as "_blank". Now i have changed that to "_self" so that i can open the documents from the Search Results in the same frame.
    Please help me in re-compiling the class so that i can deploy it again onto the Portal.
    Regards
    Vaib

    Hi Vaib,
    as already told in the parallel thread:
    - Put the decompiled, changed class into a NWDS Java project.
    - Install and use ClassLocator to create the complete build path needed.
    - After the class doesn't show any more errors, it's compiled. Open the original JAR within the portal app directory with a hot replacement tool like WinRAR and drag and drop the class file into the JAR folder. Restart the server.
    The alternative is to import the whole PAR,  additionally to put the JARs into the PAR project, remove the class from the JAR where it comes from, recompile the changed decompiled class and then deploy the complete PAR into the portal. It's a bit more work but a more clean deployment.
    Hope it helps
    Detlev

  • Enhancement Request: Actions for JAVA Sources (compile to CLASS)

    Hi All,
    I would like to change my JAVA Source in the DATABASE and compile it again. At the moment I can see only the code but have no actions to compile and generate it to classes. Is this planned for a future release? AS a LAYOUT idea ... if classes can not be displayed I would suggest to remove them from the tree - they are not needed to display as far as I can see a compiled SOURCE. Will Raptor provide this for the future??
    Message was edited by:
    Frank C. Hoffmann
    Message was edited by:
    Frank C. Hoffmann

    I'm seeing the same problem; it will let me view Java code, and edit it in the editor, but there's no way of saving it back to the database, or compiling (or debugging or etc...)
    Also, if I try and run java in via the sql window I get:
    Error starting at line 1 in command:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "whatever" AS
    Error report:
    Non supported SQL92 token at position: 227:
    Don't really know what that error message is for; is that column or row? I can't see either displayed for the sql window anyway. No clue what token it's talking about either - would be useful for it to give a better error message than that.
    thanks,
    William

  • Compiling dependent classes

    I have three classes that are dependent on each other, that is class 1 utilizes objects of type class 2 and class 3, class 2 utilizes objects of type class 1 and class 3, and class 3 utilizes objects of type 1 and 2. I am wondering how to compile these classes. I know for the same situation in C++ this conflict is resloved through header files, since there is no header files in Java I am assuming there is compiler flag I can set, I tried the -soucepath flag but that doesn't seem to work. Any suggestions, I know I might be able to accomplish my goal using interfaces or abstract classes but I would really like to avoid using those. Any help would be appreciated.
    Thanks

    -sourcepath I believe should do it. What error message(s) did you get?
    But another approach is just to specify all three classes as arguments to javac, as in:
    javac Class1.java Class2.java Class3.java

  • Help compiling with .class files

    I am using JGrasp and I am trying to compile a program that uses .class files instead of the .java files, but JGrasp will not recognize these at compile time. How do I get my program to compile with these .class files?

    I prefer using Jenuity:
    [http://www.nmmu.ac.za/jenuityIDE]
    It's much simpler to use than JGrasp and isn't nearly as confusing.
    For the record, you compile .java files into .class files. There is no need to "compile" existing .class files. If you have the class files you can run them from the command line. e.g. if you have a class file named Orange.class you should be able to type "java Orange" from the command line to run it. If Orange is inside a directory structure based on packages you may need to execute this command from just outside the 'highest" folder.
    If you just need to link to these class files, copy them into the "/jre/lib/ext" folder of your JDK.

  • Bug: Flash CS5+CS4 Professional crashes when compiling AS2 classes.

    My name is Mario Gomes Cavalcanti, I'm the CEO of Mersica Inc. and the developer of the free, online graphic design software, image and photo editor Fatpaint.com.
    Fatpaint is a Flash application, made using the Actionscript 2 programming language. This week we added some new functionality to the source code and after that, Flash CS5 professional IDE can no longer compile the project, it crashes on every attempt without any error messages.
    We are talking here about a huge project with around 360 Actionscript 2 classes. The size if the our last successful compiled SWF file was around 800 kilobytes. This compilation wa done last week, prior to the latest addition/modification of source files. The project is mostly made of Actionscript 2 source code, it do not have much other stuff in it.
    I would like assistence is resolving this issue... Why does Flash CS5 crash when compiling my Actionscript 2 classes?
    I would like to send the project and source files to the developers of the Flash actionscript 2 compiler, so they can see why it cannot compile my files.
    Fatpaint.com is probably the Flash application with the most sourcecode (classes) so I think it has something to do with that.
    My system:
    Windows 7 64bit
    Adobe Flash CS5 professional version 11.0.2.489
    Thank you.

    We managed to compile the project using Flash Pro 8, and we also got in touch with Adobe and sent them the source files of our Flash editor.
    It's been a month now and they still have not released a fix.

  • Ant or what tool to compile Java Classes

    For the past year I have been using Windows command window to compile Java Classes for my Servlets, Java Beans and Helper classes. I use Cold Fusion studio as my IDE for creating the Java classes. All of my Web Applications use MVC for Forms feeding small databases and I only have around 7 to 10 class files per Web application.
    Should I start to use Ant and/or what is recommended so I can keep up with current technology instead of using Windows Command Window to compile my Java classes?

    Try the following link.
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/cfc19866-0401-0010-35b2-dc8158247fb6
    The download in the above link has NWDS and portal as well. Unzip the file and install NWDS studio.

  • Compiling a class, help.

    I am having trouble compiling a class file on my server. I have been given the path for the Java Compiler but I am so new to telnetting and unix.
    The path that I have been given is usr/local/java/bin/ to use the Java Compiler. I have tried a lot of different strings, but I can't seem to get it to work.
    This is the code that I want to use: usr/local/java/bin/javac -classpath %CLASSPATH%;C:/usr251/home/obetz/public_html/servlets/mail.jar
    Does that look write? What is the string I want to use when I telnet into my account if I want to compile my java file into a class?

    Please bear with me. I'm really new to Unix. I've got a couple of jar & java files already in the classpath. Here is where they are:
    /usr251/home/obetz/public_html/servlets/
    MailerBean.java and mail.jar
    This is what i tried to use to compile the mail.jar file:
    /usr/local/java/bin/javac /usr251/home/obetz/public_html/servlets/mail.jar
    The error is invalid option or arguement. I also tried it with -classpath in the middle, omitting the $CLASSPATH and still nothing.

Maybe you are looking for

  • How do you mix data types with Producer/C​onsumer?

    Hi, I am trying to build a VI using Producer/Consumer architecture and trying to learn how to do it.  I am measuring two types of data that must be used "simultaneously" to create output commands.  The attached vi is a simplified version that I am us

  • Elapse vi in sequence structure

    Hi Guys I know there a thousand way to implement a time elapse funciton, but i am curious the reason it does not work I set first elapse vi tartget time 5 seconds, second 2 seconds and third 3 seconds in a for loop It works in first and second iterai

  • Exchange 2013 SP1 Install on W2K12R2 Pre-requisite fail

    I am tryinig to install SP1 over CU3 for Exchange Server 2013 on Windows Server 2012 R2. During the Readiness Checks - Configuring Prerequisites it gets to 90% and then throws up the following error: Error: The following error was generated when "$er

  • HT4972 Updating without syncing

    Can you update an iPad 2 to iOS5.1.1 if you do not have an iTunes library? I.e. if you do not sync your iPad at all, to any other device.

  • My most recent purchase

    Yesterday my son purchased a new smart phone.. I understand the sales tax application in the state of Massachusetts. However the paper receipt we were given listed the price of the phone as 99.99 : upgrade fee 30.00: sales tax 6.25.  total due 166.18