Hibernate Vs JPA for Java Database connecity selection for ORM ?

There is a spring annotation based web application,that needs to load/store/update data to Oracle 10g XE Database. I have two options i.e either Hibernate or OpenJPA. So which one should i choose for this and why ?

Are you talking about this, <provider>org.hibernate.ejb.HibernatePersistence</provider>? Is this the correct provider name for JPA with HIbernate 3?
or
You are talking about other configuration in the persistence.xml.
I appreciate you helps, but can you point out what exact is wrong in my configuration or provide examples? I have not found the correct name for Hibernate provider.

Similar Messages

  • Hibernate/IBatis/JPA for batch applications

    We are planning on developing a batch application. Performace is a very critical part in this. Wanted to get some feed back upon which is the best framework for batch applications.
    This application would not have too many inserts/updates. It will have selects mainly.
    Can somebody suggest which framework is good Hibernate/Ibatis/JPA ?
    Thanks in advance
    Gautam

    Uppalapati wrote:
    duffymo wrote:
    "batch" usually means "transactional" to me. Why would a batch be mainly SELECTs? Makes no sense.
    Most people wouldn't use Java/JDBC for batch. Better to use the tools that are optimized for your relational database in most cases.
    sorry by stating that a little unclear. It is basically a stand-alone application. It reads messages as they comeby and process the messages. The processing of the messages require a lot of validations to be done (which are dependent upon a lot of parameters in the database and these would require selects). and finally based upon a few criteria's we write the data to the database. Are the validations static, read-only reference data? If so, you can read it once and cache it. Unless the SELECTs are truly dynamic and need to be made every time, perhaps you can save yourself some network traffic that way.
    Caching with Hibernate might make a difference, depending on how dynamic the validations are.
    and my reason for stating that it would have lots of selects is for the validation purpose and some inserts for updating the status.
    duffymo wrote:
    JPA and Hibernate will both require that you have an object model to map to your schema. Do you have that? If not, don't use either of those.
    I have an object model to map with and which is the reason why we are considering Hibernate/Jpa.OK, that's better.
    Either one will do, then. The advantage of JPA is that you don't have to commit to Hibernate, since TopLink and JDO will do as well. You can also use Glassfish or any other Java EE app server that supports EJB3 as well.
    How well do you know Hibernate and/or JPA? The other consideration is your level of skill. Choose the one you know best. Assess the risk if you're just learning and this is a critical project.
    Do you know that JDBC itself can't do the job?
    What other reasons do you have for going this way?
    %

  • 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);
    }%

  • When we use jsf can we also use hibernate or ejb for database visting.

    when we use jsf can we also use hibernate or ejb for database visting.

    http://blog.exadel.com/?p=8
    http://java.sys-con.com/read/46977.htm
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html
    http://www.jroller.com/page/ksevindik/?anchor=lookup_tables_with_hibernate_and
    Sergey : http://jsfTutorials.net

  • 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.
    %

  • 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

  • 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.

  • 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

  • Logical Database (PNPCE) , selection screen hide.

    Hi Gurus,
             i have couple of questions related to logical database pnpce.
    1.Since i know logical database has there own selection screen , my requirement is i want to add my custom fields to the selection screen other than what is provided is it possible or not.
    2. i want to hide the selection screen of the logical database, but i do want to create my own in which i will be declaring some select options of the standard logical database screen has, like pernr, organisation unit, etc, how do i communicate the entered data with the logical database if i dont use the logical database standard selection screen, hope i could able to explain my problem, please see into my problem and let me know thanks in advance,
    hussaini

    Hussain,
    LDB have standard selection screens, if at all you want to customize those standard selection screen you would have to define a report category for your program. You`ll have to configure in the spro settings for your corresponding report category.
    If you would like to declare your own selection criteria, you can very well do it and these criteria are visible below the standard selection criteria. You can process these elements in your program and not in the LDB standard program. Use the normal selection screen events in your program for processing your selection criteria.
    Hope this info is helpful, reward points if convinced.
    Regards

  • Using java function in select statement

    Hi,
    I am trying to use java function in select statement.
    public class ClassA{
         private static String MyConst = "foo";
         public static String functionA(){
              return MyConst;
    in my query I have:
    select
         ClassA.functionA() AS id,
         groupId AS newID,
    from
         myChannel[now]
    ClassA is part of the application (no need to import).
    I get and error of Invalid Expression on ClassA.functionA().
    I also tried to declare the function in the processor element:
    <wlevs:processor id="proc">
         <wlevs:function function-name="A" exec-methode="functionA">
              <bean class="mtPackage.ClassA"/>
         </wlevs:function>
    <wlevs:processor>
    but then I get a different error in the processor XML file:  "An InvocationTargetException was encoutered while attemting to register the user defind function A. The message was null"
    What am I missing here?

    Hi,
    From the above description, you have tried two manners to call method functionA() in the user defined  class ClassA. One uses java cartridge manner directly and the other try to use user defined function manner.
    For the java cartridge manner, the following CQL query should work if the ClassA is really included in the OEP app. I have done similar test before, it works.
    select
         ClassA.functionA() AS id,
         groupId AS newID,
    from
         myChannel[now]
    For user defined function manner, I think two things you need to change:
    1. Need to declare the function in the EPN assembly file(under META-INF/spring/), not component configuration file(under META-INF/wlevs/). The following is an example:
    <wlevs:processor id="proc">
         <wlevs:function function-name="A" exec-methode="functionA">
              <bean class="mtPackage.ClassA"/>
         </wlevs:function>
    </wlevs:processor>
    2. Call the user defined function in the CQL query in the component configuration file under processor. For example:
    select A() from myChannel
    Regards,
    XiYing

  • 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).

  • FBL5N - Logical databases - Dyanamic selection screen fields

    I am trying to insert "Profit center" from BSEG table of Logical database DDF into the dynamic selection screen of FBL5N.
    Procedure I followed:
    Program -> Attributes -> Logical database -> Extras -> Selection views.
    Interestingly when I add "Profit center" from BSID table instead of BSEG, it appears on dynamic selection screen. But this is not working for BSEG. I have no clue why this is so? If someone can help me in this regard, that would be great.
    P.S: I can not insert Profit center from BSID table as BSEG contains profit center values and BSID is not storing the same info.

    Rob,
    Below is the BSEG contents:
    Company code Document Number Customer     Profit Center
    1000         1800001111      0000100006
    1000         1800001111                   0000000401
    BSID contents:
    Company code Customer     Document Number Profit Center
    1000         0000100006   1800001111                  
    As BSID stores customer info, I believe only line item that has customer info is stored here.
    I guess, that is the reason.
    I will try the option told by prev post. Will keep you guys posted.
    Thanks,
    Phani

  • 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.

  • 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

  • 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

Maybe you are looking for