Java DataBase in NetBeans!!

Hi there,
can you help guy,
I have the NetBeans IDE 4.1,
Oracle 9,
j2sdk1.4.0,
and win xp (on standalone machine)
I remember the old version of NetBeans, you can use Mounting FileSystem for jdbc\oracle\driver
to use the OracleDriver
but I get message error at compiler says that package jdbc.oracle.driver does not exist
please I need help in who to do Mounting FileSystem or other way
here is my code of java
// Database application using Oracle and Java programming Language
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import jdbc.sql.*
import java.awt.*;
public class OracleJavaCustomerWindow extends JFrame
private JLabel labelCId,labelCName,labelCCity,labelCPhone;
private JTextField textCId,textCName,textCCity,textCPhone;
private JPanel labelPanel,buttonPanel,textAreaPanel,labelTextAreaPanel;
private JTextArea outputArea;
private JScrollPane scrollPane;
private JButton buttonDisplay,buttonAdd,buttonModifyRecord,buttonUpdate,buttonDelete;
private JButton buttonClear;
private JTextField field1,field2,field3,field4;
private JLabel label1,label2,label3,label4;
private JPanel mixedPanel,mixedPanel2,fieldPanel1,fieldPanel2,fieldPanel3,fieldPanel4;
static Connection sqlconn = null;
// set up GUI with constrictor(IT IS A METHOD. EACHO CLASS AT LEST HAVE ONE)
public OracleJavaCustomerWindow ()
super("Display Oracle Data for Customers");
try{
          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
          sqlconn= DriverManager.getConnection ("jdbc:oracle:oci:@Kawasaki", "scott", "tiger");
catch(SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");     
// add GUI components to container
Container container = getContentPane();
container.setLayout(new FlowLayout(FlowLayout.CENTER));
// Build labelPanel
labelCId = new JLabel(" Customer ID");
labelCName = new JLabel("Customer Name");
     labelCCity = new JLabel("Customer City");
labelCPhone = new JLabel("Customer Phone");
labelPanel = new JPanel();
labelPanel.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
     labelPanel.add(labelCId);
labelPanel.add(labelCName);
labelPanel.add(labelCCity);
labelPanel.add(labelCPhone);
// Build textAreaPanel
outputArea = new JTextArea(10,30);
outputArea.setEditable(false);
scrollPane = new JScrollPane(outputArea);
textAreaPanel = new JPanel();
textAreaPanel.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
textAreaPanel.add(scrollPane);
// Build labelTextAreaPanel which contains labelPanel and textAreaPanel
// to be ready for adding to container
labelTextAreaPanel= new JPanel();
labelTextAreaPanel.setLayout(new BorderLayout());
labelTextAreaPanel.add(labelPanel,BorderLayout.NORTH);
labelTextAreaPanel.add(textAreaPanel,BorderLayout.SOUTH);
// Buld buttonPanel
buttonDisplay = new JButton ("Display Table");
buttonClear = new JButton ("Clear");
buttonAdd = new JButton("Add New Record");
buttonUpdate= new JButton("Display Record");
buttonModifyRecord = new JButton("Modify Record");
buttonDelete = new JButton("Delete Record");
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(6,1,10,5));
buttonPanel.add(buttonAdd);
buttonPanel.add(buttonUpdate);
buttonPanel.add(buttonModifyRecord);
buttonPanel.add(buttonDisplay);
buttonPanel.add(buttonDelete);
buttonPanel.add(buttonClear);
// build fieldPanel1
label1 = new JLabel("Customer Number");
field1 = new JTextField(10);
fieldPanel1 = new JPanel();
fieldPanel1.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel1.add(label1);
fieldPanel1.add(field1);
// build fieldPanel2
fieldPanel2 = new JPanel();
label2 = new JLabel("Customer Name");
field2 = new JTextField(10);
fieldPanel2.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel2.add(label2);
fieldPanel2.add(field2);
// build fieldPanel3
fieldPanel3 = new JPanel();
label3 = new JLabel("Customer City");
field3 = new JTextField(10);
fieldPanel3.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel3.add(label3);
fieldPanel3.add(field3);
     // build fieldPanel4
fieldPanel4 = new JPanel();
label4 = new JLabel("Customer Phone");
field4 = new JTextField(10);
fieldPanel4.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel4.add(label4);
fieldPanel4.add(field4);
// Build mixedPanel which contains fieldPanel1, fieldPanel2,fieldPanel3
// to be ready for adding to container
mixedPanel = new JPanel();
mixedPanel.setLayout(new BorderLayout());
     mixedPanel.add(fieldPanel1,BorderLayout.NORTH);
mixedPanel.add(fieldPanel2,BorderLayout.CENTER);
mixedPanel.add(fieldPanel3,BorderLayout.SOUTH);
mixedPanel2 = new JPanel();
mixedPanel2.add(fieldPanel4,BorderLayout.SOUTH);
// add all panels to the container
container.add(mixedPanel);
container.add(mixedPanel2);
container.setBackground(Color.DARK_GRAY);
container.add(labelTextAreaPanel);
     container.add(buttonPanel);
//--------- Messages to communicate with different objects
//----------- method to clear the outputarea
buttonClear.addActionListener(
          // anonymous inner class
new ActionListener()
public void actionPerformed(ActionEvent event)
                    outputArea.setText("");
}// actionPerformed
}// anonymous inner class
//--------- method to use button event--------------------
buttonDisplay.addActionListener(
//anonymous class
new ActionListener()
               public void actionPerformed(ActionEvent event)
                    //Connection sqlca = null;
               Statement sqlStatement = null;
               ResultSet rset = null;
               try{
                         //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                         //sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
                         sqlStatement = sqlconn.createStatement ();
                         rset = sqlStatement.executeQuery ("select * from customers");
                         while (rset.next ()){
                              String CUSTOMERID=rset.getObject(1).toString();
                              String CUSTOMERNAME =rset.getObject(2).toString();
                              String CUSTOMERCITY =rset.getObject(3).toString();
String CUSTOMERPHONE =rset.getObject(4).toString();
                              //String map=rset.getObject(4).toString();
                              //String region=rset.getObject(5).toString();
                              //System.out.println (id + "\t" + name + "\t" + loc );
               outputArea.append(CUSTOMERID + "\t" + CUSTOMERNAME + "\t" + CUSTOMERCITY + "\t" + CUSTOMERPHONE + "\n" );
                         } // end while
                    }// end try
                    catch (SQLException ex)
                         System.out.println("SQLException:" + ex.getMessage() + "<BR>");
                    }// catch
}// action performed
} // anonymous inner class
);// end addActionListener
// ------ method to add Customers to the database
     buttonAdd.addActionListener(
     // anonymous inner class
new ActionListener()
public void actionPerformed(ActionEvent event)
try{
               Statement sqlStatement = null;
ResultSet rtbookset = null;
// create statement
sqlStatement = sqlconn.createStatement();
int CUSTOMERID = Integer.parseInt(field1.getText());
String CUSTOMERNAME = field2.getText();
               String CUSTOMERCITY = field3.getText();
int CUSTOMERPHONE = Integer.parseInt(field4.getText());
          // create query
               String insertquery = "INSERT INTO CUSTOMERS VALUES("
     + CUSTOMERID + "," + "'" + CUSTOMERNAME + "'," + "'" + CUSTOMERCITY + "'," + CUSTOMERPHONE + ")";
          // execute the query
                         sqlStatement.executeQuery(insertquery);
                         // clear the textfields
                         field1.setText("");
                         field2.setText("");
                         field3.setText("");
field4.setText("");
          JOptionPane.showMessageDialog(null,"Record added");                     
}// try
catch(SQLException ex)
                    System.out.println("Record exists :" + ex.getMessage() + "<BR>");
               }// catch
}// actionPerformed
}// anonymous inner class
//--------- method to use buttonUpdate event--------------------
buttonUpdate.addActionListener(
//anonymous class
new ActionListener()
               public void actionPerformed(ActionEvent event)
                    //Connection sqlconn = null;
               Statement sqlStatement = null;
               ResultSet rset = null;
int CUSTOMER_ID = Integer.parseInt(field1.getText());
               try{
                         //int CUSTOMER_ID = Integer.parseInt(field1.getText());
          //String d_name = field2.getText();
                         //String d_loc = field3.getText();
                         //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                         //sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
                         sqlStatement = sqlconn.createStatement ();
                         rset = sqlStatement.executeQuery ("select * from CUSTOMERS where CUSTOMER_ID =" + CUSTOMER_ID);
                         rset.next ();
                         //int id=rset.getInt("DEPTNO");
                         String CUSTOMERID = rset.getObject(1).toString();          
                         String CUSTOMERNAME=rset.getString("CUSTOMER_NAME");
                         String CUSTOMERCITY=rset.getString("CUSTOMER_CITY");
String CUSTOMERPHONE=rset.getString("CUSTOMER_PHONE");
field1.setText(CUSTOMERID);
                         field2.setText(CUSTOMERNAME);
                         field3.setText(CUSTOMERCITY);
field4.setText(CUSTOMERPHONE);
//buttonUpdate.setEnabled(false);
//buttonModifyRecord.setEnabled(true);
//rset.close();
                    }// end try
                    catch (SQLException ex)
                         JOptionPane.showMessageDialog(null,"No Record found with CUSTOMER ID :" + CUSTOMER_ID );
                         //System.out.println("SQLException:No record found" + ex.getMessage() + "<BR>");
                    }// catch
}// action performed
} // anonymous inner class
);// end addActionListener
//---------Method to modify record------------------------------------
buttonModifyRecord.addActionListener(
//anonymous class
new ActionListener()
               public void actionPerformed(ActionEvent event)
                    //Connection sqlconn = null;
               Statement sqlStatement = null;
               ResultSet rset = null;
               try{
                         //int dept_no = Integer.parseInt(field1.getText());
          //String d_name = field2.getText();
                         //String d_loc = field3.getText();
                         //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                         //sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
                         sqlStatement = sqlconn.createStatement ();
int CUSTOMERID = Integer.parseInt(field1.getText());
          String CUSTOMERNAME = field2.getText();
                         String CUSTOMERCITY = field3.getText();
int CUSTOMERPHONE = Integer.parseInt(field4.getText());
                         String updatequery = "UPDATE CUSTOMERS SET CUSTOMER_NAME = " + "'" + CUSTOMERNAME + "',"
+ " CUSTOMER_CITY = " + "'" + CUSTOMERCITY + "'," + " CUSTOMER_PHONE = " + CUSTOMERPHONE
+ " Where CUSTOMER_ID = " + CUSTOMERID;
          // execute the query
                         sqlStatement.executeQuery(updatequery);
                         // clear the textfields
                         field1.setText("");
                         field2.setText("");
                         field3.setText("");
field4.setText("");
          JOptionPane.showMessageDialog(null,"Record modified");
//buttonUpdate.setEnabled(true);
//buttonModifyRecord.setEnabled(false);
                    }// end try
                    catch (SQLException ex)
                         System.out.println("SQLException:" + ex.getMessage() + "<BR>");
                    }// catch
}// action performed
} // anonymous inner class
);// end addActionListener
//---------Method to modify record------------------------------------
buttonDelete.addActionListener(
//anonymous class
new ActionListener()
               public void actionPerformed(ActionEvent event)
                    //Connection sqlca = null;
               Statement sqlStatement = null;
               ResultSet rset = null;
               try{
                         //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                         //sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
                         sqlStatement = sqlconn.createStatement ();
int CUSTOMERID = Integer.parseInt(field1.getText());
          //String d_name = field2.getText();
                         //String d_loc = field3.getText();
                         String deletequery = "DELETE from CUSTOMERS "
+ " Where CUSTOMER_ID = " + CUSTOMERID;
          // execute the query
                         sqlStatement.executeQuery(deletequery);
                         // clear the textfields
                         field1.setText("");
                         field2.setText("");
                         field3.setText("");
field4.setText("");
          JOptionPane.showMessageDialog(null,"Record Deleted");
//buttonUpdate.setEnabled(true);
//buttonModifyRecord.setEnabled(false);
                    }// end try
                    catch (SQLException ex)
                         System.out.println("SQLException:" + ex.getMessage() + "<BR>");
                    }// catch
}// action performed
} // anonymous inner class
);// end addActionListener
// specify the size of the window
setSize(800,500);
show();
}// constructor
public static void main(String args[]) throws IOException{
OracleJavaCustomerWindow application = new OracleJavaCustomerWindow();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}// main
} // class OracleJavaWindow
// exceptions classes
// inserFailedException is a general exception for
// SQL insert problems
/*class insertFailedException extends SQLException
public insertFailedException(String reason)
     super(reason);
public insertFailedException(String reason)
     super();
}*/

Sorry guys here is the correction of details i have provided
the Error message tells me that
package oracle.jdbc.driver does not exist
and the folder I used to do Mounting SystemFile for was
C:\Oracle\jdbc\lib\classes12

Similar Messages

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • Creating a Java Database(derby) using DBFactory

    Hi
    I want to create a Java Database (derby) when running Main. My main program is parsing driver, url, user id and user password to the DBFactory class. I am using netbeans 5.5 with the Sun Java System Application Server and the Java DB server is up and running.
    When I run the main program I get no output and no errors. If you will take a look at the main class below and check for novice errors it would much appreciated.
    public class Main {
    private String driver = "org.apache.derby.jdbc.ClientDriver";
    private String url = "jdbc:derby://localhost:1527/";
    private String uid = "user";
    private String pwd = "user";
    private Connection con;
    public Main() {
    try {
    DBFactory db = new DBFactory(driver, url + "JavaDBTest", uid, pwd);
    con = db.getConnection();
    HashMap metaData = getMetaData();
    Iterator meta = metaData.entrySet().iterator();
    while (meta.hasNext()) {
    Map.Entry entry = (Map.Entry) meta.next();
    System.out.println(
    (String)entry.getKey() + ": " + (String)entry.getValue());
    db.createDB("JavaDBTest");
    Statement st = con.createStatement();
    ResultSet res = st.executeQuery("show tables");
    while (res.next()) {
    System.out.println(res.getString(1));
    st.executeUpdate("insert into JavaDBTest(name,phone) " +
    "values('donald duck', '12345678')");
    st.executeUpdate("insert into JavaDBTest(name,phone) " +
    "values('mickey mouse', '87654321')");
    res = st.executeQuery("select * from JavaDBTest");
    while (res.next()) {
    System.out.println(
    res.getString("name") + " " + res.getString("phone"));
    int i = st.executeUpdate("delete from JavaDBTest");
    System.out.println("Rows deleted: " + i);
    db.dropDB("JavaDBTest");
    catch (ClassNotFoundException cnfe) {
    System.err.println(cnfe.getMessage());
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    }

    add the main entry method to your progam :
    public class Main {
    private String driver = "org.apache.derby.jdbc.ClientDriver";
    private String url = "jdbc:derby://localhost:1527/";
    private String uid = "user";
    private String pwd = "user";
    private Connection con;
    public Main() {
    try {
    DBFactory db = new DBFactory(driver, url + "JavaDBTest", uid, pwd);
    con = db.getConnection();
    HashMap metaData = getMetaData();
    Iterator meta = metaData.entrySet().iterator();
    while (meta.hasNext()) {
    Map.Entry entry = (Map.Entry) meta.next();
    System.out.println(
    (String)entry.getKey() + ": " + (String)entry.getValue());
    db.createDB("JavaDBTest");
    Statement st = con.createStatement();
    ResultSet res = st.executeQuery("show tables");
    while (res.next()) {
    System.out.println(res.getString(1));
    st.executeUpdate("insert into JavaDBTest(name,phone) " +
    "values('donald duck', '12345678')");
    st.executeUpdate("insert into JavaDBTest(name,phone) " +
    "values('mickey mouse', '87654321')");
    res = st.executeQuery("select * from JavaDBTest");
    while (res.next()) {
    System.out.println(
    res.getString("name") + " " + res.getString("phone"));
    int i = st.executeUpdate("delete from JavaDBTest");
    System.out.println("Rows deleted: " + i);
    db.dropDB("JavaDBTest");
    catch (ClassNotFoundException cnfe) {
    System.err.println(cnfe.getMessage());
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    public static void main(String[] args) {
       new Main();
    }then run your program again and post the errors message.
    hth

  • Connecting to Pointbase database in netbeans

    hello all,
    has anyone used Pointbase database in Netbean? I am having connecting to Pointbase due to incorrect password. any idea how i can change password?
    thanks.

    Use the default admin login and modify the password directly in the systables.

  • What   the   Enviroment  required  for java databases programs?

    Hi guys
    What the enviroment required for java databases programs?
    If I have oracle of version 9i and java 1.4.1 platform
    do I need Jdeveloper platform ?

    What the enviroment required for java databases programs?What do you mean by "environment"?
    f I have oracle of version 9i and java 1.4.1 platformYou just need to download Oracle's 9i JDBC driver (ojdbc14.jar) and put that in your CLASSPATH. Then write JDBC code to connect to Oracle and issue SQL commands.
    do I need Jdeveloper platform ?No, JDeveloper is an IDE. Not required.
    Why Java 1.4.1? We're up to Java 6 now. You're two major versions of the JDK behind.
    %

  • Re: Java Database

    Hello,
    I'll like some advice on the topic mentioned above. I'm a beginner of java programming and have elementry knowledge about java. I'll like to know how is it possible to input the list of data in Excel format into Java Database Connectivity and how am I able to extract out the info. that I'll need. Like say the columns/field on designation and name. How am I able to extract the data and change it like to delete or edit the info.??
    Pls. explain it step-by-step your patience is really appreciated. Thanks and God Bless.

    You should search Javaworld for "Excel" - they've had a few articles about using JDBC to access Excel. As far as I recall, though, you can't alter data in Excel through JDBC, only read it.
    http://www.javaworld.com
    There are other ways of getting at Excel data through Java but they're not very good either (unless you want to use a Java-COM bridge).

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE

    A very simple example for FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE.
    http://vijaaay.limewebs.com/forum/viewthread.php?tid=26&extra=page%3D1
    or
    visit  www . flexindia . tk >> Flex Examples
    The attachment zip contains the source  files[ FLEX and JAVA ] and Readme.txt which helps you to setup this  example.
    Regards,
    Vijay

    Yeah i registered, but i couldn't find zip file. Could you please tell me where is that example
    Thanks,
    ApacheFlex.

  • Java Export hangs at 'Export Java Database Content' phase

    Hi All -
    As part of system refresh activities,we are doing Java Export from our Production system(PE1) & we will use that export to import it in our Qulaity system(QE1).So while doing Java Export,the export gets stucks/hangs at 'Export Java Database Content" phase which is the last phase in Java Export steps.We have been doing this task since many years  & we did not encounter this kind of issue ever.There are no errors or at least warnings in the logs like sapinst_dev.log,jload.log,jload.java.log,sapinst.log etc.Our environment details are as below
    EP -6.0
    OS - AIX 5.3,64 BIT
    DB - DB2 UDB
    SAPINST version - 642
    Java version is below
    pe1adm> java -fullversion
    java full version "J2RE 1.4.2 IBM AIX 5L for PowerPC (64 bit JVM) build caix64142ifx-20100918 (SR13 FP6)"
    Please note with the SAPINST we are using currently, the exports of remaining systems in EP & other solutions like ECC,CR,SRM,XI,BI are successfull.We are having this issue only in PE1.Looks like some bug in code.So request the experts in this forum to please take a look at it & provide me with solution if any of you have faced the similar situation.
    Thanks & regards,
    Nagendra.

    Thank you for your reply Subhash.The below is the last entry in jload.log.It is at EP_ATTR_HEADERS.While doing the Java export,we asked our DBA to monitor to find out any errors at DB side.He monitored and said that no deadlocks or no infinite loops are found.Also he said that he cannot create index for that too because it is trying to do select *.In our first 2 or 3 attempts it used to hang at CA_PRODUCTS meta data exported,CA_PROPERTY meta data exported.Now here.Our DBA said that EP_ATTR_HEADERS has 1.4M rows.We tried to bounce the entire system also,but no luck.We have the same issue.Peculiar thing is we dont see any errors or warnings in the logs.
    23.06.11 09:54:21 com.sap.inst.jload.Jload dbExport
    INFO: EP_ATTR_DEFS exported (6 rows)
    23.06.11 09:54:21 com.sap.inst.jload.Jload dbExport
    INFO: EP_ATTR_HEADERS meta data exported
    Please let me know if you need any further info in resolving this issue.
    Thanks & regards,
    Nagendra.

  • Free Java Database?

    I'm looking for a free Java database. A few recommended MySQL, but after going to their site, it looks they charge and aren't free.
    The database would be used in my own commercial product that would be sold to stores. Perhaps MySQL is just free for development? Anyone know?
    If anyone knows of other free Java databases that would be appreciated too.
    Thanks,

    You can always check out Postgres. And I'm not sure if they bundle it anymore, but there used to be a pure-Java database called Cloudscape (I think).
    - saish
    "My karma ran over your dogma." - Anon

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • Installation hangs at step 18-Load Java Database Content

    Hi,
    I am trying to install NW04s WAS. No matter, how many times I uninstall & reinstall(after properly clearing registry entries by running supplied cleaner.exe,stop the Xserver services if running), the installation just doesn't progress at step 18- 'Load Java Database Content'.
    Here is what I did:
    I read other threads and checked from the SAP Management Console if the DB is online. It is online and the DB is not full.But the log and Data states are shown as 0%.
    Next, according to some threads I  removed the JDK 1.4.2_15 and installed 1.4.2_12 version.No use.
    I couldn't find any other threads with suggestions which could be of help to my issue.
    I am using windows vista home premium.I get some errors during installation but not during step 18. so I am not sure whether to consider those errors for this issue.
    <u>Following is the phase information:</u>
    PHASE 2007-09-22 15:40:18
    Prepare the installation program.
    WARNING[E] 2007-09-22 15:43:05
    Error converting from service name=sapmsJ2E/protocol=tcp to port number. SAPRETURN=12
    WARNING[E] 2007-09-22 15:44:47
    Error converting from service name=sapmsJ2E/protocol=tcp to port number. SAPRETURN=12
    WARNING[E] 2007-09-22 15:45:50
    Error converting from service name=sapmsJ2E/protocol=tcp to port number. SAPRETURN=12
    ERROR 2007-09-22 15:50:42
    FSL-06002  Error 1060 (The specified service does not exist as an installed service.
    ) in execution of a 'OpenService' function, line (255), with parameter (SAPOsCol).
    ERROR 2007-09-22 15:51:12
    FSL-06002  Error 1060 (The specified service does not exist as an installed service.
    ) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_01).
    ERROR 2007-09-22 15:51:12
    FSL-06002  Error 1060 (The specified service does not exist as an installed service.
    ) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_01).
    ERROR 2007-09-22 15:51:12
    FSL-06002  Error 1060 (The specified service does not exist as an installed service.
    ) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_00).
    ERROR 2007-09-22 15:51:12
    FSL-06002  Error 1060 (The specified service does not exist as an installed service.
    ) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_00).
    WARNING 2007-09-22 15:52:11
    While copying files to 'C:\usr\sap\J2E\SCS01\exe': source file 'C:\usr\sap\J2E\SYS\exe\run/icudt26.dll' not found.
    WARNING 2007-09-22 15:52:12
    While copying files to 'C:\usr\sap\J2E\JC00\exe': source file 'C:\usr\sap\J2E\SYS\exe\run/icudt26.dll' not found.
    ERROR 2007-09-22 15:52:31
    FSL-06002  Error 1060 (The specified service does not exist as an installed service.
    ) in execution of a 'OpenService' function, line (255), with parameter (SAPOsCol).
    WARNING 2007-09-22 15:54:12
    Execution of the command "C:\usr\sap/J2E/JC00/igs/bin/igswd.exe 'C:\usr\sap\J2E\JC00\igs' '-c' '-tracelevel=1' '-mux=Karthik-PC,40000' '-listenerhttp=40080' '-portwatcher=40001' '-portwatcher=40002'" finished with return code 1. Output:
    PHASE 2007-09-22 16:03:03
    Deploying SDAs (using SDM and SAP J2EE Engine).
    PHASE 2007-09-22 16:03:22
    Deploying SDAs (using SDM and SAP J2EE Engine).
    PHASE 2007-09-22 16:04:29
    Deploying SDAs (using SDM and SAP J2EE Engine).
    PHASE 2007-09-22 16:05:18
    Deploying SDAs (using SDM and SAP J2EE Engine).
    PHASE 2007-09-22 16:05:59
    SAP J2EE Engine
    PHASE 2007-09-22 16:06:09
    JLoad Run
    I have spent a lot of time to have this installed. Please somebody help.
    Thanks
    Karthik

    Hi Raja and Anatoliy Misyura  ,
    Thanks a lot for taking time to reply to my issue.
    1)I completely unistalled the previous version by running clearner.exe and stopping the services,removing sapdb folder etc.,
    2)Then I disabled my antivirus,firewall etc.,
    3)Installed jdk 1.4.2_11(after removed the previously tried version 1.4.2_12
    4)Ran the SAPInst installer
    But unfortunately still the installer stops at the same step!
    Don't know what's going wrong.....
    Raja- Can you tell me what is the windows OS version you have? Mine is home premium.
    Thanks
    Karthik
    Can you guys let me know if you have any other suggestions

  • JDBC is the Acronym of Java Database Connectivity - Yes / No?

    Hi,
    JDBC is the Acronym of Java Database Connectivity - Yes / No?
    I am little bit confused. I got this question in an Inteview.
    I support yes. But some of the compitiors say no.
    What will the real answer?

    Really? Even Sun contradicts themselves here:
    (2002) http://java.sun.com/javase/6/docs/technotes/guides/jdbc/
    and (more importantly) here:
    http://java.sun.com/docs/glossary.html#JDBC
    although here:
    (2001) http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/intro.html
    I think it is simply silly for the latter to state that "JDBC is the trademarked name and is not an acronym" -- Oh really? JDBC doesn't stand for anything? It is all caps just because it is a trademark then? hmmm.
    I'm certain the real answer of what it stands for may have been lost long ago. However, I doubt that the interviewer meant the question to be a trick and was looking for "Java DataBase Connectivity"
    For every instance that you find that it doesn't stand for anything, I can show you 2 instances (from Sun or an employee) where they use "Java Database Connectivity (JDBC)".
    P.S. Ryan Craig may be the final authority on this...

  • How we build Java Database Connectivity for Oracle 8i Database

    Can any one send me a sample code for Java Database Connectivity for Oracle 8i Database
    it will be a grat help
    Thanks & Regards
    Rasika

    You don't need a DSN if you use Oracle's JDBC driver.
    You didn't read ANY of the previous replies. What makes you think this one willk help? Or any instruction, for that matter?
    Sounds like you just want someone to give it to you. OK, I'll bite, but you have to figure out the rest:
    import java.sql.*;
    import java.util.*;
    * Command line app that allows a user to connect with a database and
    * execute any valid SQL against it
    public class DataConnection
        public static final String DEFAULT_DRIVER   = "sun.jdbc.odbc.JdbcOdbcDriver";
        public static final String DEFAULT_URL      = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
        public static final String DEFAULT_USERNAME = "admin";
        public static final String DEFAULT_PASSWORD = "";
        public static final String DEFAULT_DRIVER   = "com.mysql.jdbc.Driver";
        public static final String DEFAULT_URL      = "jdbc:mysql://localhost:3306/hibernate";
        public static final String DEFAULT_USERNAME = "admin";
        public static final String DEFAULT_PASSWORD = "";
        /** Database connection */
        private Connection connection;
         * Driver for the DataConnection
         * @param command line arguments
         * <ol start='0'>
         * <li>SQL query string</li>
         * <li>JDBC driver class</li>
         * <li>database URL</li>
         * <li>username</li>
         * <li>password</li>
         * </ol>
        public static void main(String [] args)
            DataConnection db = null;
            try
                if (args.length > 0)
                    String sql      = args[0];
                    String driver   = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
                    String url      = ((args.length > 2) ? args[2] : DEFAULT_URL);
                    String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
                    String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
                    System.out.println("sql     : " + sql);
                    System.out.println("driver  : " + driver);
                    System.out.println("url     : " + url);
                    System.out.println("username: " + username);
                    System.out.println("password: " + password);
                    db = new DataConnection(driver, url, username, password);
                    System.out.println("Connection established");
                    Object result = db.executeSQL(sql);
                    System.out.println(result);
                else
                    System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
            catch (SQLException e)
                System.err.println("SQL error: " + e.getErrorCode());
                System.err.println("SQL state: " + e.getSQLState());
                e.printStackTrace(System.err);
            catch (Exception e)
                e.printStackTrace(System.err);
            finally
                if (db != null)
                    db.close();
                db = null;
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection() throws SQLException,ClassNotFoundException
            this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection(final String driver,
                              final String url,
                              final String username,
                              final String password)
            throws SQLException,ClassNotFoundException
            Class.forName(driver);
            this.connection = DriverManager.getConnection(url, username, password);
         * Get Driver properties
         * @param database URL
         * @return list of driver properties
         * @throws SQLException if the query fails
        public List getDriverProperties(final String url)
            throws SQLException
            List driverProperties   = new ArrayList();
            Driver driver           = DriverManager.getDriver(url);
            if (driver != null)
                DriverPropertyInfo[] info = driver.getPropertyInfo(url, null);
                if (info != null)
                    driverProperties    = Arrays.asList(info);
            return driverProperties;
         * Clean up the connection
        public void close()
            close(this.connection);
         * Execute ANY SQL statement
         * @param SQL statement to execute
         * @returns list of row values if a ResultSet is returned,
         * OR an altered row count object if not
         * @throws SQLException if the query fails
        public Object executeSQL(final String sql) throws SQLException
            Object returnValue;
            Statement statement = null;
            ResultSet rs = null;
            try
                statement = this.connection.createStatement();
                boolean hasResultSet    = statement.execute(sql);
                if (hasResultSet)
                    rs                      = statement.getResultSet();
                    ResultSetMetaData meta  = rs.getMetaData();
                    int numColumns          = meta.getColumnCount();
                    List rows               = new ArrayList();
                    while (rs.next())
                        Map thisRow = new LinkedHashMap();
                        for (int i = 1; i <= numColumns; ++i)
                            String columnName   = meta.getColumnName(i);
                            Object value        = rs.getObject(columnName);
                            thisRow.put(columnName, value);
                        rows.add(thisRow);
                    returnValue = rows;
            else
                int updateCount = statement.getUpdateCount();
                returnValue     = new Integer(updateCount);
            finally
                close(rs);
                close(statement);
            return returnValue;
         * Close a database connection
         * @param connection to close
        public static final void close(Connection connection)
            try
                if (connection != null)
                    connection.close();
                    connection = null;
            catch (SQLException e)
                e.printStackTrace();
         * Close a statement
         * @param statement to close
        public static final void close(Statement statement)
            try
                if (statement != null)
                    statement.close();
                    statement = null;
            catch (SQLException e)
                e.printStackTrace();
         * Close a result set
         * @param rs to close
        public static final void close(ResultSet rs)
            try
                if (rs != null)
                    rs.close();
                    rs = null;
            catch (SQLException e)
                e.printStackTrace();
         * Close a database connection and statement
         * @param connection to close
         * @param statement to close
        public static final void close(Connection connection, Statement statement)
            close(statement);
            close(connection);
         * Close a database connection, statement, and result set
         * @param connection to close
         * @param statement to close
         * @param rs to close
        public static final void close(Connection connection,
                                       Statement statement,
                                       ResultSet rs)
            close(rs);
            close(statement);
            close(connection);
    }%

  • Login codes using java database (validates with Microsoft Access File)

    hi all pro-programmer, can you show me the code to login with the username and password using java database. When the user enters the username and password in the login page then it will go to the requested page. may i know how to do it?

    no one will give you complete code.
    i'll lay out the pieces for you, though:
    (1) start with a User object. give it username and password attributes.
    (2) write a UserDAO interface with CRUD operations for a User object.
    (3) write a UserDAOImpl for your Microsoft Access database
    (4) write an AuthenticationService interface
    (5) write an implementation of the AuthenicationService that works with the UserDAO to authorize a User.
    Use a servlet to accept request from your login page and pass it off to the service. Voila.
    PS - Here's skeleton to start with. UI, servlet, and controller are your responsibility:
    package model;
    public class User implements Serializable
        private String username;
        private String password;
        public User(String u, String p)
            this.username = u;
            this.password = p;
        public String getUsername() { return username; }
        public String getPassword() { return password; }
    public interface UserDAO
        public User findByUsername(String username);
        public void saveOrUpdate(User user);
        public void delete(User user);
    public class UserDAOImpl implements UserDAO
        private Connection connection;
        public UserDAOImpl(Connection connection)
            this.connection = connection;
        public User findByUsername(String username)
            String password = "";
            // logic for querying the database for a User
            return new User(username, password);
        public void saveOrUpdate(User user)
            // save or update a User
        public void delete(User user)
            // delete a User
    public interface AuthenticationService
        public boolean isAuthorized(String username);
    public class AuthenticationServiceImpl implements AuthenticationService
        private UserDAO userDAO;
        public AuthenticationServiceImpl()
            // Create a database connection here and the UserDAO, too.
        public boolean isAuthorized(String username)
            boolean isAuthorized = false;
            // Add logic to do the database query and decide if the username is authorized
            return isAuthorized;       
    }

Maybe you are looking for