JTable and ResultSet TableModel with big resultset

Hi, I have a question about JTable and a ResultSet TableModel.
I have to develop a swing JTable application that gets the data from a ResultSetTableModel where the user can update the jtable data.
The problem is the following:
the JTable have to contain the whole data of the source database table. Currently I have defined a
a TYPE_SCROLL_SENSITIVE & CONCUR_UPDATABLE statement.
The problem is that when I execute the query the whole ResultSet is "downloaded" on the client side application (my jtable) and I could receive (with big resultsets) an "out of memory error"...
I have investigate about the possibility of load (in the client side) only a small subset of the resultset but with no luck. In the maling lists I see that the only way to load the resultset incrementally is to define a forward only resultset with autocommit off, and using setFetchSize(...). But this solution doesn't solve my problem because if the user scrolls the entire table, the whole resultset will be downloaded...
In my opinion, there is only one solution:
- create a small JTable "cache structure" and update the structure with "remote calls" to the server ...
in other words I have to define on the server side a "servlet environment" that queries the database, creates the resultset and gives to the jtable only the data subsets that it needs... (alternatively I could define an RMI client/server distribuited applications...)
This is my solution, somebody can help me?
Are there others solutions for my problem?
Thanks in advance,
Stefano

The database table currently is about 80000 rows but the next year will be 200000 and so on ...
I know that excel has this limit but my JTable have to display more data than a simple excel work sheet.
I explain in more detail my solution:
whith a distribuited TableModel the whole tablemodel data are on the server side and not on the client (jtable).
The local JTable TableModel gets the values from a local (limited, 1000rows for example) structure, and when the user scroll up and down the jtable the TableModel updates this structure...
For example: initially the local JTable structure contains the rows from 0 to 1000;
the user scroll down, when the cell 800 (for example) have to be displayed the method:
getValueAt(800,...)
is called.
This method will update the table structure. Now, for example, the table structure will contain data for example from row 500 to row 1500 (the data from 0 to 499 are deleted)
In this way the local table model dimension will be indipendent from the real database table dimension ...
I hope that my solution is more clear now...
under these conditions the only solutions that can work have to implement a local tablemodel with limited dimension...
Another solution without servlet and rmi that I have found is the following:
update the local limited tablemodel structure quering the database server with select .... limit ... offset
but, the select ... limit ... offset is very dangerous when the offset is high because the database server have to do a sequential scan of all previuous records ...
with servlet (or RMI) solution instead, the entire resultset is on the server and I have only to request the data from the current resultset from row N to row N+1000 without no queries...
Thanks

Similar Messages

  • JTable and the ****** TableModel

    Ok, I know I'm messing with all of these threads about table and table model but there is no way for me to understand:
    I do
    MyTable table = new MyTable( rowData, column );
    public class MyTable extends JTabel {
    MyTableModel myMod = null;
    public MyTable( Vector vec1, Vector vec2 ) {
    super();
    myMod = new MyModel( vec1, vec2 );
    setModel( myMod);
    public class MyModel extends DefaultTableModel {
    public MyModel( Vector vec1, Vector vec2 ) { super(vec1,vec2); }
    but my tables are empty (1)
    and I can't add rows (2)
    Why? I'm messing with this for a lot.. could some one very kind post a bit of code that make me understand what is right and what is not right?
    thanks in advance

    Try this out, and you will probably figure out what you're doing wrong.
    * TableRenderDemo.java is a 1.4 application that requires no other files.
    import javax.swing.DefaultCellEditor;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    * TableRenderDemo is just like TableDemo, except that it
    * explicitly initializes column sizes and it uses a combo box
    * as an editor for the Sport column.
    public class TableRenderDemo extends JPanel {
        private boolean DEBUG = false;
        public TableRenderDemo() {
            super(new GridLayout(1,0));
            JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Set up column sizes.
            initColumnSizes(table);
            //Fiddle with the Sport column's cell editors/renderers.
            setUpSportColumn(table, table.getColumnModel().getColumn(2));
            //Add the scroll pane to this panel.
            add(scrollPane);
         * This method picks good column sizes.
         * If all column heads are wider than the column's cells'
         * contents, then you can just use column.sizeWidthToFit().
        private void initColumnSizes(JTable table) {
            MyTableModel model = (MyTableModel)table.getModel();
            TableColumn column = null;
            Component comp = null;
            int headerWidth = 0;
            int cellWidth = 0;
            Object[] longValues = model.longValues;
            TableCellRenderer headerRenderer =
                table.getTableHeader().getDefaultRenderer();
            for (int i = 0; i < 5; i++) {
                column = table.getColumnModel().getColumn(i);
                comp = headerRenderer.getTableCellRendererComponent(
                                     null, column.getHeaderValue(),
                                     false, false, 0, 0);
                headerWidth = comp.getPreferredSize().width;
                comp = table.getDefaultRenderer(model.getColumnClass(i)).
                                 getTableCellRendererComponent(
                                     table, longValues,
    false, false, 0, i);
    cellWidth = comp.getPreferredSize().width;
    if (DEBUG) {
    System.out.println("Initializing width of column "
    + i + ". "
    + "headerWidth = " + headerWidth
    + "; cellWidth = " + cellWidth);
    //XXX: Before Swing 1.1 Beta 2, use setMinWidth instead.
    column.setPreferredWidth(Math.max(headerWidth, cellWidth));
    public void setUpSportColumn(JTable table,
    TableColumn sportColumn) {
    //Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    //Set up tool tips for the sport cells.
    DefaultTableCellRenderer renderer =
    new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for combo box");
    sportColumn.setCellRenderer(renderer);
    class MyTableModel extends AbstractTableModel {
    private String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    private Object[][] data = {
    {"Mary", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Knitting", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Philip", "Milne",
    "Pool", new Integer(10), new Boolean(false)}
    public final Object[] longValues = {"Sharon", "Campione",
    "None of the above",
    new Integer(20), Boolean.TRUE};
    public int getColumnCount() {
    return columnNames.length;
    public int getRowCount() {
    return data.length;
    public String getColumnName(int col) {
    return columnNames[col];
    public Object getValueAt(int row, int col) {
    return data[row][col];
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    * Don't need to implement this method unless your table's
    * editable.
    public boolean isCellEditable(int row, int col) {
    //Note that the data/cell address is constant,
    //no matter where the cell appears onscreen.
    if (col < 2) {
    return false;
    } else {
    return true;
    * Don't need to implement this method unless your table's
    * data can change.
    public void setValueAt(Object value, int row, int col) {
    if (DEBUG) {
    System.out.println("Setting value at " + row + "," + col
    + " to " + value
    + " (an instance of "
    + value.getClass() + ")");
    data[row][col] = value;
    fireTableCellUpdated(row, col);
    if (DEBUG) {
    System.out.println("New value of data:");
    printDebugData();
    private void printDebugData() {
    int numRows = getRowCount();
    int numCols = getColumnCount();
    for (int i=0; i < numRows; i++) {
    System.out.print(" row " + i + ":");
    for (int j=0; j < numCols; j++) {
    System.out.print(" " + data[i][j]);
    System.out.println();
    System.out.println("--------------------------");
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("TableRenderDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    TableRenderDemo newContentPane = new TableRenderDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    Good luck!!

  • [SOLVED] firefox3 : huge icons and large fonts with big pixels issue

    hi all,
    i have a weird issue regarding firefox3b3 (and firefox3b4 from mozilla.org as well). Firefox2.0.12 is running fine, but the beta of 3 has insanely huge fonts and icons so big that I cannot use it properly.
    I have removed my .mozilla folder but that did not help, i have reinstalled it, downloaded the true ff3b4 from mozilla.org but all the same problem. On windows and solaris ff3 is running fine. Does anyone know what is doing this and how to fix it? icons are so large that it is even starting to get pixelated. I also tried <ctrl> - and <ctrl>/ and <ctrl>0 but none of those help either.
    thanks,
    stefan.
    Last edited by stefan1975 (2008-03-02 19:26:16)

    i have finally found a solution that Really works on the Ubuntu forum, i still had the same issue on my laptop (why it behaves different from my desktop i dont know, maybe because hwd -xs didnt make a 1920x1200 modeline in xorg.conf) but the following acutally works:
    1) Go to about:config in ff3
    2) Search "dpi". The value may be set to -1 (maybe auto-detection)
    3) Change it to 96 (default dpi)
    4) Enjoy Firefox 3!!!
    stefan

  • Problem of crashing in Ill. CS5 when working with big files.....

    Hello, I'm working as a cartographer at Port of Rotterdam and frequently work with big maps in Illustrator CS5. As soon as the filesize exceeds 150 MB, and especially when small rasterfiles (mostly jpg's) are placed inside the document, either embedded or not-embedded, me and my collegue get notifications indicating "Can't show preview"or worse: The operation can't be concluded due to lack of RAM (dutch translation). This being a last warningsign just before CS5 collapses and it thus becomes impossible to make any Save on the document.... The hardware we work with: Quad Core 3GHz;NVidia Quadro 1GB;Windows XP with SP3, DirectX9; 8GB int. memory. We hope to find out the reasons of the frequent collapses and if you know of any possible solutions. On behalf of many of my collegues, thank you in advance for replying, greetings, Fred van Eck

    There can be other causes for instance if your scratch disk is fragmented and if your scratch disk has gotten overloaded with actual files storage.
    Or if the permissions for the scrtch has been changed for some reason.
    The scratch need a lot of free contigious free space to work well with large files.
    Even with CS 6 you can have a problem if your scratch is not healthy.
    Do you have a dedicated drive or partition of one as a primary scratch, does the scratch have a fast enough buffer (cache)? Current drives run 32 MB and 64 MB cache.
    Is the file stored on a fast disk?
    If you work on large files consider storing them on a RAID 0 for while working on them and storing the final some where else.
    CS 6 should be helpful but you need lots for RAM I would not run a system and work on large files with 8GB of memeory 16GB should be your minimum.
    If you are working in a professional envoronment then you really need a professional set up and make your life easier and save money in the time you save.
    It is expensive to set up but wotth it in the end.

  • Extending MDM ResultSet iView with custom web dynpro

    I built a MDM Result set(which is displaying fine), and a web dynpro iview to receive the events from the ResultSet and put them on to a page, added to a role and added to my userid etc.
    But when I invoke the event from the MDM ResultSet Standard iView, no data is coming from the ResultSet.
    Yes, I am aware that I need to make sure the namespace and name of the event should be same in the source and target iviews. I made sure of that.
    The event is being invoked, for sure, but no data. (Because if I didn't catch, the target iView is throwing NullpointerException for want of parameter passed by the EPCF event)
    EPCF event is reaching the target, but no data, what so ever.
    I tried with different fields(Columns) of the Resultset, but no use.
    I got a doubt. The client said, they used MDM 5.5 SP04 software for the Business Package, but MDM 5.5 SP03 MDM Connectors, and ofcourse the server itself is MDM 5.5 SP03. Does this have any influence in the problem I mentioned ?
    Another issue is the naming of the event or the namespace. Are there any guidelines for that ? I gave the name and namespace to be "ShowItemDetails" and "urn:com.oi.ecat.mdm.epcfevent". Are these OK ?
    Thank you very much for your help,
    Prasad Nutalapati

    Hi Narendra/Sidharth,
    I have been referring the same blog below of Vinay for developing the WDJ application:
    Importing Records from MDM BP ResultSet iView to Excel:--https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/504814b6-da5f-2b10-0dbd-e5ee597c74a5
    I have created an event in the ResultSet iview with the details below :
    Event Name = "Export"
    nameSpace = "urn:com.sap.tc.webdynpro.exporttocsv"
    Parameter is of type [MDM Search] and the value is "value"
    And in the Web Dynpro app,following is the code
    public void wdDoInit()
        //@@begin wdDoInit()
        String nameSpace = "urn:com.sap.tc.webdynpro.exporttocsv";
        String event = "Export";
        WDPortalEventing.subscribe(nameSpace,event,wdThis.wdGetExportAction());
        //@@end
    In the Event handler below,Currently I have removed the rest of code to fetch result from MDM ,I am just trying to access the Search object (i.e string value) and I am getting the value as null.
    Can you please tell me what is going wrong....
    public void onActionExport(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String value )
        //@@begin onActionExport(ServerEvent)
        wdComponentAPI.getMessageManager().reportSuccess("The search object:"+value);
        //@@end

  • Issue with a resultSet.wasNull() method

    Hello all
    I'm having a small issue with a resultset, basically i wanna test if it returns a null value but it does not seems to work.
    Its a simple application that pulls football matches data out of a database base on the provided data.
    This is my code, i would like to first say that, connectivity works fine, database existing, tables existing, if correct data's are inserted the application fetches the data with no problem.
    public void getMatch(GregorianCalendar cal){
    java.sql.Date sqlDate= new java.sql.Date(cal.getTimeInMillis());
    try{
    String resultMatch="SELECT resultMatch FROM matches WHERE date=?";
    PreparedStatement pre=connection.prepareStatement(resultMatch);
    pre.setDate(1,sqlDate);
    ResultSet resMatch=pre.executeQuery();
    if(resMatch.wasNull()){
    System.out.println("No data found");
    } else {
    System.out.println("Show all datas");
    }//rest of code
    } catch(SQLException e){
    }//rest of code
    the problem arises now, if i enter a data that its in the DB, its fine, all data's are pulled out and printed (via while(resMatch.next()........))
    If i enter a non existing data....nothing comes out, not even an exception.
    Any advice?
    Thx

    enrico wrote:
    This is my code, i would like to first say that, connectivity works fine, database existing, tables existing, if correct data's are inserted the application fetches the data with no problem.The code posted does not do that.
    >
    public void getMatch(GregorianCalendar cal){
    java.sql.Date sqlDate= new java.sql.Date(cal.getTimeInMillis());
    try{
         String resultMatch="SELECT resultMatch FROM matches WHERE date=?";
         PreparedStatement pre=connection.prepareStatement(resultMatch);
    pre.setDate(1,sqlDate);
         ResultSet resMatch=pre.executeQuery();
    if(resMatch.wasNull()){There is no way that the above code returns 'data' from the database.
    A result set represents a collection of zero or more rows.
    One must first retrieve a row before doing anything with it.
    The above code does not call next() so it absolutely does not retrieve any rows.
    The JDBC tutorial might help.
    http://download.oracle.com/javase/tutorial/jdbc/basics/

  • BUG JSF h:dataTable with JDBC ResultSet - only last column is updated

    I tried to create updatable h:dataTable tag with three h:inputText columns with JDBC ResultSet as data source. But what ever I did I have seceded to update only the last column in h:dataTable tag.
    My JSF page is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.people}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>
    My java been is:
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getPeople() {
    return resultSet;
    I have instaled “Oracle Database 10g Express Edition Release 10.2.0.1.0” – product on my PC localy. I have enabled HR schema and I have instaled and pupulated with sample data folloving table:
    CREATE TABLE "PERSON"
    (     "PIN" VARCHAR2(20) NOT NULL ENABLE,
         "SURNAME" VARCHAR2(30),
         "NAME" VARCHAR2(30),
         CONSTRAINT "PERSON_PK" PRIMARY KEY ("PIN") ENABLE
    I have:
    Windows XP SP2
    Oracle JDeveloper Studio Edition Version 10.1.3.1.0.3894
    I am not shure why this works in that way, but I think that this is a BUG
    Thanks in advance.

    Hi,
    I am sorry because of formatting but while I am entering text looks fine but in preview it is all scrambled. I was looking on the Web for similar problems and I did not find anything similar. Its very simple sample and I could not believe that the problem is in SUN JSF library. I was thinking that problem is in some ResultSet parameter or in some specific Oracle implementation of JDBC thin driver. I did not try this sample on any other platform, database or programming tool. I am new in Java and JSF and I have some experience only with JDeveloper.
    Java been(session scope):
    package com.steva;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class tabela {
    private Connection conn;
    private ResultSet resultSet;
    public tabela() throws SQLException, ClassNotFoundException {
    Statement stmt;
    Class.forName("oracle.jdbc.OracleDriver");
    conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:xe", "hr", "hr");
    stmt = conn.createStatement
    (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    resultSet = stmt.executeQuery("SELECT PIN, SURNAME, NAME FROM PERSON");
    public ResultSet getZaposleni() {
    return resultSet;
    JSF Page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1250"/>
    <title>Stevan</title>
    </head>
    <body><h:form>
    <p>
    <h:messages/>
    </p>
    <p>
    <h:dataTable value="#{tabela.zaposleni}" var = "record">
    <h:column>
    <f:facet name="header">
    <h:outputText value="PIN"/>
    </f:facet>
    <h:inputText value="#{record.PIN}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Surname"/>
    </f:facet>
    <h:inputText value="#{record.SURNAME}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:inputText value="#{record.NAME}"/>
    </h:column>
    </h:dataTable>
    </p>
    <h:commandButton value="Submit"/>
    </h:form></body>
    </html>
    </f:view>

  • Trouble Populating CachedRowSetImpl with a ResultSet Containing a CLOB

    Hi,
    I need to populate a CachedRowSetImpl with a ResultSet that contains a CLOB. I am using the Oracle thin jdbc driver (ojdbc14.jar) When I populate it however, I get an exception:
    java.sql.SQLException: Invalid precision value. Cannot be less than zero
    Here is my code snippet. I get the exception when I call dor_note_dataRowSet.populate(resultSet);
    javax.naming.Context ctx = null;
    DataSource ds = null;
    Connection conn = null;
    PreparedStatement ps1 = null;
    String sqlUpdate = null;
    ResultSet resultSet = null;
    try
    ctx = new javax.naming.InitialContext();
    ds = (DataSource)ctx.lookup("<private>");
    conn = ds.getConnection();
    sqlQuery = "SELECT " +
    "DOR_NOTE_DT, DOR_NOTE_TX " +
    "FROM DOR.DOR_NOTE_DATA " +
    "WHERE DOR_NOTE_CD='SECURITY' AND " +
    "TO_CHAR(DOR_Note_Dt, 'mm/dd/yyyy') = '" + strDate + "'";
    ps1 = conn.prepareStatement(sqlQuery);
    resultSet = ps1.executeQuery();
    dor_note_dataRowSet.populate(resultSet);
    ps1.close();
    conn.close();
    catch (Exception ex) {
    log("Error Description", ex);
    error("Failed to upload file :"+ex.getMessage());
    Thanks

    I figured out how to do it

  • Bug in ResultSet#getDate() with ojdbc7-12.1.0.1

    As "documented" here java - ResultSet#getDate() semantics - Stack Overflow there seems to be a bug in ResultSet#getDate() with ojdbc7-12.1.0.1.
    The java.sql.Date condition
    To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero
    is violated.
    How can we report that to Oracle?

    Hello Hwang
    1/ I don't know for your first question. Have you checked all the RUEI rpm prerequisites? One should be missing probably.
    2/ One solutions consists of installing and configuring Squid proxy on the RUEI server. Then you can use your own browser with ruei server as a proxy and surf. You also need to tweak RUEI to collect traffic within the right network card.
    as $RUEI_USER :
    execsql config_set_profile_value wg profile_wg_localhost_1 config ForceInterface add eth0
    replace wg by the name of your profle (probably wg anyay) and eth0 by the proper network card (also eth0 probably).
    GL & HF
    JB

  • I want to bound my TextField with my ResultSet/DataControl

    Hi All,
    I want to bound my TextField and other GUI components with my ResultSet because i don't want to set the value on each navigation of ResultSet.
    Thanks

    Huh?
    What do you mean 'bound' it? Do you mean that somehow you want to connect a specific gui control to a specific bind parameter in a PreparedStatement?
    If so you aren't going to do that with standard java.
    You might be able to find a product that does that, or you could write it yourself. All it would do though is hide the functionality you are already using.

  • IMovie is outputting my movie with big black bars at top and bottom that I don't want

    Quicktime: Ver 10.3
    iMovie: Ver 10.0.5
    OS: OS X Ver 10.9.4
    So, let me try and explain...
    I have recorded gameplay footage of my game directly from my Mac screen using Quicktime's Record Screen option. I've tried recording both in fullscreen mode (with my game also running in fullscreen mode) and a section of the screen by dragging the mouse to select a 640X960 box (with my game running in windowed mode which is displayed at 640x960 resolution).
    This initial recording direct from the screen displays fine, both when I view it in windowed mode and when I view it fullscreen, with the height of the game stretching to the full height of the video area but obviously with big black borders to either side in fullscreen mode (as it's basically iPhone ratio in portrait mode).
    WindowedFullscreen
    This ^^^ is how they should look.
    The problem is when I try to import the movie into iMovie, mess around with some fade-ins and music and stuff and then output the edited movie via iMovie...
    When I then try to view this outputted movie in windowed mode on certain sites (Kickstarter) my game footage doesn't take up the full height of the video and instead floats in the middle with big black bars at the top and bottom, which I don't want. It's fine when I go fullscreen but the problem is that when I load this video into Kickstarter it shows the non-fullscreen view of the video with this big black border and it looks really amateur.
    This is what Kickstarter shows in windowed mode i.e. the way you see Kickstarter videos by default when you press Play; unless I go fullscreen and then it takes up the full heigh of the view.
    Note: Windowed mode actually looks fine when viewed directly on my Mac but I know it's not Kickstarter that is causing the issue because I can see in the thumbnail preview on my Mac that the video is somehow encoded with the big black bars at the top and bottom. Also, I uploaded the unedited videos to Kickstarter just to check and they display fine. So it's definitely iMovie that is adding these annoying black borders at the top and bottom for whatever reason (and I'm not intentionally scaling the video down in iMove or anything like that as far as I know). I also can't use the unedited footage however because it has no sound and no transitions etc.
    Does anyone know what night be causing this and how to get rid of it.

    You are lucky to see anything - iMovie 5 is not really compatible with Snow Leopard, which only supports iMovie 6 and above.
    Snow Leopard only runs on Intel Macs. iMovie 5 was never written, AFAIK, for Intel, just for the PPC Macs they had in those old days!

  • ResultSet problem with a jdbc connection pool implementation

    Hi
    I'm trying to use jdbc connection pool in my java application (js2e 1.4.0_01)
    from the example at http://www.developer.com/tech/article.php/626141
    In my main() code, in addition to JDBCConnection, JDBCConnectionImpl and JDBCPool classes, i use
    JDBCConnection conn;
    conn = new JDBCConnection(dbName);
    // make a statement
    sqlString = "SELECT........."
    ResultSet rs = null;
    rs = conn.sendRequest(sqlString, rs);
    // print result
    while (rs.next()) {
    Unfortunately i get an error like "ResultSet is closed" in the line corresponding to rs.next. The error disappears if i remove the line
    stmt.close();
    in the method sendRequest of the JDBCConnectionImpl class.
    1) Does anybody knows the solution?
    2) How to close all connections?
    Thanks you in advance.

    Hi ,
    You are closing the statement and then trying to use resultset , which is not going to work .So close then statment after using resultset .Ideally the code should be like this
    try {
    conn = // get the connection
    pstmt = conn.prepareStatement(sql);
    rs = pstmt.executeQuery();
    while ( rs.next()){
    // do something
    catch (Exception ex) {
    finally {
    try {
    if (rs != null)
    rs.close();
    if (pstmt != null)
    pstmt.close();
    if(conn!=null )
    conn.close();

  • Re-using statements with open ResultSet

    Hi,
    Question about re-using connections while keeping a result set open - basically I am trying to do:
    Connection conn = dataSource.getConnection();
    Statement stmt = conn.createStatement();
    if (stmt.execute(QUERY))
    resultSet = stmt.getResultSet();
    ArrayList userList = new ArrayList();
    while (resultSet.next())
    String str = resultSet.getString(1));
    String otherStr = getString(str, conn));
    where getString(str,conn) performs another query.
    Is it recommended to use another connection for the call to the getString() method or is it safe to use the same connection? There won't be any other threads using the connection btw.
    Thanks,
    Johan

    Unfortunately it isn't - i want to look up a list of
    users (the first lookup) and then for each user, I
    want to find out what groups they belong to. So the
    sub-query is needed ... :(
    I could do it in one query, but then I would have to
    do a (sort of ugly) loop in the resultset while loop
    ...Are you a former VB programmer? Just curious...
    I'll bet you'd be FAR better off doing a JOIN to bring back that data. If you have X users, you're saying that you're going to run a query like this once:
    SELECT USER_ID FROM USERS WHERE SOME_ATTRIBUTE = y;Then you're going to loop over all the USER_IDs you get back and run another query like this, once per user:
    SELECT GROUP_ID FROM GROUPS WHERE USER_ID = this_user_idwhere this_user_id is the current USER_ID value in your loop.
    That means you're going to have X+1 network roundtrips. Network calls are the slowest thing you can possibly do.
    Instead of doing that, someone who really knew SQL would write this:
    SELECT GROUP_ID
    FROM GROUPS, USERS
    WHERE
    GROUPS.USER_ID = this_user_id AND
    GROUPS.USER_ID = USERS.USER_IDThat'll mean ONE network roundtrip - MUCH faster. It's called a JOIN, in case you didn't know.
    The loop over the ResultSet will be no uglier than what you'll do to accomplish the JOIN in your own code. I'll bet it's cleaner. AND it'll do it in 1/(X+1) the time, because you'll only do 1 network roundtrip instead of (X+1).
    Doing the JOIN in your code is the most foolish thing you can possibly do. You're saying that you can optimize the query better than the guy who wrote the SQL engine and optimizer for your database. I highly doubt it. JMO - MOD

  • Probem with updateable resultset

    i have large view in database , i want to update virtual columns in this view , i used resultset to update this virtual columns , but there are exception that resultset is readonly .
    my question i want to update these virtual columns with resultset or cashrowset .
    i want these to make some calculation in run time before run report .
    Statement stmt = connection.createStatement(
    ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    ResultSet resultSet = stmt.executeQuery("SELECT * FROM employeedata_view");
    resultSet.first();
    resultSet.updateString("col_string", "join");
    resultSet.updateRow();

    Does your database support update-able views? If not, there's no way it's going to work from Java.

  • I try to pull up photos in iPhoto and it shows a big "!"  I can still see the photo, just can't do anything with it or view it larger.  Help!  Thank you!

    I try to pull up photos in iPhoto and it shows a big "!"  I can still see the photo, I just can't do anything with it or view it larger.  What happened?  Help!  Thank you!

    This is what I found, Idon't know if it will help, but I'll send them anyway.
    https://discussions.apple.com/thread/3873468
    http://support.apple.com/kb/PH2449
    http://support.apple.com/kb/TS1140
    http://support.apple.com/kb/HT1044

Maybe you are looking for

  • M9500y performanc​e degredatio​n and hard drive failure ?

    I have a m9500y that is reporting all sorts of performance boot issues in Vista. I do not know what to expect, read this post and let me know what you think.  TIA! The new drive has been successfully restored and runs the O.S., I even have managed to

  • Numbers 3.2 and Dropbox viewer does not work

    Hi, I upgraded to OS Maverick 9.2 and also to Numbers 3.2 I have quite a lot of numbers files in Dropbox So far, I was  was able to view them within Dropbox on my iPhone. After using these files with Numbers 3.2 on my Mac, Dropbox is unable to view t

  • Unable to edit my vendor in po

    Hello All, We  are creating  PR with item category D (Service) and fille desired vendor in the sourse  of supply tab. PR created and release also done, while creating PO  against to that PR ,  system is  copying all the datas its putting desired vend

  • Rotation x,y,z axis simultaneously ?

    Hi anybody, I'm new to java 3d programming & having problem in doing simultaneously rotation along the x,y,z axis. Imagine of "a plane going up, and turning to left" someRotation.rotX(degree1); someRotation.rotY(degree2); someRotation.rotZ(degree3);

  • Elimination of Duplicates in Library?

    I'm a newbie and have managed to copy duplicates of photos into my iPhoto main library. Is there a simple process for mass-identification and elimination of such duplicates for the entire library? Thanks, David