Can someone tell me what's wrong with this LOV query please?

This query works fine..
select FILTER_NAME display_value, FILTER_ID return_value
from OTMGUI_FILTER where username = 'ADAM'
But this one..
select FILTER_NAME display_value, FILTER_ID return_value
from OTMGUI_FILTER where username = apex_application.g_user
Gives the following error.
1 error has occurred
* LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
Thanks very much,
-Adam vonNieda

Ya know, I still don't know what's wrong with this.
declare
l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
begin
return 'select filter_name display_value, filter_id return_value
from otmgui_filter where username = '''|| l_val || '''';
end;
Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
What am I missing here?
Thanks,
-Adam

Similar Messages

  • Can someone tell me what's wrong with this method

    public boolean drop(int col, int piece) {
              if (isLegalMove(col)) {
                   for (int r = 0; r < getNumRows(); r++) {
                        if (mySpaces[r][col] == EMPTY) {
                             mySpaces[r][col] = piece;
                             return true;
              } else
                   return false;
         }it always asks that I need to return something, what should I do??

    public boolean drop(int col, int piece) {
        if (isLegalMove(col)) {
            for (int r = 0; r < getNumRows(); r++) {
              if (mySpaces[r][col] == EMPTY) {
                mySpaces[r][col] = piece;
                return true;
        } //else <--- remove the else
        return false;
    }

  • Can someone tell me what's wrong with this code....

    I apologize in advance for anyone who isn't a Steelers fan...
    import java.awt.*;
    import javax.swing.*;
    public class myJPanel extends JPanel
         public myJPanel()
              setBackground(Color.white);
         JLabel label1 = new JLabel();
         label1.setText("Ben Roethlisberger #7 Age 23");
         add(label1);
         JButton jb1;
         ImageIcon imageBen = new ImageIcon("Ben.JPG");
         jb1 = new JButton(imageBen);
         add(jb1);
         JLabel label3 = new JLabel();
         label3.setText(whatIsUp());
         add(label3);
         for(i=0;i<20;i++)
         String whatIsUp()
              int n = 0;
              double nn = 0;
              String b = "......";
              nn = (Math.random() * 6);
              n = (int)nn;
              if (n == 0)
                   b = "Ben Roethlisberger throws a touchdown pass to Hines Ward.";
                   JButton jb2;
              ImageIcon imageHines = new ImageIcon("Hines.jpg");
              jb2 = new JButton(imageHines);
              add(jb2);
              if (n == 1) b = "Ben Roethlisberger throws a touchdown pass to Antwaan Randle El.";
              if (n == 2) b = "Ben Roethlisberger throws a touchdown pass to Heath Miller.";
              if (n == 3) b = "Ben Roethlisberger throws a touchdown pass to Cedrick Wilson.";
              if (n == 4) b = "Ben Roethlisberger throws a touchdown pass to Jerame Tuman.";
              if (n == 5) b = "Ben Roethlisberger hands off to Jerome Bettis for a touchdown.";
              return b;
    Everything is ok if i take the for loop out, but for some reason everything just gets screwed up if I have that for loop in there. And these are the error messages I'm getting.
    'illegal start of type (line 21)' and '<identifier> expected (line 48)'
    Thanks in advance for your help...

    Hey I'm sorry but this is only my second week doing
    Java. Do you think you could explain that more or
    give me an example??
    Bad Version (like yours but simplified)
    public class Sample{
      public static void main(String args[]){
        for(int i=0;i<20;i++){
          String whatIsUp(){
             return "Doc";
          System.out.println(?);// I am not even sure how to write this voodoo part
    }Good Version
    public class Sample{
      public static void main(String args[]){
        for(int i=0;i<20;i++){
          String aString = whatIsUp();
          System.out.println(aString);
      String whatIsUp(){
        return "Doc";
    }

  • Can someone tell me what's wrong with my router?

    i was just using my router half-hour ago and it was working fine......i come back on a little bit and it is not working anymore........my wlan and dmz light in front of my WRT54G router won't light up and it keeps telling me that my connection is limited...i already reset both router and cable modems like 100 times already..is there any way i could fix this?

    okay...  if you are using cable internet connection, try restting the router back to factory default settings by pressing reset butoon on the back panel of router, power cycle the n/w by unplugging power cable of router and modem, wait for couple of minutes and power up the modem first once modem is rebooted power up the router, check internet works or not, if still doesn't work let me know which internet service are you using also tell me version no of WRT54G router so that i can tell you step by step configuration of router...

  • Can someone tell me what's wrong with my threading code

    I got some code from a Java book on how to create a simple threading application. This is the exact code from the book but for some reason it gives me an error that non-static variables can not be referenced from static content. How can I reword this to work?
    <CODE>
    package multithread;
    import java.io.*;
    import java.util.*;
    public class MultiThread {
    class CountDownEven extends Thread {
    public void run() {
    for (int i = 6; i > 0; i -= 2) {
    System.out.println(this.getName() + " Count" + i);
    Thread.yield();
    class CountDownOdd extends Thread {
    public void run() {
    for (int i = 5; i > 0; i -= 2) {
    Thread.yield();
    public static void main(String[] args) {
    try {
    CountDownEven count1 = new CountDownEven();
    CountDownOdd count2 = new CountDownOdd();
    count1.start();
    count2.start();
    catch (Exception e)
    </CODE>

    One possible solution:public static void main(String[] args) {
         try {
              MultiThread m = new MultiThread();
              CountDownEven count1 = m.new CountDownEven();
              CountDownOdd count2 = m.new CountDownOdd();
              count1.start();
              count2.start();
         } catch (Exception e) {
    }

  • Please can someone tell me what's wrong in this code

    1var a=0;
    2function main(){
    3var inFolder = Folder.selectDialog("Please select folder to process");
    4//Save the Current Preferences
    5var startRulerUnits = preferences.rulerUnits;
    6preferences.rulerUnits = Units.PIXELS;
    7//Get all the files in the folder
    8var filelist=inFolder.getFiles()
    9n=filelist.length;
    10//Open each file
    11for(a=0; a<n; a++){
    12// The fileList is folders and files so open only files
    13if (fileList[a] instanceof File) {
    14open(fileList[i])
    15var docName = app.activeDocument.name;
    16app.activeDocument.flatten();
    17activedocument.save();
    18}
    19}
    20}
    21main();
    Says the error is "filelist is not recognized".    on line 14.   I thought I had fully defined 'filelist' on line8
    I thought filelist was a one-D array variable.
    Peterkal

    Also, in lines 8 and 9 you use a variable called "filelist" but in lines 13 and 14 you call it "fileList" (notice the capital-L).
    JavaScript is case-sensitive, so you must be consistent with your variable names throughout.

  • Can someone tell me i did wrong with this part of my code?

    choice = Integer.parseInt (usersChoice);//Math Conversion
         Input = JOptionPane.showInputDialog(null, "How many would you like?[" + Quantity +"]: ");
         price[Quantity] = Float.parseFloat(Input);//conversion from string to int
    JOptionPane.showMessageDialog(null, "You want: " + price[Quantity]);
    for (Quantity=0; Quantity<100;Quantity++)
    When i try to compile i am getting an error "incompatible types" and operator > and ++ cannot be applied to int[],int and int[]

    When i ask a question of my instructor i am lucky if i get a response 48 hrs later, and as for asking my peers, most of them are just as confused as i am. All i am doing is trying to learn i am sorry if you feel that asking on this forum is wrong, but like i said i am attemtping to learn and i figured that who better than to ask then a bunch of people who know Java like the back of their hands.

  • I have i pad 2 ios 4.3.1 i want to update it to 4.3.3 but i get error msg 3194 can you tell me what's wrong with apple some people talking about apple don't veryfiy 4.3.3 anymore thanks alot

    i have i pad 2 ios 4.3.1 i want to update it to 4.3.3 but i get error msg 3194 can you tell me what's wrong with apple some people talking about apple don't veryfiy 4.3.3 anymore thanks alot

    4.3.5 is the current version, so that is the version that iTunes will download, not 4.3.3
    In terms of error 3194, have you got the latest version of iTunes on your computer ? - http://support.apple.com/kb/TS3694#error3194

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • What's wrong with this ejb-query?

    Hi people,
    may be i worked too much, may be i've just missed something, but guys, can enyone tell me what the hell is wrong with this GOD DAMNED query?
    <ejb-ql>Select Object(adt) From AddrDataTable AS adt, IN (adt.addresseeQualities) AS aq WHERE adt.season.id = ?1 And aq.aQTemplate.id=?2</ejb-ql>
    That JBoss throws following exception:
    org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'Select Object(adt) From AddrDataTable AS adt, IN (adt.addresseeQualities) AS aq WHERE adt.season.id = ?1 And aq.aQTemplate.id=?2'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 103.
    Was expecting one of:
    "ABS" ...
    "LENGTH" ...
    "LOCATE" ...
    "SQRT" ...
    "+" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <NUMERIC_VALUED_PARAMETER> ...
    <NUMERIC_VALUED_PATH> ...
    at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.<init>(JDBCEJBQLQuery.java:50)
    The worst thing is that when i remove WHERE clause JBoss keeps silence like a fish - it works fine!
    So, any ideas about this?
    Thank you

    Are you sure the ?1 and ?2 parameters exist in the method for which the query is addressed.
    In the statement adt.season.id I guess season is a CMR field and then season has a CMP field called id
    and the same for aq.aQTemplate.id, aQTemplate being the CMR field and the is being a CMP field in the CMR.
    and in adt.addresseeQualities is a CMR field?
    Looks like a complex query
    SELECT OBJECT(adt) from BEAN AS adt,
    IN(adt.CMR_FIELD) AS aq
    WHERE
    adt.ANOTHER_CMR.ANOTHER_AMR_CMP_FIELD=?1
    AND
    aq.2_CMR_FIELD.2_CMP_FIELD =?2

  • Someone who is good with CSS-P tell me what is wrong with this?

    I'm doing a remake of my current site but this time I'm going
    to do it
    COMPLETLEY tabless and use CSS-P. So far I'm doing great but
    there is one
    thing I can't figure out for the life of me...
    http://verticalterrain.com/Templates/main.dwt
    Check out my template I'm building there and someone tell me
    why in god's
    name is the "About Us" button on a totally seperate line. If
    you view my
    source code there is no <br /> or anything like that.
    Anyone have any
    ideas?
    Best Regards,
    Chris Jumonville
    iMedia Web Design
    503.277.3553

    On Fri, 10 Nov 2006 11:48:55 +0100, A.Translator
    <[email protected]> wrote:
    >You are asking about CSS-P but only show your html.
    >Makes it hard to tell what is going on.
    The link is in the template!
    http://verticalterrain.com/style.css
    Steve
    steve at flyingtigerwebdesign dot com

  • What is wrong with this class? Please help

    I'm trying to sort a dynamically created JComboBox into Alphabetical order. However, the class below is the result of my coding and there is a problem. the code can sort only two(2) item in the JComboBox and no more which is wrong. I do not know where i'm going wrong in the selectionSort(JComboBox cmb) method. the getLargest(JComboBox cmb) method works perfectly because i have tried it. Can somebody please take a look at my codes and help me modify it.
    Thanks
    James
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class SortCombo extends JFrame implements ActionListener{
    JButton btnAdd, btnSort;
    JComboBox cmbItems;
    JTextField text1;
    public SortCombo(){
    super("Sorting Demo");
    this.getContentPane().setLayout(new GridLayout(4,1));
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    btnAdd = new JButton("Add Item to Combo Box");
    btnSort = new JButton("Sort Items in ComboBox");
    text1 = new JTextField(20);
    cmbItems = new JComboBox();
    btnAdd.addActionListener(this);
    btnSort.addActionListener(this);
    this.getContentPane().add(cmbItems);
    this.getContentPane().add(text1);
    this.getContentPane().add(btnAdd);
    this.getContentPane().add(btnSort);
    this.pack();
    this.show();
    public void actionPerformed(ActionEvent e){
    if(e.getSource() == btnAdd){
    String s = text1.getText();
    if (!s.equals("") && !isDuplicate(s,cmbItems))
    cmbItems.addItem(text1.getText());
    }else if(e.getSource() == btnSort){
    selectionSort(cmbItems);
    // int i = getLargest(cmbItems);
    // System.out.println(i);
    public boolean isDuplicate(String stationName, JComboBox cmb){
    int j = cmb.getItemCount();
    boolean result = false;
    for (int i = 0; i < j; i++){
    String s = (String)cmb.getItemAt(i);
    if (stationName.trim().equalsIgnoreCase(s.trim()))
    result = true;
    return result;
    public int getLargest(JComboBox cmb){
    int indexSoFar = 0;
    int size = cmb.getItemCount();
    for(int currIndex = 1; currIndex < size; currIndex++){
    String strSoFar = (String)cmb.getItemAt(indexSoFar);
    String currStr = (String)cmb.getItemAt(currIndex);
    char charSoFar = strSoFar.charAt(0); charSoFar = Character.toUpperCase(charSoFar);
    char currChar = currStr.charAt(0); currChar = Character.toUpperCase(currChar);
    if(currChar > charSoFar){
    indexSoFar = currIndex;
    return indexSoFar;
    public void selectionSort(JComboBox cmb){
    int n = cmb.getItemCount();
    for (int last = n-1; last >=1; last--){
    int largest = getLargest(cmb);
    String temp = (String)cmb.getItemAt(largest);
    String temp2 = (String)cmb.getItemAt(last);
    cmb.removeItemAt(largest);
    cmb.insertItemAt(temp2,largest);
    cmb.removeItemAt(last);
    cmb.insertItemAt(temp,last);
    public static void main(String[] args){
    new SortCombo();
    }

    I beleive what is wrong is that your getLargest method returns the largest to your selection sort.The selectionSort places the largest at the end.On the next iteration it finds the largest again. this time at the end where you put it.Now it just does the same thing over again placing the same item at the end until the loop runs out.What you are left with is only one item it the right spot(sometimes 2).I could not get it to work the way you had it here so I tried a rewrite.It seems to work ok but it won't sort two words that start with the same letter properly.You may have to insert an algorithm to fix this.I got rid of the getLargest method and did everything in the selectionSort method.I used what I think is called a bubble sort but I'm not sure.
    I hope this is what you were looking for:)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class SortCombo extends JFrame implements ActionListener{
         JButton btnAdd, btnSort;
         JComboBox cmbItems;
         JTextField text1;
         public SortCombo(){
              super("Sorting Demo");
              getContentPane().setLayout(new GridLayout(4,1));
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              btnAdd = new JButton("Add Item to Combo Box");
              btnSort = new JButton("Sort Items in ComboBox");
              text1 = new JTextField(20);
              cmbItems = new JComboBox();
              btnAdd.addActionListener(this);
              btnSort.addActionListener(this);
              Container pane = getContentPane();
              pane.add(cmbItems);
              pane.add(text1);
              pane.add(btnAdd);
              pane.add(btnSort);
              pack();
              show();
         public void actionPerformed(ActionEvent e){
              if(e.getSource() == btnAdd){
              String s = text1.getText();
              if (!s.equals("") && !isDuplicate(s,cmbItems))
              cmbItems.addItem(text1.getText());
              }else if(e.getSource() == btnSort){
              selectionSort(cmbItems);
         public boolean isDuplicate(String stationName, JComboBox cmb){
              int j = cmb.getItemCount();
              boolean result = false;
              for (int i = 0; i < j; i++){
                   String s = (String)cmb.getItemAt(i);
                   if (stationName.trim().equalsIgnoreCase(s.trim()))
                   result = true;
              return result;
         public void selectionSort(JComboBox cmb){
              int count = cmb.getItemCount();
              for(int start = 0;start < count;start++){
                   for(int x = start;x < count-1;x++){
                        String first = (String)cmb.getItemAt(start);
                        String next = (String)cmb.getItemAt(x+1);
                        char charFirst = first.charAt(0);
                               charFirst = Character.toUpperCase(charFirst);
                        char charNext = next.charAt(0);
                        charNext = Character.toUpperCase(charNext);
                             if(charFirst > charNext){
                                  String temp  = (String)cmb.getItemAt(start);
                                  String temp2 = (String)cmb.getItemAt(x+1);
                                  cmb.removeItemAt(start);
                                  cmb.insertItemAt(temp2,start);
                                  cmb.removeItemAt(x+1);
                                  cmb.insertItemAt(temp,x+1);
         public static void main(String[] args){
              new SortCombo();
    }p.s.(I removed the "this" references from your constructor when I rewrote it because they are implied anyway)
    [email protected]

  • What is wrong with this!! please help

    Hello friends,
    I'm a learner and I have done lot of JDBC connectivity with Acess database, and now I want to connect java program with oracle database, but the problem is I have downloaded the oracle driver, set the classpath, and I have created the DataSource Name with MS-ODBC, I could able to compile but I'm getting run time exception, please help me with this. regards, shabeer.
    the program is
    import java.sql.*;
    public class ShabeerJdbc {
    public static void main(String args[]) {
    // String url = "jdbc:oracle:thin:@imran:3339:shabeerjdbc";
    Connection con;
    String createString;
    createString = "create table COFFEES " +
    "(COF_NAME VARCHAR(32), " +
    "SUP_ID INTEGER, " +
    "PRICE FLOAT, " +
    "SALES INTEGER, " +
    "TOTAL INTEGER)";
    Statement stmt;
    try {
    System.out.println("shabeer1");
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    System.out.println("shabeer2");
    } catch(java.lang.Exception e) {
    System.out.println("shabeer3");
    System.err.print("ClassNotFoundException: ");
    System.out.println("shabeer4");
    System.err.println(e.getMessage());
    try {
    System.out.println("shabeer55");
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:shabeerjdbc", "system", "mehar");
    System.out.println("shabeer6");
    stmt = con.createStatement();
    System.out.println("shabeer7");
    stmt.executeUpdate(createString);
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    the run time error is ......
    C:\JavaPractice>java ShabeerJdbc
    shabeer1
    shabeer2
    shabeer55
    Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/Savepoint
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at ShabeerJdbc.main(ShabeerJdbc.java:38)
    ****************************************

    HI Deriderj, thanks for your response, well I have changed the Datasourse name to SID which is "Imran" and still it is not working....do I need to download anymore driver or whether they be bundled with the ojdbc.jar, please advice me. What if I want to use another driver as you mentioned...not to use thin: what other drivers will be available for the Oracle9.2.0.1.0 please advice me, thanks a lot
    My SID name is "Imran"
    listening port is is 1521
    odbc datasource name is "shabeerjdbc"
    I'm a very biginner and I'm facing too much problem, please help me. Well I have got Oracle9.2.0.1.0 loaded as the database and soon after I intstalled it I have copied ojdbc14.jar into my java classpath and I'm trying to connect to this data base. I dont know what driver I should use, neither I downloaded any. I'm just mentioning thin: in my URL. But It is giving error, can u please tell me what driver should I mention in the URL, and why I'm getting this error, Here is the code that is compiling without errors.
    import java.sql.*;
    public class ShabeerJdbc {
    public static void main(String args[]) {
    Connection con;
    String createString;
    createString = "create table COFFEES " +
    "(COF_NAME VARCHAR(32), " +
    "SUP_ID INTEGER, " +
    "PRICE FLOAT, " +
    "SALES INTEGER, " +
    "TOTAL INTEGER)";
    Statement stmt;
    try {
         System.out.println("shabeer1");
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
         System.out.println("shabeer2");
    } catch(java.lang.Exception e) {
         System.out.println("shabeer3");
    System.err.print("ClassNotFoundException: ");
         System.out.println("shabeer4");
    System.err.println(e.getMessage());
    try {
         System.out.println("shabeer55");
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:Imran", "system", "mehar");
         System.out.println("shabeer6");
         stmt = con.createStatement();
         System.out.println("shabeer7");
         stmt.executeUpdate(createString);
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("Sql Exception" + ex.getMessage());
    ************The runtime Error it is giving is *********************
    C:\JavaPractice>java ShabeerJdbc
    shabeer1
    shabeer2
    shabeer55
    Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/Savepoint
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at ShabeerJdbc.main(ShabeerJdbc.java:38)
    ***************************** please help me....

  • Can anyone tell me what's wrong with my queue or producer consumer loop?

    A Labview engineer helped me with the overall structure of my program, necessitated by the fast data sample rate and post processing requirements. He recommended the producer/consumer loop and using one of the example files (Cont Acq graph voltage - int clk) to do the actual data acquistion. So I put together the loop and go my two channels of data acq going in the producer loop. However, nothing's getting picked up in the consumer loop and none of my data gets displayed over there.
    Anyone care to take a look at it and let me know what I'm doing wrong?
    Solved!
    Go to Solution.
    Attachments:
    P-C Yanmar Program.vi ‏296 KB

    Your Enque Element should be inside the while loop where you aquire the data.  As it is now, the data has to stop being aquired before you send the last set of aquired data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Could someone tell me what is wrong with AS 3.0

    I'm moving a movie clip that is off the stage and acts as a
    popup window to the visible area. then i'm animating it to cover
    the entire stage size. then moving a box in.
    This thing is very very buggy. It works about 70% of the time
    correct. I have the variables of the size traced and they are
    ALWAYS correct. However the animation doesn't reflect this.
    Sometime the box won't animate the width, sometimes the height, and
    sometimes it doesn't show up at all. What is going on?
    Thanks!

    your code is correct (with the assumptions given above). you
    can test it outside your current project and verify that it works.
    i just finished a project where i ported an as2 application
    to as3. that application used many tweens and i kept them in the
    as3 version. i did run into some problems with the tweens that i
    solved by giving the tweens different names.
    for example, if you call layersWindowIn() twice, with the
    second call occurring before the first has completed, you'll
    probably run into problems. is that when the problems occur?

Maybe you are looking for

  • Is "export frame" the highest quality?

    Hi.  Sometimes I want to have a video clip freeze.  That is to say, the final product will have two or more frames that are identical, taken from a single frame of a movie clip. The way I've been doing this is using the Source or Program monitor to f

  • Can't get Dualview on FX5700TD128

    I have a FX5700 TD128 w/ DVI and SVideo Out. I connect my TV to the card, it gets detected but I can use only single display - my monitor or my tv at one time. If I choose TV, I get picture on my TV, but the monitor goes to stand by. WindowsXP also s

  • Dreamweaver Template Problem

    I am using Adobe Dreamweaver CS5.5 and my employer is using Dreamweaver version 9.  We have created templates, but when she tries to update the template the changes are not showing up on the attached pages.  Could someone help us find what we are doi

  • Problem with XML import MDM 7.1  SP2 u2013 XSD.exe Issue

    We are upgrading MDM from 5.5 SP6 to 7.1 and currently we are in SP2 but will be upgrading to SP4 soon. After upgrading to MDM 7.1 SP2, when we use the import Manager and try to import the XML file we got the following error message Can't open C:/Pro

  • Changing hyperlinks in iweb

    when i attempted to reformat the hyperlinks in iweb, it wouldn't allow me to change anything on the site. i disabled the links, went to formatting and won't allow anything. any ideas?