JCo (in UDF) throws: "...uses or overrides a deprecated API."

Hi everybody,
when using JCO in UDF I get the error:
<b>MyMapping_.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 1 error</b>
Does anybody know how to solve the problem?
The problem occurs only when I try to access the tableParameters:
<i> codes =     function.getTableParameterList().getTable("COMPANYCODE_LIST");</i>
Regards Mario

Hi Mario,
With every latest Java version its APIs keep changing and some functions are removed or "deprecated", so if you are getting this error which means JRE you are using not have that function available so compile your code with Java -deprecation to suppress that error.
To check JRE version type Java - version on command prompt and then refer to Java API (also available online) to get detail about that particular function, otherwise you can also chose alternate function to achieve your programming objecting. I prefer if you see JCO API for help on this function.
Refer to sample code : http://www.sapdevelopment.co.uk/java/jco/jco_callfunc.htm
Regards,
Gourav

Similar Messages

  • Note: ImageViewer.java uses or overrides a deprecated API.

    hi,
    iam gettin this error after compilation
    Note: ImageViewer.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    & am running it on j2sdk1.5.0
    Plzzz help

    waoh man......but what 2 look....
    heres da code...
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import javax.swing.*;
    public class ImageViewer
    public static void main(String[] args)
    JFrame frame = new ImageViewerFrame();
    frame.setTitle("ImageViewer");
    frame.setSize(300, 400);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.show();
    class ImageViewerFrame extends JFrame
    public ImageViewerFrame()
    // set up menu bar
    JMenuBar menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    JMenu menu = new JMenu("File");
    menuBar.add(menu);
    JMenuItem openItem = new JMenuItem("Open");
    menu.add(openItem);
    openItem.addActionListener(new FileOpenListener());
    JMenuItem exitItem = new JMenuItem("Exit");
    menu.add(exitItem);
    exitItem.addActionListener(new
    ActionListener()
    public void actionPerformed(ActionEvent event)
    System.exit(0);
    // use a label to display the images
    label = new JLabel();
    Container contentPane = getContentPane();
    contentPane.add(label, "Center");
    private class FileOpenListener implements ActionListener
    public void actionPerformed(ActionEvent evt)
    // set up file chooser
    JFileChooser chooser = new JFileChooser();
    chooser.setCurrentDirectory(new File("."));
    // accept all files ending with .gif
    chooser.setFileFilter(new
    javax.swing.filechooser.FileFilter()
    public boolean accept(File f)
    return f.getName().toLowerCase()
    .endsWith(".gif")
    || f.isDirectory();
    public String getDescription()
    return "GIF Images";
    // show file chooser dialog
    int r = chooser.showOpenDialog(ImageViewerFrame.this);
    // if image file accepted, set it as icon of the label
    if(r == JFileChooser.APPROVE_OPTION)
    String name
    = chooser.getSelectedFile().getPath();
    label.setIcon(new ImageIcon(name));
    private JLabel label;
    }

  • What's this mean? - "uses or overrides a deprecated API."

    Hi, I'm a newbie at Java and I'm getting this error when I try to compile my program:
    "Note: C:\MarsLander\NewUser.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details."
    I haven't a clue what is going on here, can anybody help?

    Methods and classes may get deprecated with the threat that they will be removed form the API in a future version. Deprecated things can be but should not be used.
    (Deprecated features can be undeprecated in a future version though. There are at least tow examples for this.)
    As the message tells, compile it with the -deprecation flag and the compiler will report which method or class it is about.

  • Need help with java uses or overrides a deprecated API.

    i have some issues and have not clue where the issue is this is the error that i receive
    Note: C:\Documents and Settings\Adam\My Documents\JCreator LE\MyProjects\Pokemon\src\Pokemon.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    here is my code

    public void boundry()
                   int i;
                   //System.out.println("y is "+  (y+23) );
                   //System.out.println("x is "+ (x+17) );
                   //X10=wall[1].getX();
                   //System.out.println("wall[1]X is" + X10);
                   //check to see if over boundary
                   rightflag=2;
                   leftflag=2;
                   downflag=2;
                   upflag=2;
              for(i=0; i<=8; i++)
                   System.out.println("i is" +i);
                    //left side
                    if ( ( (x+17) > (wall.getX() ) )
                   && ( (y) < (wall[i].getY() + wall[i].getHeight()-5) )
                   && ( (y+23) > (wall[i].getY()+5 ))
                   && ( (x) < (wall[i].getX() + (wall[i].getWidth()/2) )) )
                        rightflag=1;
                        System.out.println("left");
                   else
                        rightflag=2;
                   //right side
                   if ( ( (x) < ((wall[i].getX() + wall[i].getWidth() )))
                   && ( (y) < wall[i].getY() + wall[i].getHeight()-5 )
                   && (y > (wall[i].getY() ))
                   && ( (x) > ((wall[i].getX()+(wall[i].getWidth()/2))) ) )
                        leftflag=1;
                        System.out.println("right");
                   else
                        leftflag=2;
                   //top side
                   if ( ( (y+23) > wall[i].getY() )
                   && ( (y+23) < ( wall[i].getY() + (wall[i].getHeight()/2-5) ))
                   && ( (x+17) > wall[i].getX())
                   && ( (x) < (wall[i].getX()+(wall[i].getWidth() ))) )
                   upflag=1;
                        System.out.println("top");
                   else
                        upflag=2;
                   //bottom boundry
                   if(
                   (y < (wall[i].getY()+wall[i].getHeight() ))
                   && (y > (wall[i].getY() ))
                   && ((x+17) > (wall[i].getX()))
                   && (x < (wall[i].getX()+wall[i].getWidth() ) ))
                        downflag=1;
                        System.out.println("bottom");
                   else
                        downflag=2;
                   System.out.println("test");
                   //stop them from being over boundary
                   if (rightflag==1)
                   x=x-10;
                   else if (leftflag==1)
                   x=x+10;
                   else if (upflag==1)
                   y=y-10;
                   else if (downflag==1)
                   y=y+10;
                   //draw the player
              public boolean handleEvent (Event e)
                   //Get the scroll bars to work
                   Y2 = indicatestrength.getValue();
                   Y3 = X2.getValue();
                   Y4 = Width2.getValue();
                   Y5 = height2.getValue();
                   repaint();
                   return true;
              public void save ()     
                   File dataFile = new File ("Users/jeffrey/Server/Test.rtf");
                   FileWriter out;
                   BufferedWriter writeFile;
                   //sample data to write
                   double testnumber = -34.454;
                   String testname="this is a string";
              try{
                   out =new FileWriter (dataFile);
                   writeFile = new BufferedWriter(out);
                   //write all data as strings
                   writeFile.write(testname);
                   writeFile.newLine();
                   writeFile.write(String.valueOf(testnumber));
                   writeFile.newLine();
                   //Close file
                   writeFile.close();
                   out.close();
                   System.out.println ("data written to file");
                   catch (IOException e)
                        System.out.println("there was a error writing to the file");

  • Java uses or overrides a deprecated API

    Please help on this when this error will occur
    when i am compile a JSP Page its throwing an error like this
    java uses or overrides a deprecated API

    Please help on this when this error will occur
    when i am compile a JSP Page its throwing an error
    like this
    java uses or overrides a deprecated APIThat's a warning. And it should also tell you what you need to do to get a listing of the deprecated methods that you are using.

  • Error: overrides a deprecated API

    Hi:
    I get the following error when I try to compile my code:
    Note: CalendarTest.java uses or overrides a deprecated API. Recompile with "-deprecation" for details.
    1 warning
    How do I solve the problem?
    Thanks.
    Describes a calendar for a set of appointments.
    @version 1.0
    import java.util.Vector;
    import java.util.*;
    public class CalendarTest
    {  public static void main(String[] args)
          Calendar markCalendar = new Calendar("Mark");
          Date start = new Date(2003 - 1900, 5 /*June*/, 2, 15, 0, 0);
          Date end = new Date(2003 - 1900, 5, 2, 16, 0, 0);
          markCalendar.addApp(new Appointment(start, end, "doctor"));
          markCalendar.print();     
    Describes a calendar for a set of appointments.
    class Calendar
       Constructs a calendar for the person named.
       public Calendar(String aName)
       {  name = aName;
          appointments = new Vector();
       Adds an appointment to this Calendar.
       @param anApp The appointment to add.
       public void addApp(Appointment anApp)
          appointments.add(anApp);
       Removes an appointment from this Calendar.
       @param anApp The appointment to be removed.
       public void removeApp(Appointment toFind)
          for ( int i = 0; i < appointments.size(); i++)
             if (((Appointment)appointments.get(i)).equals(toFind))
                 appointments.remove(i);
       Tests for duplicate appointment dates.
       public void dupsTest()
          for (int x = 0; x < appointments.size(); x++)
             Appointment check = (Appointment)appointments.get(x);
             for (int y = appointments.size()-1; y > x; y --)
                Appointment nextApp =(Appointment) appointments.get(y);
                if (check.match(nextApp))
                {  System.out.println("Duplicate appointments: ");
                   check.print();
                   nextApp.print();
       Prints the Calendar.
       public void print()
       {  System.out.println(name + "               C A L E N D A R");
          System.out.println();
           System.out.println("Date   Starttime    EndTime   Appointment");
          for (int i = 0; i < appointments.size(); i++)
          {  Appointment nextApp =(Appointment) appointments.get(i);
             nextApp.print();
       private Vector appointments;
       private String name;
       private Appointment theAppointment;
    Describes an appointment.
    class Appointment
       public Appointment(Date aStarttime,Date aEndtime, String aApp)
          starttime = aStarttime;
          endtime = aEndtime;  
          app = aApp;
    Method to test whether on object equals another.
    @param otherObject  The other object.
    @return true if equal, false if not
    public boolean equals(Object otherObject)
          if (otherObject instanceof Appointment)
          {  Appointment other = (Appointment)otherObject;
             return (date.equals(other.date) && starttime.equals(other.starttime)
                     && endtime.equals(other.endtime) && app.equals(other.app));
           else return false;
    Method to test whether part of an object equals another.
    @param otherObject  The other object.
    @return true if equal, false if not
    public boolean match(Object otherObject)
        if (otherObject instanceof Appointment)
         {  Appointment other = (Appointment)otherObject;
            return (date.equals(other.date) && starttime.equals(other.starttime)
                    && endtime.equals(other.endtime));
          else return false;
       Prints the Date, Starttime, Endtime and a description of the
       appointment.
       public void print()  
       {  System.out.println();
          System.out.println(date + "   " + starttime + "          " + endtime
              + "       " + app );
          System.out.println();
       private Date starttime;
       private Date endtime;
       private String app;

    The methods you used to instantiate your new dates has been deprecated and should no longer be used. This is just a warning though and your code will still work. Sun is just telling you that they no longer support those constructors for the Date class and that future releases of J2SE may not have them included in the API. If you wanted to, you could ignore it, or you could use the sample code instead for your Date creations:
    //need the following additional import
    import java.text.*;
    //HH is hours (0-23) see SimpleDateFormat for others
    DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
    Date start= formatter.parse("06/02/2003 15:00:00");
    Date end = formatter.parse("06/02/2003 16:00:00");tajenkins

  • Show error overrides a deprecated API ?

    hi,
    when my java program run, it shows,
    Note: D:\javaexample\myJavaPgm.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    what this error message.
    Can I ignore this warning ?.
    or how can i solve this warning?.

    hi,
    when my java program run, it shows,
    Note: D:\javaexample\myJavaPgm.java uses or overrides
    a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    what this error message.
    Can I ignore this warning ?.
    or how can i solve this warning?.Deprecation means a method or class has been identified as obsolete. That means that there is a newer and better alternative to something you are doing. It also means that perhaps one day the deprecated thing will disappear from the API (unlikely probably but could happen).
    To solve the warning you will have to find out what it's complaining about.
    javac -deprecation myJavaPgm.javaWill tell you what exactly is the problem.
    Then you can look in the API for alternatives.

  • JRadioButton,ButtonGroup,overrides a deprecated API

    Hi guys,
    I need to know which JRadioButton is selected in a ButtonGroup. I have to methods to do it. The problem is that I need to communicate this to other class is in other file. I have enclosed a JRadioButton variable in the other class importing javax.swing.*. But I get this warning in that class when compiling.
    Note: J:\MainObjectClass.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    1)
    public static JRadioButton getSelection(ButtonGroup group) {
    for (Enumeration e=group.getElements(); e.hasMoreElements(); ) {
    JRadioButton b = (JRadioButton)e.nextElement();
    if (b.getModel() == group.getSelection()) {
    return b;
    return null;
    On the other hand, I hava tried a different way, defining the second method. But I get the same warning in the main class now.
    2)
    public static String getSelection(ButtonGroup group) {
    for (Enumeration e=group.getElements(); e.hasMoreElements(); ) {
    JRadioButton b = (JRadioButton)e.nextElement();
    if (b.getModel() == group.getSelection()) {
    return b.getLabel();
    return null;
    Does somebody what I can do?????
    Thanks in advance.

    If you recompile with -deprecation you see which classes/methods are deprecated and you can use something else. You can also use the deprecated methods, but there's no compelling reason to do so.

  • When i compile my program i get overrides a deprecated API.

    there is no error in the program but this message override a deprecated API and there is no execute. here is the program please help me.
    * Swing version.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.BorderFactory.*;
    import javax.swing.border.* ;
    public class ff extends JPanel implements ActionListener {
    JButton n5,n2,n7,b1,b2,b3,b4,b5,b6,b7,b8,b9;
    public ff(){
    boolean inAnApplet = true;
    JPanel topPanel = new JPanel();
    topPanel.setLayout(new FlowLayout());
    //topPanel.setBackground(lightBlue);
    Border etchedBorder = BorderFactory.createEtchedBorder(Color.blue,Color.cyan);
    topPanel.setBorder(BorderFactory.createTitledBorder(etchedBorder,"Dog Products",
    TitledBorder.DEFAULT_JUSTIFICATION,
    TitledBorder.DEFAULT_POSITION,
    new Font("Serif",Font.BOLD,15),
    Color.black));
    Icon h5 = new ImageIcon( "c:\\a\\birdfood1t.gif" );
    n5 = new JButton("Button 1",h5);
    topPanel.add(n5);
    n5.setActionCommand("n5");
    n5.addActionListener(this);
    //getContentPane().add(topPanel,BorderLayout.NORTH);
    Icon h2 = new ImageIcon( "c:\\a\\birdfood1t.gif" );
    n2 = new JButton("Button 1",h2);
    topPanel.add(n2);
    n2.setActionCommand("n2");
    n2.addActionListener(this);
    //getContentPane().add(topPanel,BorderLayout.NORTH);
    Icon h7 = new ImageIcon( "c:\\a\\birdfood1t.gif" );
    n7 = new JButton("Button 2",h7);topPanel.add(n7);
    n7.setActionCommand("n7");
    n7.addActionListener(this);
    //getContentPane().add(topPanel,BorderLayout.NORTH);
    //birdfoodw();
    //public void birdfoodw() {
    //Container contentPane = getContentPane();
    JPanel v=new JPanel();
    v.setLayout(new BorderLayout());
    // setLayout(new BoxLayout(contentPane,
    JPanel v1=new JPanel();
    v1.setLayout(new GridLayout(9,1));
    v1.add(n5);
    v1.add(n2);
    v1.add(n7);
    JScrollPane sp=new JScrollPane(v1);
    v.add(sp);
    add(v,BorderLayout.CENTER);
    protected void buildToyList() {
    Icon x1 = new ImageIcon("c:\\a\\dogtoys1t.gif");
    b1.setIcon(x1);
    b1.setActionCommand("toys1");
    b1.setText("Dog toy #1");
    Icon x2 = new ImageIcon("c:\\a\\dogtoys2t.gif");
    b2.setIcon(x2);
    b2.setActionCommand("toys1");
    b2.setText("Dog toy #1");
    Icon x3 = new ImageIcon("c:\\a\\dogtoys3t.gif");
    b3.setIcon(x3);
    b3.setActionCommand("toys1");
    b3.setText("Dog toy #1");
    Icon x4 = new ImageIcon("c:\\a\\dogtoys4t.gif");
    b4.setIcon(x4);
    b4.setActionCommand("toys1");
    b4.setText("Dog toy #1");
    Icon x5 = new ImageIcon("c:\\a\\dogtoys5t.gif");
    b5.setIcon(x5);
    b5.setActionCommand("toys1");
    b5.setText("Dog toy #1");
    Icon x6 = new ImageIcon("c:\\a\\dogtoys6t.gif");
    b6.setIcon(x6);
    b6.setActionCommand("toys1");
    b6.setText("Dog toy #1");
    Icon x7 = new ImageIcon("c:\\a\\dogtoys7t.gif");
    b7.setIcon(x7);
    b7.setActionCommand("toys1");
    b7.setText("Dog toy #1");
    Icon x8 = new ImageIcon("c:\\a\\dogtoys1t.gif");
    b8.setIcon(x8);
    b8.setActionCommand("toys1");
    b8.setText("Dog toy #1");
    Icon x9 = new ImageIcon("c:\\a\\dogtoys1t.gif");
    b9.setIcon(x9);
    b9.setActionCommand("toys1");
    b9.setText("Dog toy #1");
    protected void buildFoodList() {
    Icon x1 = new ImageIcon("c:\\a\\dogfood1t.gif");
    b1.setIcon(x1);
    b1.setActionCommand("food1");
    b1.setText("Dog toy #1");
    Icon x2 = new ImageIcon("c:\\a\\dogfood2t.gif");
    b2.setIcon(x2);
    b2.setActionCommand("food1");
    b2.setText("Dog toy #1");
    Icon x3 = new ImageIcon("c:\\a\\dogfood3t.gif");
    b3.setIcon(x3);
    b3.setActionCommand("food1");
    b3.setText("Dog toy #1");
    Icon x4 = new ImageIcon("c:\\a\\dogfood4t.gif");
    b4.setIcon(x4);
    b4.setActionCommand("food1");
    b4.setText("Dog toy #1");
    Icon x5 = new ImageIcon("c:\\a\\dogfood5t.gif");
    b5.setIcon(x5);
    b5.setActionCommand("food1");
    b5.setText("Dog toy #1");
    Icon x6 = new ImageIcon("c:\\a\\dogfood6t.gif");
    b6.setIcon(x6);
    b6.setActionCommand("food1");
    b6.setText("Dog toy #1");
    Icon x7 = new ImageIcon("c:\\a\\dogfood7t.gif");
    b7.setIcon(x7);
    b7.setActionCommand("food1");
    b7.setText("Dog toy #1");
    Icon x8 = new ImageIcon("c:\\a\\dogfood1t.gif");
    b8.setIcon(x8);
    b8.setActionCommand("food1");
    b8.setText("Dog toy #1");
    Icon x9 = new ImageIcon("c:\\a\\dogfood1t.gif");
    b9.setIcon(x9);
    b9.setActionCommand("food1");
    b9.setText("Dog toy #1");
    protected void buildTreatList() {
    Icon x1 = new ImageIcon("c:\\a\\dogtreats1t.gif");
    b1.setIcon(x1);
    b1.setActionCommand("treats1");
    b1.setText("Dog toy #1");
    Icon x2 = new ImageIcon("c:\\a\\dogtreats2t.gif");
    b2.setIcon(x2);
    b2.setActionCommand("treats1");
    b2.setText("Dog toy #1");
    Icon x3 = new ImageIcon("c:\\a\\dogtreats3t.gif");
    b3.setIcon(x3);
    b3.setActionCommand("treats1");
    b3.setText("Dog toy #1");
    Icon x4 = new ImageIcon("c:\\a\\dogtreats4t.gif");
    b4.setIcon(x4);
    b4.setActionCommand("treats1");
    b4.setText("Dog toy #1");
    Icon x5 = new ImageIcon("c:\\a\\dogtreats5t.gif");
    b5.setIcon(x5);
    b5.setActionCommand("treats1");
    b5.setText("Dog toy #1");
    Icon x6 = new ImageIcon("c:\\a\\dogtreats6t.gif");
    b6.setIcon(x6);
    b6.setActionCommand("treats1");
    b6.setText("Dog toy #1");
    Icon x7 = new ImageIcon("c:\\a\\dogtreats7t.gif");
    b7.setIcon(x7);
    b7.setActionCommand("treats1");
    b7.setText("Dog toy #1");
    Icon x8 = new ImageIcon("c:\\a\\dogtreats1t.gif");
    b8.setIcon(x8);
    b8.setActionCommand("treats1");
    b8.setText("Dog toy #1");
    Icon x9 = new ImageIcon("c:\\a\\dogtreats1t.gif");
    b9.setIcon(x9);
    b9.setActionCommand("treats1");
    b9.setText("Dog toy #1");
    public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand() == "n5")
    buildFoodList();
    else if (e.getActionCommand() == "n7")
    buildToyList();
    else if (e.getActionCommand() == "n2")
    buildTreatList();
    public static void main(String args[]) {
    ff window = new ff();
    //window.inAnApplet = false;
    //window.setTitle("bird food");
    window.setSize(123,233);
    window.show();
    window.setVisible(true);

    Sana,
    Look at your last but one line where you have used ".show()", which is a deprecated API. Change to ".repaint()" and try it out.
    window.setSize(123,233);
    window.show(); // show() is deprecated API...
    window.setVisible(true);Cool
    Ravi

  • Oracle 10.2 Loadjava for SQLJ says "..uses or overrides deprecated API"

    I just upgraded to 10.2 from 8.1.7 (platform is AIX 5L) and sqlj program was INVALID after upgrade.Running loadjava on the program seems successfull, and java class is VALID, but also get:
    Note: MQBridge uses or overrides a deprecated API.          
    Note: Recompile with -deprecation for details.
    Well, after lots of reading to try and assess the significance of the error and identify the deprecated API, I think the sqlj script on UNIX will allow me to issue the 'deprecated' option to perhaps identify the old API. However, the I'm having trouble even getting the sqlj to work (I think it's in $OH/oc4j/bin with non-executable permissions) and the README in $OH/sqlj/demo seems incorrect.
    The APIs in the program are:
    import oracle.sqlj.runtime.Oracle
    import java.sql.SQLException
    import oracle.sql.CLOB
    import com.ibm.mq.*
    import java.math.BigDecimal
    import java.util.*
    import javax.swing.event.*
    Perhaps someone versed in this arena can provide some guidance in what seems to be a straighforward problem (or maybe not a problem)? Sure would appreciate it!

    HI,
    In my opinion, upgrading the RDBMS might not suffices.
    I'd re-install SQLJ 10.2f rom the companion CD and check that its working fine in your environment using the following command:
    $ sqlj -version
    Oracle SQLJ Release 10.2.0.1.0 Production
    Copyright (c) 1997, 2005, Oracle Corporation. All Rights Reserved.Oracle furnishes the following code samples under
    $ORACLE_HOME/sqlj/demo/ to check your environment:
    connect.properties // to be customized to your environment
    TestInstallCreateTable.java
    TestInstallJDBC.java
    TestInstallSQLJ.sqlj
    TestInstallSQLJChecker.sqlj
    Then make sure that:
    - the executables (script and binaries) are available under $ORACLE_HOME/bin.
    - the PATH environment variable must include $ORACLE_HOME/bin.
    - the CLASSPATH environment variable must include the following:
    - the JDBC jars (ojdbc14.jar, or clases12.jar)
    - ORACLE_HOME/sqlj/lib/translator.jar
    - ORACLE_HOME/sqlj/lib/runtime12.jar
    As described in chapter 10 of my book, here is how to use them to check
    your environment:
    // create a table for test purposes
    $ javac TestInstallCreateTable.java
    $ java -Doracle.net.tns_admin=$TNS_ADMIN TestInstallCreateTable
    SALES table created
    $
    // Check JDBC install
    $ javac TestInstallJDBC.java
    $ java -Doracle.net.tns_admin=$TNS_ADMIN TestInstallJDBC
    Hello JDBC!
    $
    // Check the SQLJ translator, runtime, and the application
    $ sqlj TestInstallSQLJ.sqlj
    $ java -Doracle.net.tns_admin=$TNS_ADMIN TestInstallSQLJ
    Hello, SQLJ!
    $Then check that SQLJ is installed in the database using
    SQL> describe sys.sqljutlOtherwise, run the sqljutl.sql script to install it. In addition, the following query checks the availability of the SQLJ translator in the database (using system or a DBA account)
    SQL> select object_type, status from all_objects where
    2 dbms_java.longname(object_name) ='oracle/sqlj/checker/JdbcVersion';See chapter 10, 11 and 12 of my book for further coverage..
    Kuassi, http://db360.blogspot.com

  • Code overrides deprecated API...recompile with

    Hi,
    Need help compiling SampleProgram(see code below).
    (using JDK 1.3.1_06. and JCreator 2.5 build 8)
    The following code(see below) compiles with an error:
    "Note: C:\Documents and Settings\Alex1\My
    Documents\Alex Files\My Java\Lesson
    2\SampleProgram.java uses or overrides a deprecated
    API.
    Note: Recompile with -deprecation for details.
    Process completed."
    How can I change to make it work? Please help/advise.
    Alex
    CODE below:
    import java.awt.*;
    import javax.swing.*;
    public class SampleProgram
    static JFrame f1;
    static JPanel p1;
    JButton b1, b2;
    SampleProgram()
         p1 = new JPanel();
         b1 = new JButton("Submit");
         b2 = new JButton();
    b2.setLabel("Cancel");
    p1.add(b1);
    p1.add(b2);
    public static void main(String args[])
         f1 = new JFrame("Sample Application");
         f1.getContentPane().add(p1);
         f1.setSize(300,300);

    Compile the progam this way to show u where the deprecation is.
    javac -deprecation SampleProgram.java
    This show that button.setLabel("Cancel");
    has been deprecated.
    Why don't you do it just the way you set the label for the submit button.
    That's like;
    b2 = new JButton("Cancel");
    By the way programs runs fine with the deprecation, its not an error.

  • About error message classname.java overrides or depriciated api

    this is sudhakar
    i done java program and after compilation i got the message that
    classname.java uses or overrides a depriciated api . then iam unable to do the next step please specify what is the reason and solution to this problem.

    A deprecated API is one that has been targeted for destruction by the Bytecode Ninja Hit Squad. Basically, it's code that used to work, and still works, but at some point in the future, will probably stop working. Why? Because another way has been found to do the same thing--sometimes a better way, more often simply a more consistent way.
    So, if your code is using or overriding a deprecated API, chances are, it works now but may not in the next version of Java (although those deprecated APIs do seem to keep hanging around and hanging around... backwards compatibility keeps things from being just plain wantonly deleted...). Therefore, it's recommended that you rewrite your code to eliminate the references to the deprecated APIs and use the newer replacement versions instead.
    Now, how do you find out exacty what they are? Well, you recompile with -deprecated, just like the error message tells you. Instead of typing
    javac MyApp.javayou type
    javac MyApp.java -deprecatedI think. I say "I think" because I never do it, and may not be remembering the syntax perfectly. A quick glance at the documentation should clarify that for you.
    So, why do I never do it? Because I use an IDE that does it for me. I just go to the compiler options and check the box that says "Report Uses of Deprecated APIs" and all the rest is automatic. If you are using an IDE, you may have a similar option available to you.
    Now, once you know which code is referencing the deprecated APIs, what do you do? Simple. You read the documentation. Most often, the javadoc for the method in question will say something like,
    @deprecated Use shinyNewMethod() instead.And so you replace your marked old method with the shiny new method (and if it's a FontMetrics-related method, you're gonna have loads of fun navigating that source code!) and all will be well, and you'll have kept that Bytecode Ninja Hit Squad off your trail for yet another day.
    Sincerely,
    Dylan

  • FSG Error when using segment override

    Hi,
    I have the following error when using segment override :
    General Ledger: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    RGRARG module: Financial Statement Generator
    +---------------------------------------------------------------------------+
    Current system time is 26-APR-2012 11:17:22
    +---------------------------------------------------------------------------+
    Starting Program RGRARG.
      Arguments are:
        0   RGRARG                    - RGRARG
        1   username/password         - username/password
        2   0                         - 0
        3   Y                         - Y
        4   Data Access Set ID        - 1030
        5   Chart of Accounts Id      - 101
        6   ADHOC Prefix              - FSG-ADHOC-
        7   Industry                  - C
        8   Flex Code Id              - GLLE
        9   Default Ledger ID         -
       10   Report ID                 - 1011
       11   Row Set ID                - 3461
       12   Column Set ID             - 1018
       13   Period of Interest        - SEP-11
       14   Unit of Measure ID        - IDR
       15   Rounding Option           - C
       16   Override Values           - ----DIV3---000000
       17   Content Set ID            -
       18   Row Order ID              -
       19   Report Display Set ID     -
       20   Output Option             - R
       21   Exceptions Flag           - N
       22   Miniumum Display Level    -
       23   Effective Date            -
       24   Parameter Set ID          - 1011
       25   Maximum Page Length       - 58
       26   Sub-Request Run ID        - -998
       27   Application Shortname     - SQLGL
    Message level is: Normal
    rgrini() 26-APR-2012 11:17:22 rgrini.build_per_arr:
    Query for period set name from GL_ACCESS_SETS
    SELECT  period_set_name
    FROM GL_ACCESS_SETS
    WHERE access_set_id = 1030
    rgrini.build_per_arr:
    period set name from GL_ACCESS_SETS:
    ACCOUNTING
    rgrini.build_per_arr:
    Query for period names from GL_PERIODS
    SELECT  period_name,
        to_number(to_char(end_date,'YYYYMMDD'))
    FROM GL_PERIODS
    WHERE period_set_name = :p_value
    ORDER BY NLSSORT(period_name,'NLS_SORT=BINARY') ASC
    control->report_id = 1011
    control->row_set_id = 3461
    control->column_set_id = 1018
    control->row_order_id = 0
    control->content_set_id = 0
    control->display_set_id = 0
    control->parameter_set_id = 1011
    control->resp_lvl = 0
    control->round_option = C
    control->output_option = R
    control->excp = FALSE
    control->sub_req_run_id = -998
    control->appl_id = 101
    control->id_flex_code = GLLE
    control->ldg_val_set_id = 1010673
    control->ledger_id = 0
    control->ledger_name =
    control->ledger_currency =
    control->access_set_id = 1030
    control->security_segnum = 0
    control->per_cnt = 162
    control->runtime_currency = IDR
    control->resp_id = 50386
    control->resp_appl_id = 101
    control->enforce_security = TRUE
    control->sec_rules = NULL
    control->reduced_ranges = NULL
    control->num_reduced_ranges = 0
    control->max_char_width = 1
    control->total_num_cols = 0
    control->page = NULL
    << rgrini() 26-APR-2012 11:17:22
    rgranl() 26-APR-2012 11:17:22Current date and time:  Thu Apr 26 11:17:22 2012
    rgrgsa() 26-APR-2012 11:17:22
    << rgrgsa() 26-APR-2012 11:17:22
    rgrdrs() 26-APR-2012 11:17:22req_id_str =
    809694
    rgrdpg.rgrdpg: Unable to read value for profile option RG_DEBUG_ON..
    rgrprt.rgrprt: Defaulting value for profile option RG_DEBUG_ON to FALSE..
    rgrgas() 26-APR-2012 11:17:22 Entering code to get axis set 1018
    << rgrgas() 26-APR-2012 11:17:22
    rgrgas() 26-APR-2012 11:17:22 Entering code to get axis set 3461
    << rgrgas() 26-APR-2012 11:17:23
    rgrgrp() 26-APR-2012 11:17:23
    << rgrgrp() 26-APR-2012 11:17:23
    COA Structure :
    Segment: LEDGER_SEGMENT : Ledger
    Segment: SEGMENT1 : COMPANY
    Segment: SEGMENT2 : ACCOUNT
    Segment: SEGMENT3 : PRODUCT
    Segment: SEGMENT4 : DIVISION
    Segment: SEGMENT5 : DEPOT
    Segment: SEGMENT6 : COST CENTER
    Segment: SEGMENT7 : FUTURE
    Segment value security is enforced for Financial Statement Generator reporting.
    rgrrsr() 26-APR-2012 11:17:23
    rgrrsf() 26-APR-2012 11:17:23
    << rgrrsf() 26-APR-2012 11:17:23
    << rgrcrl() 26-APR-2012 11:17:23
    << rgrrsr() 26-APR-2012 11:17:23
    rgrpsr() 26-APR-2012 11:17:23The COMPANY segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All COMPANY values will be processed.
    The ACCOUNT segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All ACCOUNT values will be processed.
    The PRODUCT segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All PRODUCT values will be processed.
    The DIVISION segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All DIVISION values will be processed.
    The DEPOT segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All DEPOT values will be processed.
    The COST CENTER segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All COST CENTER values will be processed.
    The FUTURE segment has security enabled. However, there are no security rules assigned to this responsibility for this segment, or this segment uses a dependent value set.  All FUTURE values will be processed.
    << rgrpsr() 26-APR-2012 11:17:23
    rgrdrs.rgrdrs: Getting value for profile option EXPAND_PARENT_VALUE equal No.
    PERF0005: Oracle error detected in get_def_ldgs - ORA-01403: no data found
    <x get_def_ldgs() 26-APR-2012 11:17:24
    <x get_def_ldgs() 26-APR-2012 11:17:24
    rgrgax() 26-APR-2012 11:17:24 rgrgax:get_axes
    Starting axis query.
    rgumsg:
    fdnwsc() is used by default
    rgrgax.get_conts - Prepare:
    ORA-00936: missing expression
    Current date and time:  Thu Apr 26 11:17:24 2012
    Entered sauulc with code 1 from line 3333 of file rg/lib/rgrgax.c.
    +---------------------------------------------------------------------------+
    Start of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    +---------------------------------------------------------------------------+
    End of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    +---------------------------------------------------------------------------+
    Executing request completion options...
    Output file size:
    0I have followed the following notes but it didn't help me
    R12: FSG: PERF0005 Error Detected In GET_DEF_LDGS - ORA-01403: No Data Found Common Issues [ID 1368691.1]
    Generating a FSG Report Application Does Not Find Profile Values for RG_LOGFILE_DETAIL_LEVEL and EXPAND_PARENT_VALUE [ID 165339.1]
    does anyone know how to solved the problem ??
    please advise
    thx

    I have followed the following notes but it didn't help me
    R12: FSG: PERF0005 Error Detected In GET_DEF_LDGS - ORA-01403: No Data Found Common Issues [ID 1368691.1]
    Generating a FSG Report Application Does Not Find Profile Values for RG_LOGFILE_DETAIL_LEVEL and EXPAND_PARENT_VALUE [ID 165339.1]
    does anyone know how to solved the problem ??If none of the docs help, please log a SR.
    Thanks,
    Hussein

  • BO 4.0 LCM - Using the Override Settings Option

    I am reading the LCM user manual and I am wondering:
    What is meaning of Using the Override Settings Option?
    I need to use LCM to move WebI reports and Universes from one environment to another
    and from one environment to a LCMBIAR file.

    I did everything as advised to apply an override for the universe connection object, even though there is no change in the connection settings from QA to PROD, I still get this during Test Promote:
    Resolution Status=Copied, Dependency Status=All the required dependencies are included., Commit Status=Commit is successful., Promotion Status=Warning : Can't apply override; Override information is Not Available
    When I do the actual promotion, the job fails for the connection object citing override issues. I don't know what's going on with LCM but is there any way to no be forced to use the override feature?
    Thanks!

  • Printing a PDF document using Java 1.4 Printing API

    Hi,
    When I tried to print a PDF document using JAVA 1.4 Printing API, I got the following exception.
    Exception in thread "main" sun.print.PrintJobFlavorException: invalid flavor
    at sun.print.Win32PrintJob.print(Win32PrintJob.java:290)
    at Printing.main(Printing.java:40)
    I am able to print the same PDF document using Acrobat reader.
    Is PDF format not supported in JAVA 1.4 printing API? or is something wrong in my code?
    here is the sample JAVA program that I was using
    import javax.print.*;
    import javax.print.attribute.*;
    import java.io.*;
    public class Printing {
    public static void main(String args[]) throws Exception {
    String filename = args[0];
    PrintRequestAttributeSet pras =
    new HashPrintRequestAttributeSet();
    DocFlavor flavor = DocFlavor.INPUT_STREAM.PDF;
    PrintService defaultService =
    PrintServiceLookup.lookupDefaultPrintService();
    DocPrintJob job = defaultService.createPrintJob();
    FileInputStream fis = new FileInputStream(filename);
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(fis, flavor, das);
    job.print(doc, pras);
    Thread.sleep(10000);
    System.exit(0);
    Thank you
    Sumana

    Here's a pure Java solution (that works!):
    http://www.mycgiserver.com/~zhouwu/pdf/readme.html
    The caveats are:
    - prints only to the default printer
    - requires a properties file located in the home directory
    my workaround for the last:
         * Print a PDF file to the default printer (might consume lots of memory!).
         * <p>
         * <b>Required:</b>
         * <ul>
         * <li>a file "acrobat.properties" needs to be in the working directory. The content is:
    <table align="center" bgcolor="#E0E0E0" border=1 cellpadding="10" cellspacing="0"><tr><td><pre style="margin-top:0; margin-bottom:0">
    #com.adobe.acrobat.Viewer Properties
    #Wed Oct 29 20:34:05 PST 2003
    com.adobe.acrobat.AcceptedLicAgreement=true
    com.adobe.acrobat.Fax_Fine_Mode=true
    com.adobe.acrobat.Find\:FindAll=false
    com.adobe.acrobat.Find\:FindBackwards=false
    com.adobe.acrobat.Find\:FindWholeWord=false
    com.adobe.acrobat.Find\:MatchCase=false
    com.adobe.acrobat.Open_Dialog_Directory=C\:\\temp\\
    com.adobe.acrobat.Open_Dialog_File=itext.pdf
    com.adobe.acrobat.Print_Method_Known=true
    com.adobe.acrobat.Shrink_To_Fit=false
    com.adobe.acrobat.SitePreferencesURL=file\://localhost/C\:/pdf/acrobat-site.properties
    com.adobe.acrobat.Use_Print_Server=false
    com.adobe.acrobat.util.fontDirectories=C\:\\Winnt\\Fonts
    com.adobe.acrobat.util.fontIgnoreExtensions=.fon;.pfm;.ini;.lst;.txt;.doc;.ttmap;.z;.enc;.dir;.afm;.f3b;.pfa;.spd;.ps;.bepf;.map;.alias;.scale;.all;.upr
    </pre></td></tr></table>
         * <li>The JAR files PDFPrinter.jar, acrobat.jar and MRJToolkitStubs.zip in the CLASSPATH.
         * </ul>
         * <p>
         * Note: the file "acrobat.properties" is expected to be in the user's home directory. As this is not always feasible,
         * the system property "user.home" is mapped to "user.dir" for the time of execution.
         * @param fileName Name of PDF file to print.
         * @throws Exception on error.
         * @see <a href="http://www.mycgiserver.com/~zhouwu/pdf/readme.html">PDF Server (Silent) Printing</a>
        public void printPDF(String fileName) throws Exception {
            String oldHome = System.getProperty("user.home");
            System.setProperty("user.home", System.getProperty("user.dir"));
            PDFPrinter vi = new PDFPrinter();
            vi.activate();
            vi.setDocumentInputStream(new FileInputStream(fileName));
            vi.printAll();
            System.setProperty("user.home", oldHome);
        }//printPDF()I just need the following additional files in my CLASSPATH: PDFPrinter.jar, acrobat.jar and MRJToolkitStubs.zip. Despite the note at the site above that "printing quality is not very good", i can't agree: the print quality is quite good. Not perfect, but acceptable for most uses.
    (Tested on Windows 2000 SP4, J2SE 1.4.2_03, hp laserjet 2300dn)

Maybe you are looking for

  • Really hot macbook pro

    my macbook pro gets really hot. i know that laptops get warm, but sometimes my laptop gets so hot that it seems like it could burn.

  • Can you upload to a file system directly and not to wwv_flow_file_objects$

    The following link shows how to upload a file. These files that are uploaded are stored in a table called wwv_flow_file_objects$ . However what if I want to upload a file but save it to the file system (share) and not put it into wwv_flow_file_object

  • Ibook randomly shutting down...

    Hello all, I have been experiencing a problem of my computer just shutting down at random times. This problem is not in conjunction with any other problems like freeziing or anything like that. I do not think it is a loose battery because it just shu

  • Refine Edge Problem - Tool Won't Work

    Hi there, I have a problem with the Refine Edge tool in Photoshop CS3. I make my selection, press "Refine Edge", make the changes I require and the preview shows everything is fine. I click "OK", the Refine Edge box disappears and my changes do as we

  • My images have shrunk (MB-wise)!

    I used the batch process in the APE Editor to resize my photos from 240 to 300 dpi or ppi or whatever it is. Prior to this, they were all about the same size as the CR2 files (for example, 16 MB on average); after resizing, though (as highest quality