Setting size JScrollPane inside a JSplitPane

Hi,
In my program I want to have two panels, one above the other. The first panel will contain a row of objects that will be dynamically generated. These objects will have an unchangeable height, which I only know after construction. The second panel, below the first panel, will contain a column of objects, which will also be dynamically generated. These objects will take up almost the screen width.
The following code explains what I am trying to accomplish here.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JSplitPaneProblem extends JPanel
implements ActionListener {
     static Color background;
     static String [] csdEngineers = { "jdoe1", "jdoe2", "jdoe3", "jdoe4", "jdoe5",
          "jdoet", "amacadam" };
     static String [] engineers = { "Choose one", "jdoe1", "jdoe2", "jdoe3", "jdoe4", "jdoe5",
          "jdoet", "amacadam" };
     static int width;
     static int height;
     static int remainingWidth;
     static int insets;
     static int labelWidth;
     static JScrollPane problemPane;
     static JPanel problemPanel;
     static int BIGNUMBER = 1;
     public JSplitPaneProblem () {
          setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
          //Get the image to use.
          ImageIcon trafficLight = createImageIcon("trafficlight.gif");
          JLabel trafficLightLabel = new JLabel (trafficLight);
          if (trafficLight != null) {
               width = trafficLight.getIconWidth();
               height = trafficLight.getIconHeight();
          else {
               width = 100;
               height = 300;
          trafficLightLabel.setPreferredSize(new Dimension (width, height + 50));
          //Set up the scroll pane.
          JScrollPane trafficLightPane = new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER,
                    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
          JPanel trafficLightPanel = new JPanel();
          trafficLightPanel.setLayout(new BoxLayout(trafficLightPanel, BoxLayout.LINE_AXIS));
          for (int i=0; i < BIGNUMBER; i++) {
               trafficLight = createImageIcon("trafficlight.gif");
               trafficLightLabel = new JLabel (trafficLight);
               trafficLightPanel.add(trafficLightLabel);
          trafficLightPane.setViewportView(trafficLightPanel);
          trafficLightPane.setPreferredSize(new Dimension(width, height));
          trafficLightPane.setMinimumSize(new Dimension(width, height));
          Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
          width = dimension.width;
          height = 36;
          insets = 4; // Number of pixels to left and/or right of a component
          labelWidth = 40;
          setBounds (0, 0, dimension.width, dimension.height);
          // Set up the problem panel.
          JScrollPane problemPane = new JScrollPane (ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
                    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
          problemPanel = new JPanel();
          // And a new problem pane, to which the problem panel is added
          problemPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
          problemPane.setViewportView(problemPanel);
          // Set up the JSlitPane
          JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,trafficLightPane,problemPane);
          splitPane.setOneTouchExpandable(true);
          add(splitPane);
      * The screen is divided in two equal sized halves, a left and a right side. Each
      * half is divided into 3 parts. remainingWidth is used to calculate the remaining
      * width inside a half.
     public static JPanel addProblem (String organisation, String problem) {
          JPanel panel = new JPanel (); // JPanel has FlowLayout as default layout
          panel.setPreferredSize(new Dimension (width, height));
          // First half, containing serverId, customer name, and problem title
          // serverId
          JTextArea serverId = new JTextArea ("99999");
          Font usedFont = new Font ("SanSerif", Font.PLAIN, 12);
          serverId.setFont(usedFont);
          serverId.setPreferredSize(new Dimension(labelWidth, height));
          serverId.setBackground(background);
          panel.add(serverId);
          // Organisation name. Gets 1/3 of remaining width
          remainingWidth = (width/2 - (int)serverId.getPreferredSize().getWidth())/3 - insets;
          JTextArea organisationArea = new JTextArea (organisation);
          organisationArea.setPreferredSize(new Dimension (remainingWidth, height));
          organisationArea.setAlignmentX(SwingConstants.LEFT);
          organisationArea.setBackground(background);
          organisationArea.setLineWrap(true);
          organisationArea.setWrapStyleWord(true);
          organisationArea.setEditable(false);
          panel.add(organisationArea);
          // Problem title
          JTextArea problemArea = new JTextArea (problem);
          problemArea.setPreferredSize(new Dimension (remainingWidth*2, height));
          problemArea.setBackground(background);
          problemArea.setLineWrap(true);
          problemArea.setWrapStyleWord(true);
          problemArea.setEditable(false);
          panel.add(problemArea);
          // Second half, containing severity, CSD and Engineer
          // Severity
          JTextArea severity = new JTextArea ("WARN");
          severity.setFont(usedFont);
          severity.setBackground(background);
          severity.setPreferredSize(new Dimension(labelWidth, height));
          panel.add(severity);
          // CSD
          JLabel csdField = new JLabel("CSD:");
          csdField.setFont(usedFont);
          JComboBox csdList = new JComboBox(csdEngineers);
          csdList.setFont(usedFont);
          csdList.setSelectedIndex(6);
          // csdList.addActionListener(this);
          panel.add(csdField);
          panel.add(csdList);
          // Solver, another ComboBox
          JLabel engineerField = new JLabel("Solver:");
          engineerField.setFont(usedFont);
          JComboBox engineerList = new JComboBox(engineers);
          engineerList.setFont(usedFont);
          engineerList.setSelectedIndex(0);
          // engineerList.addActionListener(this);
          panel.add(engineerField);
          panel.add(engineerList);
          // Empty panel to be added after this panel
          JPanel emptyPanel = new JPanel();
          emptyPanel.setPreferredSize(new Dimension (width, 15));
          return panel;
      * ActionListener
      * @param args
     public void actionPerformed(ActionEvent event) {
          System.out.println ("Burp");
     private static ImageIcon createImageIcon(String path) {
          java.net.URL imgURL = JSplitPaneProblem.class.getResource(path);
          if (imgURL != null) {
               return new ImageIcon(imgURL);
          } else {
               System.err.println("Couldn't find file: " + path);
               return null;
     private static void createAndShowGUI() {
          //Create and set up the window.
          JFrame frame = new JFrame("JSlitPaneProblem");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          // Set the size of the window so in covers the whole screen
          Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
          frame.setBounds (0, 0, dimension.width, dimension.height);
          //Create and set up the content pane.
          JComponent newContentPane = new JSplitPaneProblem();
          newContentPane.setOpaque(true); //content panes must be opaque
          frame.setContentPane(newContentPane);
          //Display the window.
          //frame.pack();
          frame.setVisible(true);
          // Add panels
          problemPanel.setPreferredSize(new Dimension(dimension.width, dimension.height - height));
          for (int j=0; j < BIGNUMBER; j++) {
               problemPanel.add(addProblem("Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch Computer Shop",
               "expected string or buffer, but that is not everyting, as this problem description is extremely long. And as I am chatty, I add some more length"));
               JPanel emptyPanel = new JPanel();
               emptyPanel.setPreferredSize(new Dimension (width, 15));
               problemPanel.add(addProblem("My Company", "I have no problem"));
     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();
}If you want to try it out with the trafficlight.gif mentioned in the code, get it from
http://www.hermod.nl/images/trafficlight.gif
The problem I have with the current code is that in the following line
trafficLightLabel.setPreferredSize(new Dimension (width, height + 15));I try to set the size of the top panel, but the program disregards what I instruct it to do.
When BIGNUMBER = 1, you will see that part of the bottom of the image is not shown.
Can you help me?
Abel
Edited by: Abel on Feb 27, 2008 2:20 PM
Added
static int BIGNUMBER = 1; and where it is used. If you want to play with the program, change BIGNUMBER to for instance 10

Found it. Add
splitPane.resetToPreferredSizes();as last instruction in createAndShowGUI().

Similar Messages

  • Set size JPanel inside a JFrame

    I�m trying to set the size of a custom JPanel inside of a custom JFrame
    my code looks like this
    public class myFrame extends JFrame
        public myFrame()
         //This set the size of JFrame but i dont want this
            //setSize(300,600);
            //add panel to frame
            MyPanel panel = new myPanel();
            Container contentPane = getContentPane();
            contentPane.add(panel);
    class MyPanel extends JPanel
         public MyPanel()
              setSize(300, 600); //This don�t work, why??
              validate();
    }Why wont setSize(300, 600) work inside class myPanel ???

    @Op
    You need to read a tutorial on layout managers. It looks like you don't know how they work.
    The panel should call setPreferredSize, and the frame should call pack just before you are displaying the frame.
    Kaj

  • Set size of jPanel

    Hi i've create a jForm in netbeans. To this I have added a scrollpane containing a jPanel called PrintPreview. (I have to do this rather than use the automated preview of printUtilities because of some items I need removed from the original jPanel before printing).
    I need to set the size of the PrintPreview jPanel as it's instantiated. I have the dimensions created from another class called "Gbl".
    In the constructor is the following:
    /** Creates new form PrintPreview */
    public PrintPreview() {
    PreviewPanel.setPreferredSize(new Dimension(Gbl.previewWidth,Gbl.previewHeight);
    PreviewPanel.setMaximumSize(new Dimension(Gbl.previewWidth,Gbl.previewHeight);
    PreviewPanel.setMinimumSize(new Dimension(Gbl.previewWidth,Gbl.previewHeight);
    Window.pack();
    initComponents();
    this.setLocationRelativeTo(null);
    // ADD CODE - COLLECT DRAWING FROM ARRAY
    PreviewPanel.repaint();
    I would like the jPanel set to these dimensions however I would also like the scrollPane to remain at it's standard size so I can scroll the diagram as necessary.
    Could you please tell me where I am going wrong? The three setSize lines are flagged as erroneous. The dimensions are int and have tried double.
    Any advice is good...
    Thanks

    Ok I'm going to add onto this thread because it still relates to the original problem. setting size of jPanel.
    Some details first:
    OS - Ubuntu Gutsy 7.10
    Kernel - 2.6.22-14-generic
    NB - v5.5.1
    Java version - java version "1.5.0" / gij (GNU libgcj) version 4.2.1 (Ubuntu 4.2.1-5ubuntu5)
    Research:
    I have been trawling the net for days trying to resolve this but I am struggling to find anything specific to my problem. I keep finding general methods using given NB facilities. I've also scoured a couple of my Java books but of course they're not totally relevant to NetBeans. I've practiced using the forum this afternoon to find things but with my lack of knowledge using both forums and java has left me a little bamboozled. I've been working on this problem for a couple of days now and achieved very little.
    My specific problem is this:
    I have a JFrame GUI. Inside that I have a jTabbedPane containing a jScrollPane containing a jPanel. I would like to have the jPanel display at A4 size relevant to the screen it is displayed on. e.g. I have a separate global class "Gbl" that calculates the dimensions based on current dpi and then creates the necessary measurements to feed to my preferred size function.
    I have tried implementing the preferred size method to the constructor and have also tried adding it to all four ways to enter bespoke code to NetBeans' autogenerated code. (Pre-init, Post-init, Pre-creation and Post-creation code) To no avail. Nothing changes on screen.
    The code I am trying to enter is as follows:
    // Set preferred size of user-drawing-area (jPanel1)
    jPanel1.setPreferredSize(new java.awt.Dimension(600,500));
    jPanel1.setMaximumSize(new java.awt.Dimension(600,500));
    jPanel1.setMinimumSize(new java.awt.Dimension(600,500));
    // Set preferred size of jPanel1 container (jScrollPane1)
    jScrollPane1.setPreferredSize(new java.awt.Dimension(600,500));
    jScrollPane1.setMaximumSize(new java.awt.Dimension(600,500));
    jScrollPane1.setMinimumSize(new java.awt.Dimension(600,500));
    // Set preferred size of the jScrollPane1 container (mainTabView(Tabbed pane))
    mainTabView.setPreferredSize(new java.awt.Dimension(600,500));
    mainTabView.setMaximumSize(new java.awt.Dimension(600,500));
    mainTabView.setMinimumSize(new java.awt.Dimension(600,500));
    I am using absolute values here to omit any error getting the variables from my Global class. If it works I will add them and test again.
    Ideally, I would like the jPanel to be set to an A4 size yet have the containers at a smaller more "screen-manageable" size (With scroll bars). Then if the GUI is maximized, then it only expands to the full size of the A4 sized jPanel if possible.
    Of course, this may not be possible or there may be a far better method for doing this, however I am really stumped. I've had some good advice this afternoon of whihc has opened may eyes some. Although, I have made no headway so far. I hope the above follows site-rules and gives enough information to resolve this issue. I'm losing hair rapidly!
    I'm grateful for any advice given. Thank You

  • JLayeredPane with JScrollPane inside

    Hi all,
    I am making an applet with a fairly complex gui. The main part is a content window that has a jpanel with another jpanel and a jscrollpane inside, each of which have a bunch of components. From there I wanted to add a help window that popped up when you hit the help button. What I did is I got the JLayeredPane from the applet using getLayeredPane(), and I added the help window to the popup layer, and the content window to the default layer. I'm using a null layout and manually setting the bounds of everything. All the panels draw correctly, but when I open the help window, it displays inside the JScrollPane; i.e. it moves when I scroll, and the contents of the scroll pane are displayed on top of the help window. Here is some of my code, if I wasn't clear:
              //this grabs the applet's layered pane. The wrapper pane (with all the traces)
              //is on the default layer, and the help window (and any other popups) will go in the popup layer
              appletLayered = getLayeredPane();
              appletLayered.setLayout(null);
              //create the help window that will be displayed when someone presses help
              helpWindow = new HelpWindow(getCodeBase().toString());
              appletLayered.add(helpWindow, JLayeredPane.POPUP_LAYER);
              helpWindow.setBounds(50,50,400,450);
              appletLayered.add(wrapperPane, JLayeredPane.DEFAULT_LAYER);
              wrapperPane.setBounds(0,20,700,550);Does anyone know why it is doing this? Should I just do this whole thing a different way, or is there an easy solution that I'm missing.

    Swing related questions should be posted in the Swing forum.
    From there I wanted to add a help window* that popped up when you hit the help button.Then use a JDialog (or a JWindow), not a layered pane.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.

  • Essbase Error:Set is too large to be processed. Set size exceeds 2^64 tuple

    Hi,
    we are using obiee 11.1.1.6 version with essbase 9.3.3 as a data source . when I try to run a report in obiee, I am getting the below error :
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 96002] Essbase Error: Internal error: Set is too large to be processed. Set size exceeds 2^64 tuples (HY000)
    but if I run the same query in excel add in, I am just getting 20 records . wondering why I am getting this error in obiee . Does any one encountered the same issue ?
    Thanks In advance,

    Well if you want to export in I think you have to manually do it.
    The workaround it to open your aperture library by right clicking it and show contents...
    Then go into your project right click show contents...
    In here there are sub folders on dates that the pictures were added to those projects. If you open the sub folder and search for your pictures name it should be in that main folder.
    You can just copy it out as you would any normal file to any other location.
    Voila you have manually exported out your file.
    There is a very similar post that has been close but again you can't export the original file that you are working on - FYI http://discussions.apple.com/thread.jspa?threadID=2075419

  • What is the need for setting property data inside the JMSMesage

    Hi
    Could anybody please let me know
    *What is the need for setting property data inside the JMSMesage??
    For example i have a seen a similar example as shown ??
    I have seen a
    Message.setStringProperty("Sport","Basketball");
    and also please tell me how can the MDB recievies this property data ??
    Thanks in advance .

    raviprivate wrote:
    Could anybody please let me know
    *What is the need for setting property data inside the JMSMesage??
    For example i have a seen a similar example as shown ??
    I have seen a
    Message.setStringProperty("Sport","Basketball"); Look at the detail JMS documentation on [Message Properties|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html] .
    >
    and also please tell me how can the MDB recievies this property data ?? MDB onMessage method argument is the Message object and if you look at the documentation, Message interface has getter methods to retrieve the properties.

  • How i can set size of editor at runtime?

    dear all,
    How i can set size of editor at runtime?
    The size of editor is good when I run form on windowX but so small on web . why? have any body call tell me how i can do?
    thank for advance

    Hi there,
    You can use the builtin EDIT_TEXTITEM.
    You can pass x-pos, y-pos, width and height as parameters to that.
    Hope this helps

  • Circular and oval cropping at set size and resolution?

    I know how to use the M tool to create circles and ovals and i know you can set that to certain dimensions, but that doesn't do everything I need.
    How do you crop circles and ovals out of a photo, at a set size (for example, a 1 inch circle ) at a set resolution for printing?  What I need to do is crop circular and oval images out of a photo, say at 250 dpi, then paste them onto a blank white page for printing.
    So if I've got let's say a photo that's 14x10 inches at 300dpi, I want to be able to go in, crop out an oval or circle, with as much or as little of the photo that I can or want to, setting that automatically to a certain dimension and dpi, then paste it into a blank white page I've already created at that same d
    When finished I'd have maybe 20 or 30 images on a page that I can flatten all the layers and print.
    I can't find a way to set size and resolution with anything other than the regular square crop tool.

    You can make an action and use it as one step automation to achieve that on an initial selection.
    Step by step instructions:
    With the Elliptical Marquee Tool, make the desired selection on a image.
    Open the Actions panel (Window > Actions (Alt+F9), from its menu at the top right or corresponding buttons at the bottom, choose New Action, and in the dialog that appears press the Record button.
    From the Image menu, choose Crop.
    From the Selection menu, choose Inverse (Ctrl+Shift+I)
    Press the d key on your keyboard to reset the foreground/background color swatches.
    Press Ctrl + Delete keys on your keyboard to fill with white.
    From the Image menu, choose Image Size (Ctrl+Alt+I), make sure the Resample Image is checked, and in the Document Size section enter the desired dimensions and resolution and press OK.
    In the Actions Panel press the Stop Recording button.
    Now you can copy or drag the image to another image.
    For the next image make the oval selection, go to the Actions panel, select the actions you created above, and press the play button. You can also create a keyboard shortcut in the action's property accessible by double clicking the action.
    The creation of this action assumes that in the final image you will be composing oval images on white background without overlapping their rectangular bounding boxes. If you plan to overlap them then the action must be modified to make the image a transparent layer and delete outside the oval instead of filling with white.

  • Record set size in Gantt Chart

    Hi all,
    I am developing an application that has a Gantt Chart.
    The tree drawn is a 2 level tree. I have two VOs.
    The second VO (Child) has more than 20 rows. I want to show only 10 child at once.
    Record set size attribute is the one that is used to restrict the size of the number of nodes displayed. Just like in HGRID.
    But when the graph is rendered the values that I give are being ignored and the entire graph is rendered.
    Any pointers or suggestions on this will be really helpful.
    Regards,
    Santhosh.

    Hi Santosh,
    As Anand suggested to add the "rownum <= 10" condition to limit the record set.
    But this condition should be set in View Link SQL(Query where clause).
    I hope this will work.
    Thanks
    Renu

  • How programmatically set size of report element in Java

    In topic
    [How programmaticaly set size of some field?|How programmaticaly set size of some field?]
    someone changing programmatically report element, but I think this part of code
    is in .NET framework
    For example I mean something like following snippet
    BoxObject box = (BoxObject) reportClientDocument
    .getReportDefController().findObjectByName("headerBox");
    BoxObject newBoxObject=new BoxObject(box);
    Border border=new Border();
    border.setBorderColor(new Color(255,255,255));
    newBoxObject.setBorder(border);
    newBoxObject.setFillColor(new Color(255,255,255));
    reportClientDocument
    .getReportDefController().getReportObjectController().modify(box, newBoxObject);
    Why I think this is in .NET framework because java object "ReportClientDocument" don't have "getReportDefController()" method (I donu2019t know .NET).
    What I want to do, I want to take "Details" (part of report) and change size.
    If there is no way to take "Details" how can I take other report element e.g. Text Object

    Ernest,
    What enviroment are you working in? Because my ReportClientDocument object does have the getReportDefController method. How are you declaring your object?
    Try something like:
    private static com.crystaldecisions.sdk.occa.report.application.ReportClientDocument myRCD;
    BoxObject box = (BoxObject) myRCD.getReportDefController().findObjectByName("headerBox");
    Cheers
    Darren

  • Make it open at set size?

    Is it possible to make the QT player open pre-existing files at a set size?
    Thanks.

    Hi, Rick
    It's possible.
    You can either use SimpleMovieX or QuickTime Pro.
    (Note that I'm the developer of SimpleMovieX).
    If you accept to create a separate file, you resize the movie with View > Resize Movie, then save a reference movie with File > Save RefMovie.
    The new file takes only a few kilobytes and links to the original. It opens at the size that you have set.
    If you want to keep the same file as original, it has to be a QuickTime mov file.
    You do View > Resize Movie, then File > Save.
    If you cannot or don't want to overwrite the original size, then it's not possible.
    Regards, BJ

  • Set size and location of  a component

    Hello,
    Does anyone familiar with this org.netbeans.lib.awtexttra.AbsoluteConstraints(). I want to set the size and location of the component, and I know this org netbeans can provide this function.
    getContentPane().add(chkTausta, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 120, -1, -1));
    chkRakkennus.setSelected(true);
    chkRakkennus.setText("Rakennukset");
    then it comes an error that org.netbeans.lib.awtextra.AbsoluteConstraints()cannot be resolved. Does anyone know what�s the reason. Do I have to download other version of Java. I have Jre1.6.0?
    Does anybody knows is there another way to set size of component. For example, if I use borderlayout, and put a button to the west, then how can I set the location and size of the button?
    Thanks a lot for you help.
    Clare

    org.netbeans.lib.awtextra.AbsoluteConstraints isn't part of the JDK. I suggest you don't use that at all. Let a LayoutManager do the resizing.
    Have a look at the [Layout tutorial|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html] especially gridBagLayout

  • Setting size of Label!!!

    I have problem in setting size of label. Actually I have atttached some labels in a pannel. I want to set different size for each label. I there any way i can explicitly set the size of labels.
    Thanx in advance.

    The layout manager you use wont necessarily let you do that... Call first setLayout(null), and only then setSize and setLocation if you want to layout the components yourself.

  • ORA-19510: failed to set size with ORA-27059: could not reduce file size

    Hi,
    I have RMAN backup implemented and getting below error.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on c1 channel at 01/12/2014 04:28:37
    ORA-19510: failed to set size of 12839996 blocks for file "/home/oracle/DBBACKUP/Oracle10g1/Full_Backup/DB_Backup_201401128366598241" (blocksize=16384)
    ORA-27059: could not reduce file size
    Linux Error: 28: no space left on device
    Additional information: 2
    I have checked with following scenarios:
    1. taking backup by setting the MAXSETSIZE parameter value greater than the maximum size of tablespace.
    2. taking compressed incremental backup with maxsetsize as unlimited.
    3. taking compressed incremental backup with maxpiecesize value as 20G/40G/80G/120G and maxsetsize as unlimited.
    Following is the RMAN backup script:
    RMAN> run
    2>  {
    3>  allocate channel c1 device type disk maxpiecesize 120G
    4>  format '/home/oracle/DBBACKUP/Oracle10g1/Full_Backup/DB_Backup_%Y%M%D%t%p';
    5>  backup incremental level 0 as compressed backupset database plus archivelog delete input;
    6>  crosscheck backup of database;
    7>  crosscheck backup of controlfile;
    8>  crosscheck archivelog all;
    9>  delete noprompt expired backup of database;
    10>  delete noprompt expired backup of controlfile;
    11>  delete noprompt obsolete recovery window of 15 days;
    12>  release channel c1;
    13>  }
    14> exit;
    Oracle database version is 10.2.0.1.
    The database is on Linux system and we are taking the RMAN backup on mounted Windows NTFS disk.
    The remaining space on NTFS system 1.7TB and the total database size 850GB. Used size by database is 500GB.
    Regards,
    Yogesh.

    Hi,
    First get the backup piece size its trying to allocate for file "/home/oracle/DBBACKUP/Oracle10g1/Full_Backup/DB_Backup_201401128366598241"
    = 12839996*16384
    = 210370494464/1024/1024/1024
    =195.9GB
    Its trying to allocate ~196GB for the file.
    1. Make sure the RMAN backup piece won’t exceed the O/S permitted filesize limit.
    2. But we can restrict the RMAN backup piece using the MAXPIECESIZE option.
    You restricted it to 120GB but actual requirement to allocate backup piece file is ~196GB.
    I think you need to change the MAXPIECESIZE and give it a try.
    Please update if it succeeded or failed.
    Thanks & Regards,
    Gayu

  • ORA-19510 failed to set size of 12288 blocks for file "/sisdev01/dbs/log01b.dbf

    My company's harddisk has corrupted and files under /sisdev01/dbs/ cannot list and don't have any backup, then I have to create a new database again after changing the disk and recovering the data. I plan to reuse the /sisdev01/dbs/ as following.
    I fail in creating database by using the following script:
    CREATE DATABASE SISDEV01
         LOGFILE GROUP 1 '/sisdev01/dbs/log01a.dbf' SIZE 10M
         ,     GROUP 1 '/sisdev01/dbs/log01b.dbf' SIZE 10M
         ,     GROUP 2 '/sisdev01/dbs/log02a.dbf' SIZE 10M
         ,     GROUP 2 '/sisdev01/dbs/log02b.dbf' SIZE 10M
         NOARCHIVELOG
         CHARACTER SET ZHT16BIG5
         NATIONAL CHARACTER SET ZHT16BIG5
         DATAFILE '/sisdev01/dbs/system01.dbf'      
              SIZE 210M AUTOEXTEND OFF
         , '/sisdev01/dbs/rbs01.dbf'
    SIZE 105M AUTOEXTEND OFF
         , '/sisdev01/dbs/temp01.dbf'
    SIZE 105M AUTOEXTEND OFF
         , '/sisdev01/dbs/users01.dbf'
    SIZE 1050M AUTOEXTEND OFF
         , '/sisdev01/dbs/ts_index_ivr01.dbf'
    SIZE 105M AUTOEXTEND OFF
         , '/sisdev01/dbs/ts_ivr01.dbf'
    SIZE 21M AUTOEXTEND OFF
         , '/sisdev01/dbs/ts_ems01.dbf'
    SIZE 21M AUTOEXTEND OFF
         , '/sisdev01/dbs/ts_index_ems01.dbf'
    SIZE 21M AUTOEXTEND OFF
    but I receive error message:
    CREATE DATABASE SISDEV01
    ORA-01501: CREATE DATABASE failed
    ORA-19510: failed to set size of 12288 blocks for file "/sisdev01/dbs/log01b.dbf
    " (blocksize=512)
    ORA-27059: skgfrsz: could not reduce file size
    IBM AIX RISC System/6000 Error: 28: No space left on device
    Additional information: 1
    ORA-19502: write error on file "/sisdev01/dbs/log01b.dbf", blockno 8193 (blocksi
    ze=512)
    ORA-27063: skgfospo: number of bytes read/written is incorrect
    IBM AIX RISC System/6000 Error: 28: No space left on device
    Additional information: -1
    Additional information: 524288
    Here is the content of my parameter file:
    db_file_multiblock_read_count = 8 # SMALL
    # db_file_multiblock_read_count = 16 # MEDIUM
    # db_file_multiblock_read_count = 32 # LARGE
    # db_block_buffers = 60 # SMALL
    db_block_buffers = 550 # MEDIUM
    # db_block_buffers = 3200 # LARGE
    # shared_pool_size = 3500000 # SMALL
    shared_pool_size = 5000000 # MEDIUM
    # shared_pool_size = 9000000 # LARGE
    log_checkpoint_interval = 10000
    processes = 400 # SMALL
    # processes = 100 # MEDIUM
    # processes = 200 # LARGE
    dml_locks = 100 # SMALL
    # dml_locks = 200 # MEDIUM
    # dml_locks = 500 # LARGE
    # log_buffer = 8192 # SMALL
    log_buffer = 32768 # MEDIUM
    # log_buffer = 163840 # LARGE
    # audit_trail = true # if you want auditing
    # timed_statistics = true # if you want timed statistics
    max_dump_file_size = 10240 # limit trace file size to 5 Meg each
    # Uncommenting the line below will cause automatic archiving if archiving has
    # been enabled using ALTER DATABASE ARCHIVELOG.
    log_archive_start = false
    log_archive_dest = /u01/sisdev01_arch
    log_archive_format = arch%s.dbf
    # If using private rollback segments, place lines of the following
    # form in each of your instance-specific init.ora files:
    rollback_segments = (r01, r02)
    # If using public rollback segments, define how many
    # rollback segments each instance will pick up, using the formula
    # # of rollback segments = transactions / transactions_per_rollback_segment
    # In this example each instance will grab 40/10 = 4:
    transactions = 40
    transactions_per_rollback_segment = 10
    # Global Naming -- enforce that a dblink has same name as the db it connects to
    global_names = TRUE
    # Edit and uncomment the following line to provide the suffix that will be
    # appended to the db_name parameter (separated with a dot) and stored as the
    # global database name when a database is created. If your site uses
    # Internet Domain names for e-mail, then the part of your e-mail address after
    # the '@' is a good candidate for this parameter value.
    # db_domain = us.acme.com # global database name is db_name.db_domain
    # define two control files by default
    # control_files = (/sisuat02/dbs/ctl01.ora,/sisuat02/dbs/ctl02.ora)
    control_files = (/sisdev01/dbs/ctl01.ora,/sisdev01/dbs/ctl02.ora)
    DB_NAME=sisdev01
    DB_BLOCK_SIZE=8192
    # DB_BLOCK_LRU_LATCHES=4
    DB_FILES=500
    DB_DOMAIN=shk.sony.com.hk
    background_dump_dest = /u01/dba/sisdev01/log
    user_dump_dest = /u01/dba/sisdev01/log
    NLS_LANGUAGE="traditional chinese"
    NLS_TERRITORY="hong kong"
    NLS_CURRENCY="HK$ "
    NLS_DATE_FORMAT="DD/MM/YYYY"
    NLS_NUMERIC_CHARACTERS=".,"
    utl_file_dir = *
    compatible = 8.1.5
    remote_os_authent = TRUE
    sort_area_size = 65536
    sort_area_retained_size = 65536
    It always fail during creation of logfile log01b.dbf.
    I have tried to send same size logfiles to the directory but it fails too when inserting the second logfile log01b.dbf too.
    NETOUT: 10054452 Error writing file: Error 0
    Can anyone kindly help me?

    This may be a blindingly obvious question but do you have sufficient disk space on /sisdev01/dbs/ partition?

Maybe you are looking for