Invalid method declaration

Hi there,
I have a problem to compile below sentences.
import java.awt.* ;
import javax.swing.* ;
import java.awt.event.* ;
public class p662 extends JFrame
public ShowColors()
** invalid method declariration for ShowColors ****
super ("Using colors") ;
Please help me.
Best regards

What the diddley?
Your class name is p662 (what the heck is that?).
The declaration public ShowColors looks like a constructor. You call super in it with a String argument, which looks like you want to invoke a JFrame ctor.
You can't invoke a super class constructor in any method except a class constructor. The class constructors must have the same name as the class. The class must go in a file whose name is the same as the public class inside.
You should follow the Sun coding standards for naming:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
What are you doing here? This is unintelligible. - MOD

Similar Messages

  • Invalid method declaration; return type required

    The code:
              public Reminder(int seconds) {
            timer = new Timer();
            timer.schedule(new RemindTask(), seconds*1000);
        class RemindTask extends TimerTask {
            public void run() {
                System.out.format("Time's up!%n");
                timer.cancel(); //Terminate the timer thread
    public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
           new superball();
                    new Reminder(5);
            System.out.format("Task scheduled.%n");
    //= End of Testing =
        }Gives:
    "invalid method declaration; return type required"
    If i add void to public Reminder(int seconds) {It prints:
    cannot find symbol
    symbol : class Reminder
    location: class superball
    new Reminder(5);
    Is it because of the public class?
    public class superball extends JFrameHere is the FULL code:
    /*                      superball                                 */
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.regex.Pattern;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.util.*;
    import java.io.*;
    * Summary description for superball
    public class superball extends JFrame
         // Variables declaration
         int ballx;
      int bally;
         int jumpstop;
         int stopper;
         int coin;
         int coinx;
         int coiny;
         int coinvaluex;
         int coinvaluey;
      Timer timer;
      private int value = 0;
         private static Random r = new Random();
         private JLabel jLabel1;
         private JLabel jLabel2;
         private JLabel jLabel4;
         private JLabel jLabel5;
         private JLabel jLabel7;
         private JLabel jLabel9;
         private JLabel jLabel10;
         private JPanel contentPane;
         private JPanel jPanel1;
         // End of variables declaration
         public superball()
              super();
              initializeComponent();
              // TODO: Add any constructor code after initializeComponent call
              this.setVisible(true);
          * This method is called from within the constructor to initialize the form.
          * WARNING: Do NOT modify this code. The content of this method is always regenerated
          * by the Windows Form Designer. Otherwise, retrieving design might not work properly.
          * Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
          * to retrieve your design properly in future, before revising this method.
         private void initializeComponent()
              jLabel1 = new JLabel();
              jLabel2 = new JLabel();
              jLabel4 = new JLabel();
              jLabel5 = new JLabel();
              jLabel7 = new JLabel();
              jLabel9 = new JLabel();
              jLabel10 = new JLabel();
              coin = 1;
              coinx = Math.abs(r.nextInt()) % 460 + 100;
              coiny = Math.abs(r.nextInt()) % 200 + 100;
              ballx = 342;
              bally = 338;
              jumpstop = 0;
              stopper = 13;
              contentPane = (JPanel)this.getContentPane();
              jPanel1 = new JPanel();
              // jLabel1
              jLabel1.setIcon(new ImageIcon("IMG\\coin.gif"));
              jLabel1.setText("0");
              // jLabel2
              jLabel2.setIcon(new ImageIcon("IMG\\logo.PNG"));
              // jLabel4
              jLabel4.setIcon(new ImageIcon("IMG\\black.GIF"));
              // jLabel5
              jLabel5.setIcon(new ImageIcon("IMG\\ballstanding2.gif"));
              // jLabel7
              jLabel7.setIcon(new ImageIcon("IMG\\star-heart.gif"));
              jLabel7.setText(" 100");
              // jLabel9
              jLabel9.setIcon(new ImageIcon("IMG\\coin.gif"));
              // jLabel10
              jLabel10.setIcon(new ImageIcon("IMG\\stage1.GIF"));
              // contentPane
              contentPane.setLayout(null);
              contentPane.setBackground(new Color(255, 254, 254));
              addComponent(contentPane, jLabel5, 342,338,60,18);
              addComponent(contentPane, jLabel1, 561,4,100,18);
              addComponent(contentPane, jLabel2, 2,3,208,24);
              addComponent(contentPane, jLabel7, 495,4,60,18);
              addComponent(contentPane, jLabel9, coinx,coiny,19,18);
              addComponent(contentPane, jLabel2, 2,3,208,24);
              addComponent(contentPane, jLabel10, -2,29,738,412);
              addComponent(contentPane, jPanel1, 79,209,200,100);
              // jPanel1
              jPanel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              jPanel1.setFocusable(true);
              jPanel1.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e)
                        jPanel1_keyPressed(e);
                   public void keyReleased(KeyEvent e)
                        jPanel1_keyReleased(e);
                   public void keyTyped(KeyEvent e)
                        jPanel1_keyTyped(e);
              // superball
              this.setTitle("Superball created by Hannes Karlsson");
              this.setLocation(new Point(0, 0));
              this.setSize(new Dimension(617, 450));
              this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              this.setResizable(false);
         /** Add Component Without a Layout Manager (Absolute Positioning) */
         private void addComponent(Container container,Component c,int x,int y,int width,int height)
              c.setBounds(x,y,width,height);
              container.add(c);
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jPanel1_keyPressed(KeyEvent e)
              System.out.println("\njPanel1_keyPressed(KeyEvent e) called.");
              // TODO: Add any handling code here
              if(e.getKeyCode()==e.VK_LEFT) // when the user enters left
                  jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED
                                            if(e.getKeyCode()==e.VK_RIGHT) // when the user enters right
                  jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED
                                                                if(e.getKeyCode()==e.VK_UP) // when the user enters up
                  jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setIcon(new ImageIcon("IMG\\balljetpack.gif"));
                        } // equalling PLAIN_SPEED
                                                                                    if(e.getKeyCode()==e.VK_DOWN) // when the user enters up
                  jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED     
                        if(bally>=340)
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                  System.out.println("LOW!!!");
                        if(bally<=-2)
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                                  System.out.println("HIGH!!!");
                                            if(ballx>=594)
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                                  System.out.println("RIGHT!!!");
                                                                if(ballx<=-3)
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                                  System.out.println("LEFT!!!");
                                                                           if (bally==294 && (ballx > 218 && ballx < 274))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                                                           if (bally==262 && (ballx > 246 && ballx < 306))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                                       if (bally==230 && (ballx > 486 && ballx < 562))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                        if (bally==310 && (ballx > 486 && ballx < 594))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                         if (bally==262 && (ballx > 442 && ballx < 514))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
          if (bally==294 && (ballx > 378 && ballx < 466))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                   // COIN
                         if ((bally > coiny-10 && bally < coiny+10) && (ballx > coinx-10 && ballx < coinx+10))
                coinx = Math.abs(r.nextInt()) % 617 + 1;
                coiny = Math.abs(r.nextInt()) % 300 + 1;
                   jLabel9.setLocation(new Point(coinx, coiny));
                        System.out.println("Coinx:"+coinx+"");
                        System.out.println("Coiny:"+coiny+"");
                        jLabel1.setText(""+ coin++ +"");
                        System.out.println("Ballx:"+ballx+"");
                        System.out.println("Bally:"+bally+"");
         private void jPanel1_keyReleased(KeyEvent e)
              System.out.println("\njPanel1_keyReleased(KeyEvent e) called.");
              // TODO: Add any handling code here
              jLabel5.setIcon(new ImageIcon("IMG\\ballstanding2.gif"));
         private void jPanel1_keyTyped(KeyEvent e)
              System.out.println("\njPanel1_keyTyped(KeyEvent e) called.");
              // TODO: Add any handling code here
         // TODO: Add any method code to meet your needs in the following area
    //============================= Testing ================================//
    //=                                                                    =//
    //= The following main method is just for testing this class you built.=//
    //= After testing,you may simply delete it.                            =//
    //======================================================================//
              public void Reminder(int seconds) {
            timer = new Timer();
            timer.schedule(new RemindTask(), seconds*1000);
        class RemindTask extends TimerTask {
            public void run() {
                System.out.format("Time's up!%n");
                timer.cancel(); //Terminate the timer thread
         public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
           new superball();
                    new Reminder(5);
            System.out.format("Task scheduled.%n");
    //= End of Testing =
    }

    No, it's because you can't have a constructor called Reminder if you don't have a class named Reminder.

  • Invalid method declarations?

    hi, new to JAVA, and i have a problem, I am getting invalid method declarations for "printStraightLine()" and "printSumOfYears();" and would like them to become valid so that way i am able to start cracking away at the formulas...any type of suggestions would be appreciated...Mike...so here's the code:
    import java.io.*;
      class Depreciation
        private char choice;
        private int purchasePrice;
        private int salvageValue;
        private int usefulLife;
        private printSumOfYears();
        private printStraightLine();
        private double deprec;
       Depreciation()   {}
       Depreciation(char choice, int purchasePrice, int salvageValue, int usefulLife)
           this.choice = choice;
           this.purchasePrice = purchasePrice;
           this.salvageValue = salvageValue;
           this.usefulLife = usefulLife;
        public char getchoice()
                {return choice;}
        public int getpurchasePrice()
                {return purchasePrice;}
        public int getsalvageValue()
                {return salvageValue;}
        public int getusefulLife()
                {return usefulLife ;}
      void setDepreciation(int purchasePrice, int salvageValue, int usefulLife)
        this.purchasePrice = purchasePrice;
          this.salvageValue = salvageValue;
          this.usefulLife = usefulLife;
      void setChoice(char choice)
      {  this.choice = choice;}
    public printStraightLine()
    {   double deprec;
        while (usefulLife < 0);
        for (usefulLife = 1; usefulLife <= usefulLife; usefulLife++)
            deprec = (purchasePrice - salvageValue) / (usefulLife);
            System.out.println("Year"+ usefulLife + "\t" + "Depreciation" + "\t" + deprec);
    public printSumOfYears()
      { double deprec;
          while (usefulLife <=1);
          for (usefulLife = usefulLife; usefulLife <= 1; usefulLife--)
              deprec =
              System.out.println("Year"+ usefulLife + "\t" + "Depreciation" + "\t" + deprec);
    public String toString();
              String s = new String();
              s = ' ' + "Purchase Price = " + purchasePrice + "  " + "Salvage Value = " + salvageValue + "  " + "Use Life = " + usefulLife + "  " + "Sum of Years = " + SumOfYears + "  " + "Straight Line = " + StraightLine;
              return s;
     

    That did it! I forgot to declare printSumof... and print Straight... as String Methods...
    ok now ive gotten rid of all the syntax errors in it and now ive run into a larger problem...the menu class that i have, wont accept my Depreciation...i think its perhaps theres something wrong with the toString Method perhaps but this is the last bit i need to get over the hill, per se...so heres the Depreciation Coding(without syntax errors and following it will be my MenuDrivenClass that corresponds....
    DEPRECIATION CODING
    import java.io.*;
      class Depreciation
        private char choice;
        private double purchasePrice;
        private double salvageValue;
        private int usefulLife;
       Depreciation()   {}
       Depreciation(char choice, double purchasePrice, double salvageValue, int usefulLife)
           this.choice = choice;
           this.purchasePrice = purchasePrice;
           this.salvageValue = salvageValue;
           this.usefulLife = usefulLife;
        public char getChoice()
                {return choice;}
        public double getpurchasePrice()
                {return purchasePrice;}
        public double getsalvageValue()
                {return salvageValue;}
        public int getusefulLife()
                {return usefulLife ;}
      void setDepreciation(double purchasePrice, double salvageValue, int usefulLife)
        this.purchasePrice = purchasePrice;
          this.salvageValue = salvageValue;
          this.usefulLife = usefulLife;
      void setChoice(char choice)
      {  this.choice = choice;}
    public String printStraightLine()
    {   double deprec;
        while (usefulLife < 0);
        for (usefulLife = 1; usefulLife <= usefulLife; usefulLife++)
            deprec = (purchasePrice - salvageValue) / (usefulLife);
            System.out.println("Year"+ usefulLife + "\t" + "Depreciation" + "\t" + deprec);
    public String printSumOfYears() //musthave decrementing loop
      { double deprec;
          while (usefulLife >=1);
          for (usefulLife = usefulLife; usefulLife >= 1; usefulLife--)
              deprec = 20-10;
              System.out.println("Year"+ usefulLife + "\t" + "Depreciation" + "\t" + deprec);
    public String toString()
              String d = new String();
              d = ' ' + "Purchase Price = " + purchasePrice + "  " + "Salvage Value = " + salvageValue + "  " + "Use Life = " + usefulLife + "  " + "Sum of Years = " + printSumOfYears() + "  " + "Straight Line = " + printStraightLine();
              return d;
      NOW HERES THE MENU DRIVEN CLASS
    // Professor Dreher
    import java.text.DecimalFormat;
    import java.io.*;
    public class MenuDrivenClass2
        public static void main(String[] args)throws IOException
          BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
          char choice;
          Depreciation myDepreciation = new Depreciation();
          do
            PrintMenu();
            choice = GetChoice();
            switch (choice)
              case 'i': myDepreciation= getInput();
                        break;
              case 'a': System.out.println(myDepreciation);
                        myDepreciation.printStraightLine();
                        break;
              case 'b': System.out.println(myDepreciation);
                        myDepreciation.printSumOfYears();
                        break;
              case 'q': System.out.print(" Goodbye, have a nice day! ");
                        break;
           }//ends switch
         }while(choice != 'q');
       }//ends main
      static void PrintMenu()
          System.out.println("\n\n i - to input new depreciation information ");
          System.out.println(" a - to use the straight-line method ");
          System.out.println(" b - to use the sum-of-the-years' digits method ");
          System.out.println(" q - to quit ");
          System.out.print(" --> " );
      static char GetChoice()throws IOException
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
           char choice;
           do
             String text = in.readLine();
             choice = Character.toLowerCase(text.charAt(0));
             if(choice != 'i' && choice != 'a' && choice != 'b'  && choice != 'q')
               {  System.out.print(" Incorrect choice, please try again! ");}
            } while (choice != 'i' && choice != 'a' && choice != 'b'  && choice != 'q');
           return(choice);
      static Depreciation getInput()throws IOException
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
           System.out.print("\n Enter Purchase Price: ");
           double purchasePrice = Double.parseDouble(in.readLine());
           System.out.print(" Enter Salvage Value: ");
           double salvageValue = Double.parseDouble(in.readLine());
           System.out.print(" Enter Useful Life: ");
           int usefulLife = Integer.parseInt(in.readLine());
           Depreciation d = new Depreciation(purchasePrice,salvageValue,usefulLife);
           return(d);              
    }IN THE LAST LINE(Depreciation d=....), the "new" is a syntax error, reading..."cannot resolve symbol Depreciation (double, double, int) @ line 86"....I thank all for helping me...the Duke Dollars is now up to 10...any help is greatly appreciated....SO, any thoughts?

  • Method declaration problem

    Hi,
    I'm trying to write a class that lets the user enter the values for some parameters all of which are Floats.
    I have get and set methods for each parameter.
    example of some code:
    public class Parameters
           private Float loat affinityThresholdScalar;
            public InitialiseParams(Float aT)
                  affinityThresholdScalar = aT;
         public void setAffinityThresholdScalar(Float aT)
                  affinityThresholdScalar = aT;
           public Float getAffinityThresholdScalar()
                  return affinityThresholdScalar;
    }The error i'm getting is:
    invalid method declaration; return type required
    public InitialiseParams(Float aT,Float cR,Float hR,Float k,Float s,Float sV,Float tR)
    can anybody help?
    Thanks

    The error i'm getting is:
    invalid method declaration; return type required
    public InitialiseParams(Float aT,Float
    aT,Float cR,Float hR,Float k,Float s,Float sV,Float tR)
    can anybody help?Yup: read the error diagnostic: the compiler found a method 'InitialiseParams',
    but it didn't find the return type of that method (because you didn't supply any).
    Even methods that return nothing, return 'void', so you should simply
    alter the method definition to:public void InitialiseParams(Float aT) {
          affinityThresholdScalar = aT;
    }kind regards,
    Jos

  • Jcombobox: additem does not work! "invalid method decl."

    hi all.
    i have a gui with a jComboBox. but when i try to add an item with addItem() the compiler tells me
    invalid method declaration; return type required
    whats the problem here?? :(
    JComboBox jComboBox1 = new JComboBox();
    jComboBox1.addItem("xyz");
    thanks for help.

    I'd bet the problem is not in these 2 lines of code. Maybe you have a method that has no return type specified(as the compiler already said). Check if you have spelled the names of the constructors of your class properly and the orher methods too. An example could be
    private fillCombo(){
    must be
    private void fillCombo()...Mike

  • ClassCastException in method declaration in JSP page??

    i keep getting this ClassCastException in my jsp page. The line that
    is apparently the problem is the <%! where the method declaration
    starts. I can't seem to figure out why this is happening, can someone
    please help? Here is the full code:
    java.lang.ClassCastException
         at quickfix0itm_0submit__jsp.addUpdate(/epsc/quickfix_itm_submit.jsp:25)
         at quickfix0itm_0submit__jsp._jspService(/epsc/quickfix_itm_submit.jsp:165)
         at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
         at com.caucho.jsp.Page.subservice(Page.java:506)
         at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
         at com.caucho.server.http.Invocation.service(Invocation.java:315)
         at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
         at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:344)
         at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
         at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
         at java.lang.Thread.run(Thread.java:534)
    <%
    if ( (session.getAttribute("setID") == null ) || ( !session.getAttribute("setID").equals(session.getId()) ))
            out.write("You are either not logged in or your session has timed out due to inactivity.<BR>"
                    + "Please <a href=\"index.jsp\">return to the login screen</a> and login again<BR><BR>");
    else
    %>
    <%@ page language=java %>
    <%@ page import='java.sql.*' %>
    <%@ page import='javax.sql.*' %>
    <%@ page import='javax.naming.*' %>
    <%@ page import='java.io.*' %>
    <%@ page import='java.util.Hashtable' %>
    <%@ page import='java.util.Vector' %>
    <%@ page import='java.util.Enumeration' %>
    <%@ page import='java.util.Calendar' %>
    <%@ page import='java.util.GregorianCalendar' %>
    <%!
    private void addUpdate(String[] tmpP, String[] UIDs, String curName, String colName, String lastIdx, Hashtable uid_updates)
         if (curName.equals(colName))
              for (int c = 0; c < UIDs.length; c++)
                   Object[] tmp = (Object[])uid_updates.get(UIDs[c]);
                   Vector colNames = new Vector();
                   Vector colValues = new Vector();
                   if (tmp == null)
                        tmp = new Object[2];
                   else
                        colNames = (Vector)tmp[0];
                        colValues = (Vector)tmp[1];
                   String updateVal = tmpP[0];
                   colNames.add(curName);
                   colValues.add(updateVal);
                   tmp[0] = colNames;
                   tmp[1] = colValues;
                   uid_updates.remove(UIDs[c]);
                   uid_updates.put(UIDs[c], tmp);
         else
              int uidIdx = curName.lastIndexOf(lastIdx);
              String uidcode = curName.substring(uidIdx + 1);
              Object[] tmp = (Object[])uid_updates.get(uidcode);
              Vector colNames = new Vector();
              Vector colValues = new Vector();
              if (tmp == null)
                   tmp = new Object[2];
              else
                   colNames = (Vector)tmp[0];
                   colValues = (Vector)tmp[1];
              //String[] tmpP = request.getParameterValues(curName);
              String updateVal = tmpP[0];
              colNames.add(colName);
              colValues.add(updateVal);
              tmp[0] = colNames;
              tmp[1] = colValues;
              uid_updates.remove(uidcode);
              uid_updates.put(uidcode, tmp);
    %>
    <%
    String ss = "0";
    String force_noon = "0";
    String qfix_duration = "2";
    int qfixd = 2;
    String mod_keys = "";
    String[] mktmp = request.getParameterValues("mod_keys");
    if (mktmp == null)
         out.print("Error! Please go back and try again.");
    else
         mod_keys = mktmp[0];
    Hashtable uid_updates = new Hashtable();
    String[] UIDs = new String[1];
    if (mod_keys.equals("1"))
         UIDs = request.getParameterValues("UID");
         for (int storeUIDs = 0; storeUIDs < UIDs.length; storeUIDs++)
              Vector tmp = new Vector();
              uid_updates.put(UIDs[storeUIDs], tmp);
    Enumeration cols = request.getParameterNames();
    while (cols.hasMoreElements())
         String curName = (String)cols.nextElement();
         if (curName.indexOf("BusName") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "BusName", "e", uid_updates);
         else if (curName.equals("ss"))
              String[] asdfadf  = request.getParameterValues(curName);
              if (asdfadf != null)
                   ss = "1";
              else
                   ss = "0";
         else if (curName.equals("force_noon"))
              String[] asdfadf  = request.getParameterValues(curName);
              force_noon = asdfadf[0];
         else if (curName.equals("qfix_duration"))
              String[] asdfadf  = request.getParameterValues(curName);
              qfix_duration = asdfadf[0];
              qfixd = Integer.parseInt(qfix_duration);
         else if (curName.indexOf("DisplayLine") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "DisplayLine", "e", uid_updates);
         else if (curName.indexOf("CityName") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "CityName", "e", uid_updates);
         else if (curName.indexOf("PAC") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "PAC", "C", uid_updates);
         else if (curName.indexOf("ProvDisp") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "ProvDisp", "p", uid_updates);
         else if (curName.indexOf("TeleNum") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "TeleNum", "m", uid_updates);
         else if (curName.indexOf("ProvCode") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "ProvCode", "e", uid_updates);
         else if (curName.indexOf("Dircode") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "Dircode", "e", uid_updates);
         else if (curName.indexOf("Hdgcode") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "Hdgcode", "e", uid_updates);
         else if (curName.indexOf("EMail") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "EMail", "l", uid_updates);
         else if (curName.indexOf("URL") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "URL", "L", uid_updates);
         else if (curName.indexOf("DispAd") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "DispAd", "d", uid_updates);
         else if (curName.indexOf("TOPlus") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "TOPlus", "s", uid_updates);
         else if (curName.indexOf("EStore") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "EStore", "e", uid_updates);
         else if (curName.indexOf("HSLINE_EN") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "HSLINE_EN", "N", uid_updates);
         else if (curName.indexOf("HSLINE_FR") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "HSLINE_FR", "R", uid_updates);
         else if (curName.indexOf("MtlPlus") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "MtlPlus", "s", uid_updates);
         else if (curName.indexOf("CalPlus") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "CalPlus", "s", uid_updates);
         else if (curName.indexOf("EdmPlus") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "EdmPlus", "s", uid_updates);
         else if (curName.indexOf("VanPlus") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "VanPlus", "s", uid_updates);
         else if (curName.indexOf("DEALER_LOCATOR") != -1)
              addUpdate(request.getParameterValues(curName), UIDs, curName, "DEALER_LOCATOR", "R", uid_updates);
    long curTime = System.currentTimeMillis();
    long monthMS = 2629743832L;
    long expLength = monthMS * qfixd;
    long expTime = curTime + expLength;
    java.sql.Date d1 = new java.sql.Date(System.currentTimeMillis());
    String Start_Date = d1.toString();
    d1 = new java.sql.Date(expTime);
    String Expiry_Date = d1.toString();
    Context env1 = (Context) new InitialContext().lookup("java:comp/env");
    DataSource source1 = (DataSource) env1.lookup("jdbc/epsc");
    Connection conn1 = source1.getConnection();
    String Pub_ID = "";
    try {
         Enumeration uidKeys = uid_updates.keys();
         while (uidKeys.hasMoreElements())
              String Unique_ID = (String)uidKeys.nextElement();
              Object[] updateData = (Object[])uid_updates.get(Unique_ID);
              Vector colNames = (Vector)updateData[0];
              Vector colValues = (Vector)updateData[1];
              String selectRecord = "SELECT * from epsc_ypca WHERE Unique_ID='" + Unique_ID + "';";
              Statement getRecord = conn1.createStatement();
              ResultSet returned = getRecord.executeQuery(selectRecord);
              Pub_ID = returned.getString("Pub_ID");
              boolean createDelete = false;
              String updateString = "";
              for (int b = 0; b < colNames.size(); b++)
                   if (b != 0)
                        updateString = updateString + ", ";
                   String colName = (String)colNames.get(b);
                   String colVals = (String)colValues.get(b);
                   if (colName.equals("BusName") || colName.equals("DisplayLine") || colName.equals("ProvDisp") || colName.equals("CityName") || colName.equals("PAC") || colName.equals("TeleNum"))
                        if (!((returned.getString(colName)).equals(colVals)))
                             createDelete = true;
                   updateString = updateString + colName + "='" + colVals + "'";
              if (createDelete)
                   //create delete
                   String delFromQuickfixes = "DELETE FROM epsc_quickfixes WHERE Start_Date='" + Start_Date + "' AND Pub_ID='" + Pub_ID + "' AND QFix_Type='2';";
                   Statement delItm = conn1.createStatement();
                   delItm.execute(delFromQuickfixes);
                   String insertQfixDel = "INSERT INTO epsc_quickfixes SELECT *, '0' as UID, '" + Start_Date + "' as Start_Date, '" + Expiry_Date + "' as Expiry_Date, '2' as QFix_Type, '0' as ss, '" + force_noon + "' as force_noon FROM epsc_ypca WHERE Pub_ID='" + Pub_ID + "' AND (Record_Ind='2' OR Record_Ind='4' OR Record_Ind='6');";
                   Statement insertQFDEL = conn1.createStatement();
                   insertQFDEL.execute(insertQfixDel);
              String updateRecords = "UPDATE epsc_ypca SET " + updateString + " WHERE Unique_ID='" + Unique_ID + "';";
         String selectAndInsert = "INSERT INTO epsc_quickfixes SELECT *, '0' as UID, '" + Start_Date + "' as Start_Date, '" + Expiry_Date + "' as Expiry_Date, '3' as QFix_Type, '" + ss + "' as ss, '" + force_noon + "' as force_noon FROM epsc_ypca WHERE Pub_ID='" + Pub_ID + "';";
         Statement insertIntoQfix = conn1.createStatement();
         insertIntoQfix.execute(selectAndInsert);
         out.write("Quickfix Successfully submitted.<BR><BR>\r\n");
    catch (SQLException e)
            out.write("<h1>SQL ERROR: " + e.getMessage() + "<BR><BR>Please report to administrator</h1>");
    finally{
            conn1.close();
    %>
    <BR><BR>[ <a href="menu.jsp">Return To Main</a> ]
    </center>
    </BODY>
    </HTML>
    <%
    %>

    it is the exact same as the one i originally posted:
    500 Servlet Exception
    java.lang.ClassCastException
         at quickfix0itm_0submit__jsp.addUpdate(/epsc/quickfix_itm_submit.jsp:24)
         at quickfix0itm_0submit__jsp._jspService(/epsc/quickfix_itm_submit.jsp:169)
         at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
         at com.caucho.jsp.Page.subservice(Page.java:506)
         at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
         at com.caucho.server.http.Invocation.service(Invocation.java:315)
         at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
         at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:344)
         at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
         at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
         at java.lang.Thread.run(Thread.java:534)

  • Invalid method "Save As" from Excel application object

    I have Windows 2000 and Excel 2002 installed on my machine.
    I down loaded "renamed Excel 2000 workbook.vi" from NI website. Relinked ref num to Excel application object but get the error of invalid method (Save As). Tried to relink invoke node to Save As by selecting method from drop down menu. However this method is not on the list. Tried other excel objects but can not find "Save As" method. Has this been removed/moved?

    I was able to correct the error by relinking the Workbooks->Open to Open. This changes the subsequent Invoke Node from IAppEvents to _Workbook. There you will find the Save As method.
    Michael
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Invalid variable declaration:  object 'TIMESTAMP' must be a type or subtype

    Message 1: ORA-06550: line 91, column 14:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-488: invalid variable declaration: object 'TIMESTAMP' must be a type or subtype
    ORA-06550: line 89, column 1:
    PL/SQL: SQL Statement ignored
    I'm getting above error message when i'm trying to define one cursor from a table which has a column with data timestamp(3) in a cursor i'm not even using a column with data type timestamp .( this tables i created by importing sybase tables into oracle )
    SELECT to_char(sysdate) -- trunc(act.date_posted)
    INTO v__Data
    from cedb.cr_ar_debit_activity act
    where rownum < 2 ;
    for testing purpose i even removed the cursor and make it shor to above query then also it dosent work and gave the above error . if you know the solution then please let me know . i think i've to do/change database settings but i'm not sure .

    the above code is not working but the following code is working if i open cursor from assiging select to variable , why this is happening .
    DECLARE
         v_A_REPORT_DT VARCHAR2(100);
    ls_sel VARCHAR2(900);
    i INTEGER := 1;
    TYPE dynamic_cur IS REF CURSOR;
    tb_test_cur dynamic_cur ;
    TYPE array_date_type IS TABLE OF DATE INDEX BY PLS_INTEGER;
    v1 array_date_type ;
    BEGIN
         v_A_REPORT_DT := '01-01-2007'/* VARCHAR2(2000) */;
    -- this one is not working
    SELECT to_char(sysdate) -- trunc(act.date_posted)
    INTO v_A_REPORT_DT
    from cedb.cr_ar_debit_activity act
    where rownum < 2 ;
    ls_sel := 'SELECT trunc(act.date_posted)
    from cedb.cr_ar_debit_activity act
    where rownum < 3 ' ;
    OPEN tb_test_cur FOR ls_sel;
    LOOP
    FETCH tb_test_cur INTO v1(i) ;
    EXIT WHEN tb_test_cur%notfound;
    dbms_output.put_line(to_char(v1(i)));
    i := i + 1 ;
    END LOOP;
    CLOSE tb_test_cur;
    END;

  • Method declaration of an interface

    Hi,
    Here's an interface definition.
    public interface Foo {
    public Object getSomeObject(Object param);
    What i want to find out is,
    why do we need to specify a variable reference in the interface?
    public interface Foo {
    public Object getSomeObject(Object);//throws error.
    Thank you.

    Hi,
    Here's an interface definition.
    public interface Foo {
    public Object getSomeObject(Object param);
    What i want to find out is,
    why do we need to specify a variable reference inthe
    interface?
    public interface Foo {
    public Object getSomeObject(Object);//throwserror.
    Thank you.The interface method is just a signature that all
    classes implementing the interface must follow. Its
    syntax requires that the variable reference is
    included. There is no other reason. Its like the word
    "bought" is spelt the way it is..It could have also
    been splet as "bot" but that is incorrect.!!!
    That is right.
    It is just a signature. Also, it allows the compiler to perform its actions consistently, most of all, thereby not offering any special privileges to an interface method declaration. As we all know that the byte code representation of an 'interface type' is also a class.

  • Should I declare IllegalArgumentException in my method declaration

    Hi,
    I have a setter method which throws an IllegalArgumentException which is of type RuntimeException... It means that I need not declare it in my method declaration, but I should explicity describe in Javadoc.
    Is it a good practice to declare it in throws clause just to make it more readable? or is it superfluous and unnecessary because I am going to describe it in Javadoc anyway?
    I mean....
      * @throws IllegalArgumentException
    public void setterMethod() {
    vs
      * @throws IllegalArgumentException
    public void setterMethod() throws IllegalArgumentException {
    }Thank you,
    Srikanth

    I have a setter method which throws an
    IllegalArgumentException which is of type
    RuntimeException... It means that I need not declare
    it in my method declaration, but I should explicity
    describe in Javadoc.If you conclude that it is important that the other programmers know in which situation your method throws an IllegalArgumentException then go ahead and describe it in javadoc. If you think that it's not important, or it's not necessary, you don't need to describe it. But in general, the unchecked exception IllegalArgumentException, if it is used according to its purposes, deserves a javadoc description. Although I think you are not using this exception appropriately, because your method doesn't even have a parameter! I hope you are showing just an example, just to support your question.
    Is it a good practice to declare it in throws clause
    just to make it more readable? or is it superfluous
    and unnecessary because I am going to describe it in
    Javadoc anyway?No! It does not make it more readable. IllegalArgumentException is an unchecked exception, so you have to take advantage of this "uncheackability", that is, the advantage of not being needed to declare that the method throws it. In any case, you shouldn't declare the throws clause for any kind of unchecked exception. A description in javadoc is enough. But I see that you're just saying that the method can throw IllegalArgumentException, in the javadoc. Why don't you give more details? It is a good practice. See below an example:
      * @throws IllegalArgumentException if the parameter name passed is null,
      * or if it is equal to "".
    public void setterMethod(String name) {
    }

  • UAG 2010 RDS invalid method

    Hi All,
    would someone be so kind and post the TerminalServicesGateway rule from a working UAG install?
    I'm getting invalid method errors (well, actually they're warnings) on both RPC_OUT_DATA and RPC_IN_DATA , even though the rule is there with the methods defined. My only guess is the rule is not matching because of a wrong Parameter
    definition (see screenshot below: there's no value or anything defined).
    Running UAG 2010 SP4
    Error: Request <..> for application Remote Desktop Services of type TerminalServicesGateway failed because the  method used RPC_OUT_DATA is not valid for requested URL /rpc/rpcproxy.dll?localhost:3388.
    Thx in advance!
    Rgds - M.

    Please find below

  • NullPointerException on a method declaration?

    Hi all,
    I'm not sure whether I should be posting this here on on the app server board.
    But anyway, I have an ADF application (with ADF Faces) that works fine in JDev 10.1.3, and after some difficulty, I've managed to get it deployed, so that the first page comes up properly in a browser.
    When I click on a link in my navigation tree, however, I get an error in the method called by the CommandLink in the tree node. Here's what it is:
    javax.faces.FacesException: #{homeBean.treeNavigate}: javax.faces.el.EvaluationException
    Caused by [at the bottom]: java.lang.NullPointerException
    at mypackage.BasePage.TreeNavigate (BasePage.java:53)
    So OK, for some reason my code is firing a null pointer exception in the deployed version. Let's see what it is by checking BasePage.java, line 53:
    53) public String treeNavigate() {
    A method declaration. That shouldn't be able to throw a NullPointerException, or indeed any other runtime error, should it?
    Can anyone shed some light about what might be going on here?
    Thanks much,
    Avrom

    public void drawPictures(int size, Graphics page)
              page.drawImage (board, 0, 0, 720, 567, this);
    public void paint (Graphics page)
              drawPictures (APPLET_WIDTH, page);
    private final int APPLET_WIDTH = 720;
    board = getImage (getDocumentBase(), "board.jpg"); //inside my init() methodThanks for the quite response. I looked at my code with your suggestions and came up with this:
    If I take away my "paint" method, the buttons have no problems, but, of course, no picture comes up. Any ideas?
    I was also throw out the fact that this is my first time with GUIs. My teacher saved them to the end last year, got lazy, and then never did them. So if I am using horrible self-taught practices, it would be awesome if you can let me know, so I can improve. Thanks.
    Edited by: 7sunami on Feb 22, 2009 6:00 PM

  • Invalid package declaration:

    If you read my post a few messages down, I asked how to add a package in NetBeans. Solved (THANKS).
    But now I get this error when I mouseover the items in the package. Can I get an exact walkthrough on what to do to enable a package to work in NetBeans?
    l'll be more specific. I downloaded the jpb package from http://knking.com/books/java/ (Near the bottom)
    NetBeans saves my projects in C:\Documents and Settings\Administrator. So (In accordance with the instructions given in the book) I made the dir. C:\Documents and Settings\Administartor\jpb and inserted 3 .java files in it (SimpleIO.java Convert.java and DrawableFrame.java). From this point, what do I do so that (in netbeans) I can type import jpb.* and not get any errors?
    THANKS AGAIN FOR EVERYONE WHO HELPS

    You must compile these files, and I suggest you to
    create a jar library:
    New project -> General -> Java Class Library
    Copy your sources in it and build project. This will
    generate a .jar in the dist folder in mounted
    filesystem.
    Now add this builded jar in your project library as
    commented before.
    mariOHey there, I'm also a newb facing a similar error...
    I backed up a package by copy - pasting it and now i mounted it. However, when i mouseover any of its classes it says "Invalid package declaration" and i can't solve it....
    pls help
    THX!!!

  • Invalid xml declaration. in genXML from

    I ran genXML.jsp on Tomcat 4.0.3 from the Sun Tutorial "Development with JSP and XML -- Part II: JSP with XML in mind". I got the following error on my IE browser -
    Invalid xml declaration. Line 3, Position 3
    <?xml version="1.0" encoding="UTF-8"?>
    --^
    Any Ideas what the problem is? The code was copied and pasted directly from the on-line article.
    THX,
    Kent

    If that is on line 3, then the problem would be with whatever precedes it on lines 1 and 2.

  • Invalid xml declaration

    Hi all,
    Seem to be having a little difficulty. When I try and load my xml file into MSWord using the template builder I get this error:
    Invalid xml declaration: Line 1, position 5, file pos 4, source: <?xml version="1.0"?> url that then points to my file.
    I am at a total loss as to why this is? I have declared the following. My xml version is declared in line 1.
    BEGIN
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0"?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<PERDUMMY1>');
    FOR v_employee IN csr_employee
    LOOP
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_EMP_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Last_update_date>' || v_employee.effective_start_date      ||'</Last_update_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<ID>'           || v_employee.ID                     ||'</ID>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<TITLE>'           || v_employee.TITLE                ||'</TITLE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Marital_status>'      || v_employee.Marital_status      ||'</Marital_status>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<full_name>'      || v_employee.full_name                ||'</full_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<last_name>'      || v_employee.last_name                ||'</last_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<first_name>'      || v_employee.first_name                ||'</first_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Age>'           || v_employee.Age                    ||'</Age>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<First_Registration>' || v_employee.First_Registration           ||'</First_Registration>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Date_Of_Birth>'      || v_employee.Date_Of_Birth                ||'</Date_Of_Birth>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Gender>'           || v_employee.Gender                ||'</Gender>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Race>'           || v_employee.Race                     ||'</Race>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Personal_Address>'     || replace(v_employee.Personal_Address,'&','and')      ||'</Personal_Address>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Suburb>' || v_employee.Suburb ||'</Suburb>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Province>'      || replace(v_employee.Province,'&','and')           ||'</Province>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Postal_Code>'      || v_employee.Postal_Code               ||'</Postal_Code>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<City_Name>'      || v_employee.City_Name                ||'</City_Name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Home_Phone_Number>' || v_employee.Home_Phone_Number          ||'</Home_Phone_Number>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Cell_Phone_Number>' || v_employee.Cell_Phone_Number          ||'</Cell_Phone_Number>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Batch_Number>'      || v_employee.Batch_Number                ||'</Batch_Number>');
    FOR v_prev_emp IN cur_prev_emp (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_PREV_EMP> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_PREV_EMP>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<employer_name>' || replace(v_prev_emp.employer_name,'&','and')           || '</employer_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<job_name>' || replace(v_prev_emp.job_name,'&','and')          || '</job_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<start_date>' || v_prev_emp.start_date || '</start_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<end_date>' || v_prev_emp.end_date          || '</end_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Grp>' || v_prev_emp.Grp      || '</Grp>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<LEAV_REAS>' || replace(v_prev_emp.LEAV_REAS,'&','and')           || '</LEAV_REAS>');
    /*Close the group tag </G_NO_CHILD> at the end of child record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_PREV_EMP>');
    END LOOP;
    FOR v_prev_Qual IN cur_prev_Qual (v_employee.person_id)
    LOOP
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_PREV_qual>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Qual_Type>' || replace(v_prev_qual.Qual_Type,'&','and') || '</Qual_Type>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Qual_date>' || replace(v_prev_qual.Qual_date     ,'&','and')     || '</Qual_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<GRADE_ATTAINED>'|| replace(v_prev_qual.GRADE_ATTAINED ,'&','and') || '</GRADE_ATTAINED>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<school_name>' || replace(v_prev_qual.school_name,'&','and')     || '</school_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_PREV_qual>');
    END LOOP;
    FOR v_train IN cur_train (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_TRAIN> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_train>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Course_Name>' || replace(v_train.Course_Name,'&','and') || '</Course_Name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Course_Desc>' || replace(v_train.Course_Desc,'&','and')          || '</Course_Desc>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Start_date>' || replace(v_train.Start_date,'&','and') || '</Start_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<END_DATE>' || replace(v_train.END_DATE,'&','and')          || '</END_DATE >');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_train>');
    END LOOP;
    FOR v_MED IN cur_med (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_MED> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_MED>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Test>'           || v_MED.Test               || '</Test>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<CONSULTATION_DATE>' || v_MED.CONSULTATION_DATE           || '</CONSULTATION_DATE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Result>'           || v_MED.Result          || '</Result>');
    /*Close the group tag </G_NO_CHILD> at the end of child record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_MED>');
    END LOOP;
    FOR v_ind IN cur_ind (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_IND> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_IND>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Induction_Date>'      || v_IND.Induction_Date               || '</Induction_Date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Status>'      || v_IND.Status                     || '</Status>');
    /*Close the group tag </G_NO_CHILD> at the end of child record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_IND>');
    END LOOP;
    FOR v_first IN cur_first (v_employee.person_id)
    LOOP
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_first>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<first_Date>'      || v_first.first_Date               || '</first_Date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_first>');
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_EMP_NAME>');
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</PERDUMMY1>');
    I would be most grateful if anyone out there has any ideas?

    OPen your xml in IE, it will complain about the same thing.
    The xml formed could be wrong.
    can you paste the xml created here >?

Maybe you are looking for

  • How do I use my trailer in my new iMovie ? They are separate files.

    In my previous version of iMovie running on my iMac I could easily create a trailer (a quick preview of the video) to run at the start of my new movie.  The trailer and the movie were all part of the same file. With my new Mac Pro running iMovie 10.0

  • Help Creating a Windows Partition

    Hi I've got 2 hard drives. I want OS X Leopard on Bay 1 and Windows Vista on Bay 2. In Boot Camp Assistant which Bay do I select? Do I select "Create a second Partition for Windows" or "Erase disk and create a single partition for Windows"? any help

  • Get parent of Embedded message

    Hello all. I have a message with the following structure: Message multipart-1 gif1 embedded message (Content-Type: message/rfc822) multipart-2 text gif2 I have the gif2 body part in my hand, and I want to get the message-id header of the outer messag

  • Cannot create a new Itunes Store account

    The story is simple, yet complicated: I bought a used Ipad 1 here in New York where I live. It has been wiped by the old owner and I starded using it with my Itunes account. I never connected it to my computer to synch. Bought 3 Apps and decided to p

  • Import Multiple Excel Into Sql Server

    I have 4 Excel spreadsheets all with different formatting and column names that I want to use powershell to import into ONE Sql Server Table that I will want to create with powershell.  I have found several instances of importing one workbook, but I