Problem exporting txt' file size is 23 KB and '.zip' size 4 MB

I am using Apex 3.0 version screen to upload '.txt' file and '.zip' file containing images.
I can successfully export '.txt' file and '.zip' file containing images as long as '.txt' file size is < 23 KB and '.zip' file size < 4 MB from database table 'TBL_upload_file' to the OS directory on the server.
processing of Larger files (sizes 35 KB and 6 MB) produce following Error Message.
‘ORA-21560: argument 2 is null, invalid or out of range’ error.
Here is my code:
I am using following code to export Documents from database table 'TBL_upload_file' to the OS directory on the server.
create or replace procedure "PROC_LOAD_FILES_TO_FLDR_BYTES"
(pchr_text_file IN VARCHAR2,
pchr_zip_file IN VARCHAR2)
is
lzipfile varchar(100);
lzipname varchar(100);
sseq varchar(1000);
ldocname varchar(100);
lfile varchar(100);
-- loaddoc (p_file in number) as
l_file UTL_FILE.FILE_TYPE;
l_buffer RAW(32000);
l_amount NUMBER := 32000;
l_pos NUMBER := 1;
l_blob BLOB;
l_blob_len NUMBER;
l_file_name varchar(200);
l_doc_name varchar(200);
a_file_name varchar (200);
end_pos NUMBER;
begin
-- Get LOB locator
SELECT blob_content,doc_name
INTO l_blob,l_file_name
FROM tbl_upload_file
WHERE DOC_NAME = pchr_text_file;
--get length of blob
l_blob_len := DBMS_LOB.getlength(l_blob);
-- save blob length to determine end position
end_pos:= l_blob_len;
-- Open the destination file.
-- l_file := UTL_FILE.fopen('BLOBS','MyImage.gif','w', 32767);
l_file := UTL_FILE.fopen('BLOBS',l_file_name,'WB', 32760); --use write byte option supported in 10G
-- if small enough for a single write
IF l_blob_len < 32760 THEN
utl_file.put_raw(l_file,l_blob);
utl_file.fflush(l_file);
ELSE -- write in pieces
-- Read chunks of the BLOB and write them to the file
-- until complete.
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw(l_file, l_buffer);
utl_file.fflush(l_file); --flush pending data and write to the file
-- set the start position for the next cut
l_pos := l_pos + l_amount;
-- set the end position if less than 32000 bytes, here end_pos captures length of the document
end_pos := end_pos - l_amount;
IF end_pos < 32000 THEN
l_amount := end_pos;
END IF;
END LOOP;
END IF;
--- zip file
-- Get LOB locator to locate zip file
SELECT blob_content,doc_name
INTO l_blob,l_doc_name
FROM tbl_upload_file
WHERE DOC_NAME = pchr_zip_file;
l_blob_len := DBMS_LOB.getlength(l_blob);
-- save blob length to determine end position
end_pos:= l_blob_len;
-- Open the destination file.
-- l_file := UTL_FILE.fopen('BLOBS','MyImage.gif','w', 32767);
l_file := UTL_FILE.fopen('BLOBS',l_doc_name,'WB', 32760); --use write byte option supported in 10G
-- if small enough for a single write
IF l_blob_len < 32760 THEN
utl_file.put_raw(l_file,l_blob);
utl_file.fflush(l_file); --flush out pending data to the file
ELSE -- write in pieces
-- Read chunks of the BLOB and write them to the file
-- until complete.
l_pos:=1;
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw(l_file, l_buffer);
UTL_FILE.fflush(l_file); --flush pending data and write to the file
l_pos := l_pos + l_amount;
-- set the end position if less than 32000 bytes, here end_pos contains length of the document
end_pos := end_pos - l_amount;
IF end_pos < 32000 THEN
l_amount := end_pos;
END IF;
END LOOP;
END IF;
-- Close the file.
IF UTL_FILE.is_open(l_file) THEN
UTL_FILE.fclose(l_file);
END IF;
exception
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR(-20214,'Screen fields cannot be blank, Proc_Load_Files_To_Fldr_BYTES.');      
WHEN TOO_MANY_ROWS THEN
RAISE_APPLICATION_ERROR(-20215,'More than one record exist in the tbl_load_file table, Proc_Load_Files_To_Fldr_BYTES.');     
WHEN OTHERS THEN
-- Close the file if something goes wrong.
IF UTL_FILE.is_open(l_file) THEN
UTL_FILE.fclose(l_file);
END IF;
RAISE_APPLICATION_ERROR(-20216,'Some other errors occurred, Proc_Load_Files_To_Fldr_BYTES.');     
end;
I am new to the Oracle.
Any help to modify this scipt and resolve this problem will be greatly appreciated.
Thank you.

Ask this question in the Apex forums. See Oracle Application Express (APEX)
Regards Nigel

Similar Messages

  • Problem exporting '.txt' file size 23 KB and '.zip' file size 4 MB

    I am using Apex 3.0 version screen to upload '.txt' file and '.zip' file containing images.
    I can successfully export '.txt' file and '.zip' file containing images as long as '.txt' file size is < 23 KB and '.zip' file size < 4 MB from database table 'TBL_upload_file' to the OS directory on the server.
    processing of Larger files (sizes 35 KB and 6 MB) produce following Error Message.
    ‘ORA-21560: argument 2 is null, invalid or out of range’ error.
    Here is my code:
    I am using following code to export Documents from database table 'TBL_upload_file' to the OS directory on the server.
    create or replace procedure "PROC_LOAD_FILES_TO_FLDR_BYTES"
    (pchr_text_file IN VARCHAR2,
    pchr_zip_file IN VARCHAR2)
    is
    lzipfile varchar(100);
    lzipname varchar(100);
    sseq varchar(1000);
    ldocname varchar(100);
    lfile varchar(100);
    -- loaddoc (p_file in number) as
    l_file UTL_FILE.FILE_TYPE;
    l_buffer RAW(32000);
    l_amount NUMBER := 32000;
    l_pos NUMBER := 1;
    l_blob BLOB;
    l_blob_len NUMBER;
    l_file_name varchar(200);
    l_doc_name varchar(200);
    a_file_name varchar (200);
    end_pos NUMBER;
    begin
    -- Get LOB locator
    SELECT blob_content,doc_name
    INTO l_blob,l_file_name
    FROM tbl_upload_file
    WHERE DOC_NAME = pchr_text_file;
    --get length of blob
    l_blob_len := DBMS_LOB.getlength(l_blob);
    -- save blob length to determine end position
    end_pos:= l_blob_len;
    -- Open the destination file.
    -- l_file := UTL_FILE.fopen('BLOBS','MyImage.gif','w', 32767);
    l_file := UTL_FILE.fopen('BLOBS',l_file_name,'WB', 32760); --use write byte option supported in 10G
    -- if small enough for a single write
    IF l_blob_len < 32760 THEN
    utl_file.put_raw(l_file,l_blob);
    utl_file.fflush(l_file);
    ELSE -- write in pieces
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw(l_file, l_buffer);
    utl_file.fflush(l_file); --flush pending data and write to the file
    -- set the start position for the next cut
    l_pos := l_pos + l_amount;
    -- set the end position if less than 32000 bytes, here end_pos captures length of the document
    end_pos := end_pos - l_amount;
    IF end_pos < 32000 THEN
    l_amount := end_pos;
    END IF;
    END LOOP;
    END IF;
    --- zip file
    -- Get LOB locator to locate zip file
    SELECT blob_content,doc_name
    INTO l_blob,l_doc_name
    FROM tbl_upload_file
    WHERE DOC_NAME = pchr_zip_file;
    l_blob_len := DBMS_LOB.getlength(l_blob);
    -- save blob length to determine end position
    end_pos:= l_blob_len;
    -- Open the destination file.
    -- l_file := UTL_FILE.fopen('BLOBS','MyImage.gif','w', 32767);
    l_file := UTL_FILE.fopen('BLOBS',l_doc_name,'WB', 32760); --use write byte option supported in 10G
    -- if small enough for a single write
    IF l_blob_len < 32760 THEN
    utl_file.put_raw(l_file,l_blob);
    utl_file.fflush(l_file); --flush out pending data to the file
    ELSE -- write in pieces
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
    l_pos:=1;
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw(l_file, l_buffer);
    UTL_FILE.fflush(l_file); --flush pending data and write to the file
    l_pos := l_pos + l_amount;
    -- set the end position if less than 32000 bytes, here end_pos contains length of the document
    end_pos := end_pos - l_amount;
    IF end_pos < 32000 THEN
    l_amount := end_pos;
    END IF;
    END LOOP;
    END IF;
    -- Close the file.
    IF UTL_FILE.is_open(l_file) THEN
    UTL_FILE.fclose(l_file);
    END IF;
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-20214,'Screen fields cannot be blank, Proc_Load_Files_To_Fldr_BYTES.');
    WHEN TOO_MANY_ROWS THEN
    RAISE_APPLICATION_ERROR(-20215,'More than one record exist in the tbl_load_file table, Proc_Load_Files_To_Fldr_BYTES.');
    WHEN OTHERS THEN
    -- Close the file if something goes wrong.
    IF UTL_FILE.is_open(l_file) THEN
    UTL_FILE.fclose(l_file);
    END IF;
    RAISE_APPLICATION_ERROR(-20216,'Some other errors occurred, Proc_Load_Files_To_Fldr_BYTES.');
    end;
    I am new to the Oracle.
    Any help to modify this scipt and resolve this problem will be greatly appreciated.
    Thank you.

    Ask this question in the Apex forums. See Oracle Application Express (APEX)
    Regards Nigel

  • Iba allow others to make text edits. What workflow are you guys using to allow others to make text edits once the iBook has been layed out and formatted?  Is it too late? Do I need to export txt then reimport the editted text and reformat it all again?

    iba allow others to make text edits. What workflow are you guys using to allow others to make text edits once the iBook has been layed out and formatted?  Is it too late? Do I need to export txt then reimport the editted text and reformat it all again?

    Hi Ken,
    Thanks for the reply. The project I am working on is a test project for a customer. They could potentially want a number of their educational subjects presented as an interactive text book. The intent of this first project with them is to establish a logical workflow that will allow us to efficiently estimate costs and allow for review throughout the design process. Having worked with customers on creative projects in the past I can anticipate that they will want a number of changes made once they see a working version of the interactive text book.
    It is a grim reality that no project can be fully edited and planned prior to working on it and I know revisions and changes are always made once the customer can see their product. It is ok with me if there is no easy way to pass the text back and forth from the customer and me without having to reformat everything but I just want to know that is the way it works in order to provide a realistic time estimate for the project.
    My hope was I would be able to export the formatted text, allow them to make edits and then reimport that formatted text. The style sheets I am using are from one of the iBooks Author templates.
    Do you know if there is a way to use (or export ) this style sheet so it can be used in a Pages Document?
    Or, would the best option be to have the customer install iBooks Author? This would require the customer to have a mac and the software so it doesn't work for all cases.
    Another idea I was considering would be to export the book as a PDF and have the customer add markup and notes to the PDF.
    All of these options do not seem too great to me.
    I am open to any ideas.
    Thanks,
    Rob

  • Quick Time Pro - Problem Exporting AVI files to .mov

    Hi all, Here is the problem that has been plaguing me and driving me crazy. hopefully somebody can help me with this.
    I use pinnacle studio 8 to create the avi file, the resulting file size is 1.02GB. Everything works fine in this file audio and video
    Next I use quicktime pro to convert the file to a .mov format and compress the video down. This is where the problem starts. when I try and export the avi to a .mov, the options screen doesn't allow me to select the audio, it says its not there. I can modify all the settings for the video, but it doesn't even recognize the audio.
    It has been doing this for all of my avi videos that are over a gig. It also does this when I try and export an mpeg to a .mov
    also if I do go ahead and export to a .mov file, it compresses the videos down to around 5 to 7mb, where as all my videos that are exported to .mov that do have sound are roughly 20+mb
    Anybody know whats going on? I'm going nuts trying to figure this out.
    Message was edited by: tlsolutions

    Sounds like your AVI isn't really a two track file (audio and video) but rather a muxed MPEG-1 file.
    QuickTime Pro can't extract audio from muxed file formats and that is why it shows no sound options during export.
    MPEG Streamclip (free) can export MPEG-1 to QuickTime formats and extract the audio.

  • Output Not Appearing in Exported .TXT File

    Hi
    I am using Crystal Reports XI R2, using Universe as a Data source, and Business Objects XI Release  2.Oracle 10G as a Datasource with Universe.
    I am getting Correct Data, in Crystal  Report Viewer, But if i am making attempt to Export the Data to a .TXT File, it is not displaying tha Data as in Crystal Report Viewer.
    1) In my Case we are Using Page Number Reset Option, which is working fine in Crystal Reports Viewer, but in .TXT file output, Page Number is not reseted.
    2) We are Using Group Headers which has Text Objects and Formula Field,  the Group Header Displays for Each Group in Viewer, but same is not displayed in .TXT File output.
    3) For Very First Group, In Viewer it Displaying Page No as 1,1,2,3.....(which is not Correct, it should be 1,2,3....), but in .TXT file Output, it Displays right One as 1,2,3......
    But If iam Exporting the Report to an PDF File, it Displays Eactly as what is in viewer.
    So Kindly Help me on this Issue.
    Thanks
    M.Mukesh
    Edited by: m.mukesh on Dec 9, 2010 9:49 PM
    Edited by: m.mukesh on Dec 9, 2010 9:50 PM

    Moved to BOE Admin forum

  • Problem reading txt file

    Hi
    I have a shell cluster where I type different data for my file. Then I save this to txt file. The problem is when I want to open the file and use the data for the same shell cluster, which is now an indicator. Can someone help me with this??
    Attachments:
    Save_read.vi ‏84 KB

    Hi Boris,
    see the attached example. It is better if you insert your input data into the save event, because you then save the newest values.
    Mike
    Attachments:
    Save_read_LV80.vi ‏91 KB

  • Problem reading .txt-file into JTable

    My problem is that I�m reading a .txt-file into a J-Table. It all goes okay, the FileChooser opens and the application reads the selected file (line). But then I get a Null Pointer Exception and the JTable does not get updated with the text from the file.
    Here�s my code (I kept it simple, and just want to read the text from the .txt-file to the first cell of the table.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    import java.lang.*;
    import java.io.*;
    public class TeamTable extends JFrame implements ActionListener, ItemListener                {
    static JTable table;
         // constructor
    public TeamTable()                {
    super( "Invoermodule - Team Table" );
    setSize( 740, 365 );
              // setting the rownames
    ListModel listModel = new AbstractListModel()                     {
    String headers[] = {"Team 1", "Team 2", "Team 3", "Team 4", "Team 5", "Team 6", "Team 7", "Team 8", "Team 9",
    "Team 10", "Team 11", "Team 12", "Team 13", "Team 14", "Team 15", "Team 16", "Team 17", "Team 18"};
    public int getSize() { return headers.length; }
    public Object getElementAt(int index) { return headers[index]; }
              // add listModel & rownames to the table
              DefaultTableModel defaultModel = new DefaultTableModel(listModel.getSize(),3);
              JTable table = new JTable( defaultModel );
              // setting the columnnames and center alignment of table cells
              int width = 200;
              int[] vColIndex = {0,1,2};
              String[] ColumnName = {"Name Team", "Name Chairman", "Name Manager"};
              TableCellRenderer centerRenderer = new CenterRenderer();          
              for (int i=0; i < vColIndex.length;i++)          {
                             table.getColumnModel().getColumn(vColIndex).setHeaderValue(ColumnName[i]);
                             table.getColumnModel().getColumn(vColIndex[i]).setPreferredWidth(width);
                             table.getColumnModel().getColumn(vColIndex[i]).setCellRenderer(centerRenderer);
              table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
              // force the header to resize and repaint itself
              table.getTableHeader().resizeAndRepaint();
              // create single component to add to scrollpane (rowHeader is JList with argument listModel)
              JList rowHeader = new JList(listModel);
              rowHeader.setFixedCellWidth(100);
              rowHeader.setFixedCellHeight(table.getRowHeight());
              rowHeader.setCellRenderer(new RowHeaderRenderer(table));
              // add to scroll pane:
              JScrollPane scroll = new JScrollPane( table );
              scroll.setRowHeaderView(rowHeader); // Adds row-list left of the table
              getContentPane().add(scroll, BorderLayout.CENTER);
              // add menubar, menu, menuitems with evenlisteners to the frame.
              JMenuBar menubar = new JMenuBar();
              setJMenuBar (menubar);
              JMenu filemenu = new JMenu("File");
              menubar.add(filemenu);
              JMenuItem open = new JMenuItem("Open");
              JMenuItem save = new JMenuItem("Save");
              JMenuItem exit = new JMenuItem("Exit");
              open.addActionListener(this);
              save.addActionListener(this);
              exit.addActionListener(this);
              filemenu.add(open);
              filemenu.add(save);
              filemenu.add(exit);
              filemenu.addItemListener(this);
    // ActionListener for ActionEvents on JMenuItems.
    public void actionPerformed(ActionEvent e) {       
         String open = "Open";
         String save = "Save";
         String exit = "Exit";
              if (e.getSource() instanceof JMenuItem)     {
                   JMenuItem source = (JMenuItem)(e.getSource());
                   String x = source.getText();
                        if (x == open)          {
                             System.out.println("open file");
                        // create JFileChooser.
                        String filename = File.separator+"tmp";
                        JFileChooser fc = new JFileChooser(new File(filename));
                        // set default directory.
                        File wrkDir = new File("C:/Documents and Settings/Erwin en G-M/Mijn documenten/Erwin/Match Day");
                        fc.setCurrentDirectory(wrkDir);
                        // show open dialog.
                        int returnVal =     fc.showOpenDialog(null);
                        File selFile = fc.getSelectedFile();
                        if(returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("You chose to open this file: " +
                   fc.getSelectedFile().getName());
                        try          {
                             BufferedReader invoer = new BufferedReader(new FileReader(selFile));
                             String line = invoer.readLine();
                             System.out.println(line);
                             // THIS IS WHERE IT GOES WRONG, I THINK
                             table.setValueAt(line, 1, 1);
                             table.fireTableDataChanged();
                        catch (IOException ioExc){
                        if (x == save)          {
                             System.out.println("save file");
                        if (x == exit)          {
                             System.out.println("exit file");
    // ItemListener for ItemEvents on JMenu.
    public void itemStateChanged(ItemEvent e) {       
              String s = "Item event detected. Event source: " + e.getSource();
              System.out.println(s);
         public static void main(String[] args)                {
              TeamTable frame = new TeamTable();
              frame.setUndecorated(true);
         frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
              frame.addWindowListener( new WindowAdapter()           {
                   public void windowClosing( WindowEvent e )                {
         System.exit(0);
    frame.setVisible(true);
    * Define the look/content for a cell in the row header
    * In this instance uses the JTables header properties
    class RowHeaderRenderer extends JLabel implements ListCellRenderer           {
    * Constructor creates all cells the same
    * To change look for individual cells put code in
    * getListCellRendererComponent method
    RowHeaderRenderer(JTable table)      {
    JTableHeader header = table.getTableHeader();
    setOpaque(true);
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    setHorizontalAlignment(CENTER);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    * Returns the JLabel after setting the text of the cell
         public Component getListCellRendererComponent( JList list,
    Object value, int index, boolean isSelected, boolean cellHasFocus)      {
    setText((value == null) ? "" : value.toString());
    return this;

    My problem is that I�m reading a .txt-file into a J-Table. It all goes okay, the FileChooser opens and the application reads the selected file (line). But then I get a Null Pointer Exception and the JTable does not get updated with the text from the file.
    Here�s my code (I kept it simple, and just want to read the text from the .txt-file to the first cell of the table.
    A MORE READABLE VERSION !
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    import java.lang.*;
    import java.io.*;
    public class TeamTable extends JFrame implements ActionListener, ItemListener                {
    static JTable table;
         // constructor
        public TeamTable()                {
            super( "Invoermodule - Team Table" );
            setSize( 740, 365 );
              // setting the rownames
            ListModel listModel = new AbstractListModel()                     {
                String headers[] = {"Team 1", "Team 2", "Team 3", "Team 4", "Team 5", "Team 6", "Team 7", "Team 8", "Team 9",
                "Team 10", "Team 11", "Team 12", "Team 13", "Team 14", "Team 15", "Team 16", "Team 17", "Team 18"};
                public int getSize() { return headers.length; }
                public Object getElementAt(int index) { return headers[index]; }
              // add listModel & rownames to the table
              DefaultTableModel defaultModel = new DefaultTableModel(listModel.getSize(),3);
              JTable table = new JTable( defaultModel );
              // setting the columnnames and center alignment of table cells
              int width = 200;
              int[] vColIndex = {0,1,2};
              String[] ColumnName = {"Name Team", "Name Chairman", "Name Manager"};
              TableCellRenderer centerRenderer = new CenterRenderer();          
              for (int i=0; i < vColIndex.length;i++)          {
                             table.getColumnModel().getColumn(vColIndex).setHeaderValue(ColumnName[i]);
                             table.getColumnModel().getColumn(vColIndex[i]).setPreferredWidth(width);
                             table.getColumnModel().getColumn(vColIndex[i]).setCellRenderer(centerRenderer);
              table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
              // force the header to resize and repaint itself
              table.getTableHeader().resizeAndRepaint();
              // create single component to add to scrollpane (rowHeader is JList with argument listModel)
              JList rowHeader = new JList(listModel);
              rowHeader.setFixedCellWidth(100);
              rowHeader.setFixedCellHeight(table.getRowHeight());
              rowHeader.setCellRenderer(new RowHeaderRenderer(table));
              // add to scroll pane:
              JScrollPane scroll = new JScrollPane( table );
              scroll.setRowHeaderView(rowHeader); // Adds row-list left of the table
              getContentPane().add(scroll, BorderLayout.CENTER);
              // add menubar, menu, menuitems with evenlisteners to the frame.
              JMenuBar menubar = new JMenuBar();
              setJMenuBar (menubar);
              JMenu filemenu = new JMenu("File");
              menubar.add(filemenu);
              JMenuItem open = new JMenuItem("Open");
              JMenuItem save = new JMenuItem("Save");
              JMenuItem exit = new JMenuItem("Exit");
              open.addActionListener(this);
              save.addActionListener(this);
              exit.addActionListener(this);
              filemenu.add(open);
              filemenu.add(save);
              filemenu.add(exit);
              filemenu.addItemListener(this);
    // ActionListener for ActionEvents on JMenuItems.
    public void actionPerformed(ActionEvent e) {       
         String open = "Open";
         String save = "Save";
         String exit = "Exit";
              if (e.getSource() instanceof JMenuItem)     {
                   JMenuItem source = (JMenuItem)(e.getSource());
                   String x = source.getText();
                        if (x == open)          {
                             System.out.println("open file");
                        // create JFileChooser.
                        String filename = File.separator+"tmp";
                        JFileChooser fc = new JFileChooser(new File(filename));
                        // set default directory.
                        File wrkDir = new File("C:/Documents and Settings/Erwin en G-M/Mijn documenten/Erwin/Match Day");
                        fc.setCurrentDirectory(wrkDir);
                        // show open dialog.
                        int returnVal =     fc.showOpenDialog(null);
                        File selFile = fc.getSelectedFile();
                        if(returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("You chose to open this file: " +
                   fc.getSelectedFile().getName());
                        try          {
                             BufferedReader invoer = new BufferedReader(new FileReader(selFile));
                             String line = invoer.readLine();
                             System.out.println(line);
                             // THIS IS WHERE IT GOES WRONG, I THINK
                             table.setValueAt(line, 1, 1);
                             table.fireTableDataChanged();
                        catch (IOException ioExc){
                        if (x == save)          {
                             System.out.println("save file");
                        if (x == exit)          {
                             System.out.println("exit file");
    // ItemListener for ItemEvents on JMenu.
    public void itemStateChanged(ItemEvent e) {       
              String s = "Item event detected. Event source: " + e.getSource();
              System.out.println(s);
         public static void main(String[] args)                {
              TeamTable frame = new TeamTable();
              frame.setUndecorated(true);
         frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
              frame.addWindowListener( new WindowAdapter()           {
                   public void windowClosing( WindowEvent e )                {
         System.exit(0);
    frame.setVisible(true);
    * Define the look/content for a cell in the row header
    * In this instance uses the JTables header properties
    class RowHeaderRenderer extends JLabel implements ListCellRenderer           {
    * Constructor creates all cells the same
    * To change look for individual cells put code in
    * getListCellRendererComponent method
    RowHeaderRenderer(JTable table)      {
    JTableHeader header = table.getTableHeader();
    setOpaque(true);
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    setHorizontalAlignment(CENTER);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    * Returns the JLabel after setting the text of the cell
         public Component getListCellRendererComponent( JList list,
    Object value, int index, boolean isSelected, boolean cellHasFocus)      {
    setText((value == null) ? "" : value.toString());
    return this;

  • Also problem read txt files into JTable

    hello,
    i used the following method to load a .txt file into JTable
    try{
                        FileInputStream fin = new FileInputStream(filename);
                        InputStreamReader isr = new InputStreamReader(fin);
                        BufferedReader br =  new BufferedReader(isr);
                        StringTokenizer st1 = new StringTokenizer(br.readLine(), "|");
                        while( st1.hasMoreTokens() )
                             columnNames.addElement(st1.nextToken());
                        while ((aLine = br.readLine()) != null)
                             StringTokenizer st2 = new StringTokenizer(aLine, "|");
                             Vector row = new Vector();
                             while(st2.hasMoreTokens())
                                  row.addElement(st2.nextToken());
                             data.addElement( row );
                        br.close();
                        }catch(Exception e){ e.printStackTrace(); }
                   //colNum = st1.countTokens();
                   model = new DefaultTableModel(data,columnNames);
                   table.setModel(model);but there is a problem : if cell A's location is (4,5),and its left neighbour,that is, cell(4,4) is blank (the value is ""), the the cell A's value will be displayed in cell(4,4).if cell(4,3) is also blank ,the cell A's value will be displayed in cell(4,3).that is,the non-blank value will be displayed in the first blank cell of the line.
    how can i solve it?Please give me some helps or links.
    Thank u very much!

    Or, use the String.split(..) method to tokenize the data
    Or, use my SimpleTokenizer class which you can find by using the search function.

  • Problem exporting .mov file

    I'm trying to export a :30 second sequence using quicktime conversion to a .mov file. I use the default settings with the H.264 codec and uncompressed 16 bit audio. (I've also tried a few other settings with Sorenson and Sorenson 3) The same thing happens everytime. The export takes forever (about 20 minutes) then stops when the progress bar gets to about 79%. A general error comes up. On some occasions, I have also gotten a notice that says my startup disk is close to full. This is confusing because all my drives have at least 10gb of space available on them.
    It was suggested in another thread that this could be a result of a corrupt media or render file. If so, how does one determine that this is the cause? It was also said that bad RAM might be to blame.
    Any help would be appreciated.

    Hmm...
    I wouldn't jump right into upgrading as a fix at this point, since your program shouldn't have any trouble exporting a simple Quicktime, and the upgrade to Final Cut Studio from FCP 3 is $799 USD. That isn't full price, but still may be a bit steep if you've chosen to keep using FCP 3 for so long. Although I will say that subsequent versions include many improvements that you might actually appreciate so keep it in mind.
    Have you tried exporting using Quicktime Conversion from any other projects with any other clips? That would also be a good idea, to narrow down the problem. Did you try exporting a Quicktime Movie using Current Settings? I realize that may not be adequate for your final intention, but it would help the troubleshooting as well.
    I once had a problem exporting a clip from FCP and after trying everything, I recaptured the clip and it ended up working. There were no visible glitches or skips in the video to indicate that the clip itself would have been corrupt, but turns out it was. So if you can recapture, since it's only a 60-second clip, maybe give that a whirl.
    You should also trash your FCP prefs (search for com.apple.FinalCutPro.plist on your sytem drive and delete that file), repair your permissions (in Disk Utility), and restart.
    Post back,
    Joni

  • Problem Exporting HD files CC 2014

    Hi, I'm having trouble exporting HD files from a CC '14 project. I've tried ProRes 422 QT, MPeg2 HD and H264 HD. All of these are failing in both Encoder and when I try to export them directly from Premier. I was able to export a low res H264 though. Any Ideas why this is happening.

    Ahh. There's wiser heads around who can probably completely correct & improve this response ... but here's my two cents USD.
    I'd suggest creating a new project on your machine with the same folder/bin structure, then copying all the assets of that project (graphics, stills, footage, sequences) individually and manually putting them in place on your machine. Then try it and see what happens. If there's a bit of corruption to the project files somewhere or just wonkiness between the other rig & yours, sorting all that out can take weeks.
    This process may take you up to an hour, but ... might just work.
    Neil

  • Problem exporting mpeg2 file?

    I'm trying to export a file to use in DVD Studio 2. I'm in FCP 4.5 using Quicktime conversion. The file is about 3.8 GB. I get an error message that says "not enough space", but I'm saving it to an external hard drive that has about 30 GB.
    Any sugestions?
    Thanks
    Mike

    if the drive you are exporting to us a Windows formatted drive, it is limited to 2GB files.
    Can you export to your local drive?

  • Looking for some help with an error message when exporting master file. I'm stuck and would even pay to get this sorted out!

    Hey guys, I'm really in a bind here and need some urgent help tonite. I would even be willing to pay for some actual help and not some vague information that i may not be able to understand if we could do something via skype or some other way that would be much quicker than a message board. Of course I have to have the project done by tomorow . so I'm new to fcpx, but have succesfully exported 2 other projects. I've also ran into this predicament before (error message not allowing me complete export) and have been able to solve that by converting the files i imported off my camera (canon g20) to a different file type (prores).
    so where I'm at now: i have a 13 min short, all shot on my canon g20, imported and converted to prores422 with the brorsoft video converter with all the shots in a single event in fcpx. i'm using fcpx version 10.0.08. I have one main video track in my timeline that is completely full of very fast edits. (all quick 2-5 second clips, sped up shots in 2x, 4x, or 8x, tons of transitions, titles, and a little fx. theres 2 audio tracks, one is narration/speech and the other is an ongoing music track that constantly ducks everytime the subject speaks (tons of ducks/edits). Have you seen mtv cribs? Well i filmed an EXACT replica. So If you've seen one of those episodes, its literally the same exact same thing. I have all of my work completed, everything has been fully rendered, and i have it exactly as I want it.
    I'm including all this information in case it may help. my successful projects ive exported in the past were rather simple, and this one is very complex and full of edits. here is what it looks like in the timeline:
    Ive tried exporting the master file using almost all the different ways with no luck. My primary objective is to get it on youtube by any means by tommorow for a showing to a potential buyer (long story) and so I've been told using the h.264 is the best format for that. This, along with the other methods give me the same error message:
    It think it gives this error message when i reach 24% everytime during export.
    So first of all, what is that error message? Do i need to be concerned about the specifics of it, or is there something major that I'm missing? Like i said, i dont care how, but I need to get this video up on youtube tonite for an important viewing tomorrow. Conceptually, I think if i can figure this one out I shouldnt have any more trouble in the future doing something so basic, yet critical, such as exporting my 40+ hours of work for someone to see.
    anyway, I apologize in advance for my lack of knowledge with this software, and for my extremely long winded question which will probably have the opposite effect for me as most wont want to take the time to read all this, BUT i figured if i was as thorough as possible it might help actually getting a concrete answer, instead of a "read the manual, exporting is on page 37." or "use the share button on the right of the timeline then just click export master file and it will work everytime."
    Cheers everybody, and thank you. Like i said if someone is up, and willing to talk via skype, phone, messanger or any other method that works for you I would be totally down and will compensate you generously for your time. thanks again.
    Taphabit

    boom! that advice was correct and worked. i was able to export the full project as a quicktime movie and it can be uploaded to youtube.
    NOTE, theres is definately quite a few noticeable audio glitches/lags/pops that werent there before doing this. I believe, and will test to make sure, that having a project such as this one needs to render before exporting. I'm not sure if the advice requires the project to be unrendered before exporting for a specific reason, because if it will export fine after rendering the project that's the way to go. like i said the edited version i have in my timeline plays back perfectly but this exported version has quite a few noticeable audio glitches (a few video glitches too). I'm going to retry doing the first few steps of your advice, but then at the end render, then export and compare the results...
    OK, so this leads to a big question, Is this something that is standard for everyone when trying to export? If its not, what causes this error?
    is there any way of preemptively avoiding it in future projects?
    thanks again, and hopefully this information will help others as exporting seem to be one of the biggest problems in fcpx. any word on a new patch or firmware update?

  • Help! How to read a .txt file into a Java class and make 2D array?

    Hi guys,
    Im a newbie with arrays, just started really using them.. please bear with me if I don't seem to understand much..
    I have a .txt file that contains either a square or rectangle (random width and length).. How can I read each line into a Java class into a 2D array with rows and columns?

    Example :
    import javax.swing.*;
    import java.util.ArrayList;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.File;
    public class ReadInto2DArrayExample {
        public static void main(String[] args) {
            ArrayList array = new ArrayList();
            char [][] twoDimesionArray = null;
            try
                JFileChooser fileChooser = new JFileChooser();
                if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
                    File file = fileChooser.getSelectedFile();
                    BufferedReader reader = new BufferedReader(new FileReader(file));
                    String data;
                    //Read from file
                    while ((data = reader.readLine()) != null)
                        //Convert data to char array and add into array
                        array.add(data.toCharArray());
                    reader.close();
                    //Creating a 2D char array base on the array size
                    twoDimesionArray = new char [array.size()][];
                    //Convert array from ArrayList to 2D array
                    for (int i = 0; i < array.size(); i++)
                        twoDimesionArray[i] = (char [])array.get(i);
                    //Test the 2D Array
                    for (int y = 0; y < twoDimesionArray.length; y++)
                        char [] temp = twoDimesionArray[y];
                        for (int x = 0; x < temp.length; x ++ )
                            System.out.print(temp[x]);
                        System.out.println("");
            catch (Exception ex)
                ex.printStackTrace();
    }

  • How to create a txt file, load it, modify it and then save it again?

    Hello everyone!
    I have a question and I hope you'll help me.
    I'd like to create a txt file (please see attached pdf file) but I don't know how. I've tried many methods but it's not working 
    The user should be able to change the parameters (for example "Time", "Time Type" ...etc) and the corresponding values from the Front Panel.
    The number of section (Begin Line......End Line)  is 128.  Means, the final file should contain  "Begin Line1....End Line1"   till  "Begin Line128....End Line128".
    Please, take a look at the attached file to see how does the structure of the file look like.
    Note:  the seperator between a parameter (example, "Time") and its value (example, "7" in the section "Begin Line1....End Line1") is a colon( " : " ) and not an equal (" = ").
    Thank you very much for your help.
    Best regards
    Attachments:
    Batch File.pdf ‏8 KB

    Hi
    thanks for your answers.
    I'm using LV 8.2  and my file should be saved in txt.
    Initially the file doesn't exist. So, the user choose the parameters and their values from the Front Panel
    and then hit a button to create that file. The user should be able to reload (Front Panel button) the created file, modify it or not and then resave it.
    Before hitting the "create file" button the user define (on the Front Panel)  the number of sections ("Begin Line.....End Line") to be created.
    I joined a VI here just to explain the idea. May be that can help you to help me.
    I appreciate yoyur help!
    Kabanga
    Attachments:
    Create batch file.vi ‏14 KB

  • Newbie - Problem exporting vob file in Toast 7

    Grateful for any help here - am a newbie and getting v confused.
    I have recorded from a small cam recorder of a friend of mine onto dvd R since it didnt have firewire.
    Was hoping to then be able to edit it in iMovie but it couldnt read the file.... then after searcing around forum saw that people recommended Toast 7 to do this conversion and that the problem is that the file is a .vob file and i need .dv??? for iMovie (am i correct?).
    Bought program for $80 which seemed pretty steep then followed instuction from forum to drag on to video box but for some reason the export button is never highlighted so cant follow instructions
    Guess there is something real dumb that i am doing but cant spot it since this is all a bit new to me

    In order to read a .vob file once it has been decrypted from a DVD, you will need something like the QuickTime MPEG-2 plug-in, which is a separate purchase (because of licensing considerations) from Apple. Check out this link:
    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wo/0.RSLID?mco=B E1CED27&nplm=D2187Z%2FA
    For more information on pulling video off of a DVD, check out this link:
    http://danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    If you find this helpful or if it solves your issues, please indicate this by clicking the appropriate icon in the header of this reply.

Maybe you are looking for

  • Using a different default component state within each page state

    I am using a custom component in multiple page states but would like to have a different default state (for the same custom component) within each page state. Is there anyway to use a different default component state within each page state . When I

  • Can't open Pagemaker 6.5 files in ID CS2 - Vista

    I was running ID CS2 on a Windows XP Pro system and had no problems opening Pagemaker 6.5 files. That system recently suffered a processor demise that affected the motherboard and forced me to start over with a new system that's now running Vista Hom

  • Captivate5: I'd like to take the user to a certain page after pausing.

    Cap5, Output SWF. When a user exits from the course, bookmarking takes him back to the slide last viewed. But I'd like to take him to another page as soon as he continues to work with this project. Any advanced action or variable available like "on r

  • Compund primary key in entity bean

    hi, can somebody please explain how to use the compound primary key in entity beans? i have got a database table, the key of which consists of three fields, which I assign as PK when setting up the entity bean. In turn I get a compoundPK class, but w

  • SQL limit and group rows

    Hi, I have two tables with 1 to n relationship. StudentTable ========== ID NAME 1 John 2 Mary 3 Peter SubjectTable ========= SID Subject 1 Maths 2 English 3 Science The above two tables are connected with this table StudentDetials ========== ID(Stude