Jtable - TableModel Problem while setting rowcount

I have a TableModel which extends from defaulttablemodel
I have a method to set new rows size.
First to call setRowCount I re-create the 'data' Object, that initially has 5 x 5 elements
If I call my function wiht 8 x 5, I get the next fail :
java.lang.ArrayIndexOutOfBoundsException: 5 >= 5
     at java.util.Vector.elementAt(Unknown Source)
     at javax.swing.table.DefaultTableModel.justifyRows(Unknown Source)
     at javax.swing.table.DefaultTableModel.setNumRows(Unknown Source)
     at javax.swing.table.DefaultTableModel.setRowCount(Unknown Source)
     at geocost.Wtable.w_setrows(Wtable.java:66)
The code is something like this :
public void w_setrows(int rows, int cols) {
TableModelo.w_Gen_Object(rows,cols);     
TableModelo.setRowCount(rows); ( this is the line 66 )
private void w_Gen_Object(int numRows,int numCols){                           
data = new Object[numRows][numCols];
for (int i=0; i < numRows; i++) {                
for (int j=0; j < numCols; j++) {
     data[i][j]="";
Whats wrong ?
Thank you

I'm going to explain a little more my problem :
I'm developing a Jtable Bean, and I want to have an initial control on the number of columns and rows that are going to be view.
My tablemodel has a getValueAt
public Object getValueAt(int row, int col) {
             return data[row][col];             
        }Initially my data object has, by default, 5 x 5 elements. and all is work fine
The Jtable is correctly viewed.
If I want to have a 7 x 5 model I :
1.- I redefine the data object to 7 rows x 5 columns, and it is ok .
2.- I set the rowcount to 7
At this point at I get the :
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at org.eclipse.ve.internal.java.vce.launcher.remotevm.JFCLauncher$1.run(JFCLauncher.java:59)
     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 5 >= 5
     at java.util.Vector.elementAt(Unknown Source)
     at javax.swing.table.DefaultTableModel.justifyRows(Unknown Source)5
IWAV0052E Invocation Target Exception creating geocost.Wtable
     at javax.swing.table.DefaultTableModel.setNumRows(Unknown Source)
     at javax.swing.table.DefaultTableModel.setRowCount(Unknown Source)
I must to fire something ? What more I must write ?

Similar Messages

  • New problem while setting ADS password

    Hi,
    Im trying to change password in ADS. Ultimately it has to be done via web interface but i was trying it out on my local machine, which has windows 2000. I got the following exception as a result. Any ideas?
    This is my code section ...
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
    env.put(Context.PROVIDER_URL, "ldap://10.2.0.22:636/");
    env.put(Context.SECURITY_AUTHENTICATION,"simple");
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    env.put(Context.REFERRAL,"ignore");
    env.put(Context.SECURITY_PRINCIPAL,"[email protected]");
    env.put(Context.SECURITY_CREDENTIALS,"Password1");
    DirContext dctx = null;
    try
    dctx = new InitialDirContext( env );
    The following is the exception i got ...
    javax.naming.CommunicationException: simple bind failed: 10.2.0.22:636 [Root exception is javax.net.ssl.SSLProtocolExcep
    tion: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.]
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:198)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:80 )
    at updtpass.main(updtpass.java:34)
    Caused by: javax.net.ssl.SSLProtocolException: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus s
    ize.
    at com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg.<init>(Dasho A12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:390)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:334)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:193)
    ... 12 more
    Caused by: java.security.cert.CertificateParsingException: java.io.IOException: subject key, Unknown key spec: Invalid R
    SA modulus size.
    at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:155)
    at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1679)
    at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:173)
    at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:90 )
    at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.ja va:389)
    ... 24 more
    Caused by: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.
    at sun.security.x509.X509Key.parse(X509Key.java:155)
    at sun.security.x509.CertificateX509Key.<init>(CertificateX509Key.java:58)
    at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:706)
    at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:153)
    ... 28 more
    Exception in thread "main" java.lang.NullPointerException
    at updtpass.main(updtpass.java:61)

    I am also facing a peculiar type of problem while setting the password
    the type of error I am while running the code below
    String adminName = "CN=xyz,CN=Users,DC=TESTING, DC=AMG, DC=COM";
    String adminPassword = "xxxxxxx";
    String ldapURL = "ldap://testing.amg.com:636";
    String keystore = "/Program Files/Java/jre1.5.0_03/lib/security/cacerts";
    System.setProperty("javax.net.ssl.trustStore",keystore);
         env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.SECURITY_AUTHENTICATION,"simple");
    env.put(Context.SECURITY_PRINCIPAL,adminName);
    env.put(Context.SECURITY_CREDENTIALS,adminPassword);
    ERROR :
    Problem searching directory: javax.naming.CommunicationException: simple bind failed: testing.amg.com:636 [Root exception is java.net.SocketException: connection is closed]
    Can any body please help me out how to overcome it.
    waiting
    Bye
    Irshad

  • HT201210 Facing a problem while setting MAC 6.1. My version is 5.1. The activation does not complete.

    Facing a problem while setting MAC 6.1. My version is 5.1. The activation does not complete.

    Hacked or jailbroken iPhone will have this problem.
    BTW, it's IOS 6.0.1 not MAC.

  • IPhone - Problems while setting Delegate to UISearchBar using IB

    Hi,
    I'm having a problem while setting the delegate to the UISearchBar.
    SearchViewController.h
    #import <UIKit/UIKit.h>
    @interface SearchViewController : UIViewController {
    IBOutlet UISearchBar *mSearchBar;
    @property (nonatomic, retain) UISearchBar *mSearchBar;
    @end
    FirstViewController.m
    #import "SearchViewController.h"
    @implementation SearchViewController
    @synthesize mSearchBar;
    // The designated initializer. Override to perform setup that is required before the view is loaded.
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    return self;
    @end
    I think I have setup the connection properly in IB, the view connected to the File's Owner, the File's Owner referencing the SearchViewController class. Now if I run it like this it all works great but when I set the UISearchBar delegate to File's Owner I get.
    Application Specific Information:
    iPhone Simulator 2.2 (77.4.9), iPhone OS 2.2 (5G77)
    * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x524790> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mSearchBar.

    Found the solution:
    Reference:
    http://discussions.apple.com/thread.jspa?messageID=8550459

  • Problem while setting username password to router

    Hi,
    i am trying to connect to router using java program. i am connecting with out any problem.
    while giving the credentials like username and password i can't placing the original username
    password.instead some thing is setted.
    here is my code
       public class ConnectRouter
        public static void main(String[] args) throws Exception {
        try
        if (args.length != 2) {
        System.err.println("Usage: java router username and  password");
        System.exit(1);
        String password = URLEncoder.encode(args[0], "US-ASCII");
        String username=URLEncoder.encode(args[1],"US-ASCII");
        URL url = new URL("http://192.168.0.75:23");
        URLConnection connection = url.openConnection();
        connection.setDoOutput(true);
            System.out.println("connection obj got");
        PrintWriter out = new PrintWriter(connection.getOutputStream());
        out.println(username);----------------------------------------------------------------------------------------------->passing username
        out.println(password);------------------------------------------------------------------------------------------------>passing password
            Process p = Runtime.getRuntime().exec("cmd /c perl C:\\perlsrc\\uname.pl");
        // out.println(args[0]);
            System.out.println("-----------connected---------------");
        out.close();
        BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
        String inputLine;
        while ((inputLine = in.readLine()) != null)
        System.out.println(inputLine);
        in.close();
        }catch(Exception e){e.printStackTrace();}
        }output is as follows:
    connection obj got
    -----------connected---------------
    ÿûÿûÿýÿý
    User Access Verification
    Username: POST / HTTP/1.1--------------------------------------->here something is placed instead of my username
    Password:
    % Authentication failed.
    Username: Host: 192.168.0.75:23--------------------------------->here something is placed instead of my username
    Password:
    % Authentication failed.
    Username: Connection: keep-alive
    Password:
    % Authentication failed.
    Process exited with exit code 0.
    please explain me where i am missing???
    Regards,
    Nagaraju

    Hi ejp,
    i done as follows even i am getting same problem
    please help me
       public class ConnectRouter extends Authenticator
            static String username,password;
        public static void main(String[] args) throws Exception
            Authenticator.setDefault(new ConnectRouter());
        try
        if (args.length != 2) {
        System.err.println("Usage: java router username and  password");
        System.exit(1);
         password = URLEncoder.encode(args[0], "US-ASCII");
         username=URLEncoder.encode(args[1],"US-ASCII");
        URL url = new URL("http://192.168.0.75:23");
        URLConnection connection = url.openConnection();
        connection.setDoOutput(true);
            System.out.println("connection obj got");
        PrintWriter out = new PrintWriter(connection.getOutputStream());
        out.println(username);
        out.println(password);
            Process p = Runtime.getRuntime().exec("cmd /c perl C:\\perlsrc\\uname.pl");
        // out.println(args[0]);
            System.out.println("-----------connected---------------");
        out.close();
        BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
        String inputLine;
        while ((inputLine = in.readLine()) != null)
        System.out.println(inputLine);
        in.close();
        }catch(Exception e){e.printStackTrace();}
        //@ovverriding the getPasswordAuhtentication method
        protected PasswordAuthentication getPasswordAuthentication()
            System.out.println("int the password authentication method");
            return new PasswordAuthentication(username,password.toCharArray());
        }output::
    connection obj got
    -----------connected---------------
    ÿûÿûÿýÿý
    User Access Verification
    Username: POST / HTTP/1.1--------------------------------------->here something is placed instead of my username
    Password:
    % Authentication failed.
    Username: Host: 192.168.0.75:23--------------------------------->here something is placed instead of my username
    Password:
    % Authentication failed.
    Username: Connection: keep-alive
    Password:
    % Authentication failed.
    Process exited with exit code 0.
    please explain me where i am missing again???
    Thanks in advance,
    Nagaraju.

  • Problem while setting the selected value of h:selectOneMenu to bean

    Hi all,
    I am new to JSF. I am working on application where i have combo boxe on the page. I am setting some values to the combobox from database using <f:selectItems> tag and one value using <f:selectItem> tag. The value combobox value selected by user is set to the bean property which is String. I am able to display all the values in the combobox but when clicked on button (present at the end of form) i am getting following error-
    ERROR HtmlRendererUtils:354 - Error finding Converter for
    component with id interviewStageOneForm:acceptanceChannelList
    I am setting the combobox selected value to the to the bean property which is String and the value selected in also String. Then which converter it is asking for. I am not able to find out what is the problem.
    Your suggestions will be really appreciated.
    Here is my code snippet:-
    JSF:-
    <h:selectOneMenu id="acceptanceChannelList"
         value="#{interviewStageOneBean.index}">
         <f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
         <f:selectItems value="#{MasterDataBean.acceptanceChannelList}" />  <!-- The list coming from database-->
    </h:selectOneMenu>Bean:-
    public class InterviewStageOneBean {
         private String index;
         public String getIndex() {
              return index;
         public void setIndex(String index) {
              this.index = index;
    }

    Hi!
    First I would try next:
    Try to leave out
    <f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
    line. And check if it works after that. If it didn't repeat step but you leave in message selectItem and dump out database selectItem line.
    Second:
    I would check acceptanceChannelList creation and what type of objects you put while doing setValue and setLabel on UISelectItem
    Probably selectItem value has been assigned an object of type the engine doesn't know how to convert from String to it.

  • Problem while setting PF_status in ALV Grid Display

    Hi,
    i have a final internal table with first field as a check box. I have delete button on application tool-bar, with usercommand and pf status defined for it.
    Once the output is displayed  i should have the option of checking the line (check box) and delete then records from the list.
    problem here is once i check the box and click on delete button is not getting deleted. but instead if i check the box and double click on the line(ie f2 fuctionality) and then click on refresh, then the records are getting deleted.
    i have not provided and pf status for f2 functionality, by default its getting activated before the delete fuctionality is called. 
    i have attached my code below.
    DATA : fk_events   TYPE slis_t_event,
           f_user_command TYPE slis_formname VALUE 'USER_COMMAND',
           f_status TYPE slis_formname VALUE 'STANDARD_SP01',
           fieldnam(10) TYPE c.
    DATA:  gs_layout TYPE slis_layout_alv.
    DATA: ls_event TYPE slis_alv_event.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        i_list_type = 0
      IMPORTING
        et_events   = fk_events.
    READ TABLE fk_events INTO ls_event WITH KEY name = slis_ev_user_command
    IF sy-subrc = 0.
      MOVE f_user_command TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    READ TABLE fk_events INTO ls_event WITH KEY name =
                              slis_ev_pf_status_set
    IF sy-subrc = 0.
      MOVE f_status TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                 = 'ZWR_SECOND_TO_CREATION1'
    i_callback_pf_status_set          =  f_status
       i_callback_user_command           =  f_user_command
       it_fieldcat                        = gt_fieldcat[]
       it_events                         = fk_events[]
      TABLES
        t_outtab                          = gt_final[]
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
    FORM user_command USING r_comm TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      fieldnam = rs_selfield-fieldname.
      CASE r_comm.
        WHEN  'DELETE''.
          LOOP AT gt_final INTO gk_final.
    IF gk_final-del_sat = 'X'.
              DELETE gt_final WHERE vbeln = gk_final-vbeln.
            ENDIF.
            rs_selfield-refresh = 'X'.
    ENDLOOP.
        WHEN OTHERS.
          EXIT.
      ENDCASE.
    FORM standard_sp01 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'RAM' EXCLUDING extab.  " For PF-Status
    ENDFORM.                    "STANDARD_SP01
    i wud be very thankful if someone cud help me
    thanx
    ram

    Hi,
    i have a final internal table with first field as a check box. I have delete button on application tool-bar, with usercommand and pf status defined for it.
    Once the output is displayed  i should have the option of checking the line (check box) and delete then records from the list.
    problem here is once i check the box and click on delete button is not getting deleted. but instead if i check the box and double click on the line(ie f2 fuctionality) and then click on refresh, then the records are getting deleted.
    i have not provided and pf status for f2 functionality, by default its getting activated before the delete fuctionality is called. 
    i have attached my code below.
    DATA : fk_events   TYPE slis_t_event,
           f_user_command TYPE slis_formname VALUE 'USER_COMMAND',
           f_status TYPE slis_formname VALUE 'STANDARD_SP01',
           fieldnam(10) TYPE c.
    DATA:  gs_layout TYPE slis_layout_alv.
    DATA: ls_event TYPE slis_alv_event.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        i_list_type = 0
      IMPORTING
        et_events   = fk_events.
    READ TABLE fk_events INTO ls_event WITH KEY name = slis_ev_user_command
    IF sy-subrc = 0.
      MOVE f_user_command TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    READ TABLE fk_events INTO ls_event WITH KEY name =
                              slis_ev_pf_status_set
    IF sy-subrc = 0.
      MOVE f_status TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                 = 'ZWR_SECOND_TO_CREATION1'
    i_callback_pf_status_set          =  f_status
       i_callback_user_command           =  f_user_command
       it_fieldcat                        = gt_fieldcat[]
       it_events                         = fk_events[]
      TABLES
        t_outtab                          = gt_final[]
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
    FORM user_command USING r_comm TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      fieldnam = rs_selfield-fieldname.
      CASE r_comm.
        WHEN  'DELETE''.
          LOOP AT gt_final INTO gk_final.
    IF gk_final-del_sat = 'X'.
              DELETE gt_final WHERE vbeln = gk_final-vbeln.
            ENDIF.
            rs_selfield-refresh = 'X'.
    ENDLOOP.
        WHEN OTHERS.
          EXIT.
      ENDCASE.
    FORM standard_sp01 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'RAM' EXCLUDING extab.  " For PF-Status
    ENDFORM.                    "STANDARD_SP01
    i wud be very thankful if someone cud help me
    thanx
    ram

  • Problem while setting External Window Title

    Hello,
    This should actually be a straighforward task, but I don't understand why I am facing a problem.
    I am opening an external window (browser) and trying to set the title of the window. Here is the code
         IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,"Title");     
         win.setTitle("Title");     
         win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
         win.removeWindowFeature(WDWindowFeature.MENU_BAR);
         win.removeWindowFeature(WDWindowFeature.STATUS_BAR);
         win.removeWindowFeature(WDWindowFeature.TOOL_BAR);     
         win.setWindowPosition(100, 150);
         win.show();  
    The window opens well with the right URL. But the title does not seem to be changing at all. The URL is displayed instead of the title. Where could I be going wrong?
    I have placed this code within an action event
    We are using EP7 SP10.
    Thanks and Regards,
    Reena

    Hi Reema
    IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,"Title");
    win.setTitle("Title");
    in the above code createNonModalExternalWindow(url,"Title");  here it self you are setting the title , just comment this statement [win.setTitle("Title");]
    and see the <b>source</b> of the external window whether you can see the title as you mentioned or not
    Best Regards
    Chaitanya.A

  • Problem while setting new value to entity object attribute in doDML meathod

    Hi all,
    I am overriding the entity objects doDML method for generating the value of Sequence Number just before insert .
    For this puropose i am using doDML method. I am fetching the maximum value for the sequence number feild from the table by a prepared statement
    and then incrementing that value by one.
        protected void doDML(int operation, TransactionEvent e) {
            if (operation == DML_INSERT) {
                // code for getting the max+1 of sequence number before insert
                //command executes.
                try {
                    System.out.println("Inside doDML Method");
                    String sql =
                        "select nvl(max(seq_no),0)+1  from WF_LEAVE_HDR where org_unit_code = " +
                        this.getOrgUnitCode();
                    PreparedStatement pstmt =
                        getDBTransaction().createPreparedStatement(sql, 0);
                    ResultSet rs = pstmt.executeQuery();
                    rs.next();
                    Integer newSeqNo =rs.getInt(1); //(Number)rs.getString(0);
                    //this.setSeqNo(new Number(newSeqNo));
                    setAttributeInternal("SeqNo",new Number(newSeqNo));
                    System.out.println("Value of new seq no is -->>"+getSeqNo());
                } catch (Exception excpt) {
                    System.out.println("Inside catch block ");
                    excpt.printStackTrace();
            super.doDML(operation, e);
        }i am getting the value correct by using the sql statement but while i am using setAttributeInternal("SeqNo",new Number(newSeqNo));
    it is giving an error and value for new sequence no is not passed to the seq no feild of the entity object. I have tried this.setSeqNo(new Number(newSeqNo))
    but it is also not wotrking .
    Any one please help , I am using Jdeveloper 10.1.3
    Thanks all in advance.

    iloveoracle,
    Sigh... in addition to doing this in doDML (which Dimitar points out is the wrong place to do this)... you are making a huge huge mistake.
    select nvl(max(seq_no),0)+1  from WF_LEAVE_HDRWhat happens when two people do this at around the same time? You don't do any locking, so you will get two rows with the same SeqNo. This is absolutely the wrong way of doing sequence numbers. The best way of doing this would be to use real sequence numbers (an Oracle sequence) and ignore the fact that there will be gaps. If you insist on using your approach, you MUST LOCK THE ENTIRE TABLE before you try to do your little max() + 1 trick, otherwise you run the very real risk of getting duplicate SeqNos. OK, I see that you are trying to do sequences by org_unit_code, so you don't have to lock the whole table, but you do have to have some way of holding a lock. You must also write some code to be able to handle an "unable to get the lock because someone else already holds it" type of situation.
    <rant>
    I have seen so many people try to do this little max() + 1 trick. It DOES NOT, WILL NOT work until you handle locking properly. One question that I often ask when I interview database developers is about generating "gapless" sequences; unless the job is for a brand-new-with-absolutely-no-experience trainee, answering "select max() + 1" without any mention of concurrency issues would be grounds for an immediate rejection of the candidate. Seriously. Have a run over to http://asktom.oracle.com and search for "gapless" if you'd like to see a more strongly worded rant.
    </rant>
    Bottom line, just use an Oracle sequence if it's at all possible; otherwise, be prepared to write some bunches of code to deal with locking.
    John

  • Problem while setting background color for jsplit pane

    Hi ALL,
    i am using jsplit frame inside jframe.
    i placed jtree inside left jsplit frame.
    I am not able to set background clolr to jsplit frame.
    when i hide(jtree.setvisible(false)) jtree is shows default background color.it is not showing backgroun color which i set.

    In the below code,i am adding jtree inside jscrollpane and i am adding jscrollpane inside jsplitpane.
    whenever i am setting jtree.setvisible(false),it must show background color which is i am setting for jscrollpane .but its showing default background color.
    Please help me.
    * Demo.java
    * Created on August 19, 2008, 1:44 PM
    public class Demo extends javax.swing.JFrame {
    /** Creates new form Demo */
    public Demo() {
    initComponents();
    jTree1.setVisible(false);
    jScrollPane1.setBackground(new java.awt.Color(136, 194, 252));
    jSplitPane1.setBackground(new java.awt.Color(136, 194, 252));    }
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jSplitPane1 = new javax.swing.JSplitPane();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTree1 = new javax.swing.JTree();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jScrollPane1.setViewportView(jTree1);
            jSplitPane1.setLeftComponent(jScrollPane1);
            org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            pack();
        }// </editor-fold>
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Demo().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JPanel jPanel1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JSplitPane jSplitPane1;
        private javax.swing.JTree jTree1;
        // End of variables declaration

  • Problem while setting the property of column in ALV

    Hi ,
    I have created a alv dynamically and setting the properties of the column like column header text but its not getting updated .
    see the below code for ref.
    lr_column_settings ?= lr_config_table.
      data:
        lt_columns type salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
      data: lr_column      type ref to cl_salv_wd_column,
        lr_header      type ref to cl_salv_wd_column_header,
        ls_column type salv_wd_s_column_ref.
      loop at lt_columns into ls_column.
        case ls_column-id.
          when 'MOIST'.
            lr_column = ls_column-r_column.
        lr_header = lr_column->get_header( ).
        lr_header->set_text( 'Moisture %' ).
    I am able to set the alv properties like  visible row count etc ..
    can anybody help out in this issue
    Regards
    Yash

    I was just able to change my headers with the following:
    data:
        lt_columns     type salv_wd_t_column_ref,
        ls_column      type salv_wd_s_column_ref,
        lr_header      type ref to cl_salv_wd_column_header.
      lt_columns = lo_value->if_salv_wd_column_settings~get_columns( ).
      loop at lt_columns into ls_column.
        lr_column = ls_column-r_column.
        lr_header = lr_column->get_header( ).
        lr_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_title ).
        lr_header = lr_column->create_header( ).
        case ls_column-id.
          when 'CNT_LINEITEMS'.
            lr_column->r_header->set_text( 'Line Items' ).
          when 'VAL_OPEN'.
            lr_column->r_header->set_text( 'Open Amount' ).
          when others.
        endcase.
    endloop

  • Problem while setting OPTIMIZER_MODE =RULE

    I want to set optimizer_mode=RULE in init.ora file for Oracle92
    For this i have shutdown the d/b and set the optimizer_mode=RULE
    but when i retsarted the d/b the chnages is not reflected it is showing optimizer_mode=CHOOSE
    Is there changes we have to do to take d/b in RBO.
    Thanx
    Junu

    but getting following Oracle erroe message
    ORA-02096 specified initialization parameter is not modifiable with this option
    That's correct. You cannot change it using ALTER SYSTEM. See below:
    SQL> select issys_modifiable from v$parameter where name='optimizer_mode';
    ISSYS_MOD
    FALSEAs you can see ISSYS_MODIFIABLE value is FALSE which means you cannot change it using ALTER SYSTEM.
    Also there many init.ora and spfile files in 'admin' and other directory even iam unable to decide which is the current one?
    During starting instance you can choose init.ora file.
    See help here:
    http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b12170/ch13.htm#i2699631
    Peter D.

  • Problem while setting custom Challenge Questions in 11gR2

    Hi all,
    I am trying to add some custom Challenge Questions in 11gr2 but it is throwing error . For this first i added questions in Look up and then in customResources_en.properties and then i restarted OIM server.
    when a user is logging for the first time he has to set his challenge question there i am getting error like:
    JBO-29000: Unexpected exception caught: oracle.iam.ui.platform.exception.OIMRuntimeException, msg=JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find resource for bundle java.util.PropertyResourceBundle, key KEY_WHATTHEHELL
    JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find resource for bundle java.util.PropertyResourceBundle, key KEY_WHATTHEHELL
    Localized message not available. Error returned is: Can't find resource for bundle java.util.PropertyResourceBundle, key KEY_WHATTHEHELL
    Here My custom challenge question is:WHATTHEHELL.
    Its an urgent requirement, so reply ASAP.
    Thanks In Advance.

    If you are going for Localizing Challenge Questions and Responses
    http://docs.oracle.com/cd/E27559_01/admin.1112/e27149/app_localizing.htm#OMADM5054

  • Problem while setting response header in a filter

    Hi,
    I am intercepting response in a filter and trying to modify the response header, so that my subsequent class would get the header in request .
    Somehow i don't get the header in request. I don't know whats going wrong.
    I have few more filters other than the one in which i m modifying the response header.
    I change the response header before calling doFilter() method.
    Where am i going wrong ?

    The subsequent servlets and filters will get the same request that the first filter has. The passing to the next servlet is via a method call.

  • Remote JDBC problem while setting up it with BPM Studio 10.3

    Hi
    I am trying to use the Remote JDBC for SQL Connection to Database with Oracle BPM Studio.
    When i configure a Remote JDBC Connection for SQL in BPM Studio, it prompt me an error.
    Step 1: Create a new external resource
    Name: erJavaLibrary
    Type: Java Class Library
    Jar libraries: weblogic.jar
         wlclient.jar
    Step 2: Create a new external resource
    Name: erWebLogic
    Type: J2EE Application Server type
    Initial Context Factory: weblogic.jndi.WLInitialContextFactory
    URL: http://192.168.1.32:7001
    Principal: weblogic
    Credentials: *******
    Step 3: Create a new external resource
    Name: erSQLjdb
    Type: SQL database
    Supported Types : Remote JDBC
    Database Type : BPM MS SQL Server 2005
    J2EE : erWebLogic
    Lookup Name : TestBPMDS
    Step 4: Creating a new catalog modulo for database component
    Select Catalog Component, and then select SQL
    Specify which configuration: erSQLjdbc
    Exception error:
    weblogic/security/subject/AbstractSubject
    Caused by: weblogic.security.subject.AbstractSubject
    java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject      
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)      
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)      
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)      
    at javax.naming.InitialContext.init(InitialContext.java:223)      
    at javax.naming.InitialContext.<init>(InitialContext.java:197)      
    at fuego.jndi.FaultTolerantContext.createContext(FaultTolerantContext.java:726)      
    at fuego.jndi.FaultTolerantContext.<init>(FaultTolerantContext.java:79)      
    at fuego.connector.impl.GenericJ2EEConnector.createInitialContext(GenericJ2EEConnector.java:177)      
    at fuego.connector.impl.GenericJ2EEConnector.createStandaloneContext(GenericJ2EEConnector.java:98)      
    at fuego.connector.impl.BaseJ2EEConnector.getResource(BaseJ2EEConnector.java:92)      
    at fuego.connector.impl.BaseJ2EEConnector.getResource(BaseJ2EEConnector.java:76)      
    at fuego.connector.J2EEHelper.getReadOnlyContext(J2EEHelper.java:86)      
    at fuego.connector.impl.BaseRemoteConnector.getContext(BaseRemoteConnector.java:99)
    at fuego.connector.impl.BaseRemoteConnector.getReferencedObject(BaseRemoteConnector.java:114)
    at fuego.connector.impl.BaseRemoteConnector.getReferencedObject(BaseRemoteConnector.java:107)
    at fuego.connector.impl.RemoteJDBCConnector.getConnection(RemoteJDBCConnector.java:75)      
    at fuego.connector.impl.RemoteJDBCConnector.getResource(RemoteJDBCConnector.java:145)      
    at fuego.connector.impl.RemoteJDBCConnector.getResource(RemoteJDBCConnector.java:129)      
    at fuego.connector.JDBCHelper.getReadOnlyConnection(JDBCHelper.java:90)      
    at fuego.sqlintrospector.BrowserPanel.connect(BrowserPanel.java:395)      
    at fuego.sqlintrospector.BrowserPanel.populateTree(BrowserPanel.java:200)      
    at fuego.ui.wizards.ui.CheckTreeBrowser$1.construct(CheckTreeBrowser.java:63)      
    at fuego.ui.SwingWorker$2.run(SwingWorker.java:39)      
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: weblogic.security.subject.AbstractSubject      
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)      
    at java.security.AccessController.doPrivileged(Native Method)      
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)      
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)      
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)      
    ... 24 more

    Solution procedure:
    1. Create the wlfullclient.jar file in weblogic environment:
    It is documented in: http://download.oracle.com/docs/cd/E12839_01/web.1111/e13717/jarbuilder.htm#BABCGHFH
    2. Add the wlfullclient.jar file as external resource.
    3. Create the Remote JDBC data source configuration

Maybe you are looking for

  • OS X Yosemite or Mavericks-Which is better?

    Hello, everyone, I want a professional, personal, and meaningful review of OS X Yosemite's new design/UI and the new features. Thank you!

  • VF01 Exit BADI to Postpone or block items in billing plan.

    Hi Experts, The business requirement is where they are not suppose to bill the customer more than the Sales Order value. While positng a invoice with referenceto to an Sales order (VF01) for a perticular order type with a billing plan. I want block i

  • Lost labels

    CS4  Bridge v3.0.0.464 Labels have disappeared ( though ratings are still there ) There are a few that appear as white, that perhaps were CMD+6 ( red ) but I'm thinking there were more assigned that way that have no label at all. I only found search

  • IPhone 4 not fully charging.

    No matter how long I charge my iPhone, it won't fully charge. I charge it every night while I sleep, for at least 8 hours. Whenever I look at it in the morning, it varies how much it has charged by the morning. Sometimes it will charge to 95% and oth

  • Where is my /proc/acpi/video interface? Can't find it!

    Hello! I'm using a custom kernel. (2.6.23.8) For my xorg config I need a /proc/acpi/video interface (the nvidia driver need this interface). I searched in the kernel config, but in Power Management / ACPI there isn't a "Video" Option. How can I activ