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.

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

  • How to set username/password in OSB Business Service

    Hi
    I need to call thirt party http service that utilizes Http Basic authentication i.e. username / password. If I call the same service through Oracle SOA I can either
    put the username/password inside composite.xml but that way the password is visible. So have set the usrname/password insid the console.
    Now want to use OSB to call the sam service. Created business service but where do I add the username/password. Is there a plac inside sbconsole I can set the username password.
    Thanks

    You must a "Service Account" available in OSB and assosciate it with the Business service you invoke.

  • Setting Username/Password in Application.cfm

    I'm just moving my DB from Access over to MSSql, and I'm
    having difficulty figuring out how to set a global
    username/password in Application.cfm.
    I am able to set the username and password within the
    individual queries (using username= and password=) but I'd like to
    set the username and password within application.cfm so I do not
    have to go and change each and every cfquery statement throughout
    my site.
    So, essentially, I'm looking to insert code int he
    Application.cfm which logs into the MSSQL server, so whenever a
    cfquery is executed, the db is already logged into.
    Thanks!
    Andrew

    You can set application variables for your user name and
    password within application.cfm, then use those variables in your
    cfquery and cfstoredproc tags. That will allow you to change the
    value in one place instead of having to do it everywhere. As for
    staying logged on to the server, you may want to consider checking
    the Maintain Connections option in your advanced settings for your
    particular data source in ColdFusion Administrator.
    Phil

  • Apple ID Problem with Incorrect username/password setup

    Hello all,
    I'm trying to help my sister-in-law with a problem with her Login details for Apple Store. She has no skills in this department, so she asked a friend (?!) to help her. Somehow things were done that allowed her to establish an account, altho frankly I am not sure how it was activated. She used her old email address at that time, which she has in the meantime replaced with a new address from another ISP. I managed to establish an ID using the new address, but she has an iPad registered under her old Apple ID.
    Nothing was written down, and nowhere can I find an 8 letter password with the Capital Letter and Number system as required by Apple. The help questions which were established when compiling the old address can't be answered, because she didn't write down either the data, or the answer. From all this, you can judge that I'm frustrated at trying to do more for her.
    I can't understand how, or if, one could cancel the old details in favor of the new. Or whether it might work if I "Restore" the iPad according to the instructions in iTunes when the iPad is attached, and try to register it under the new user/password I established.
    We live very remotely, so popping into a local store for help is not possible. I've tried, with my limited knowledge, everything I can, but I've got nowhere. So, can any kind soul who might have had to go done this route, or who might have a possible clue to what I could do, perhaps help me out? I'll bet its staring me in the face, but as an old guy, my instincts aren't as sharp as they were.
    Very many thanks to anyome reading this post, who might be able to give me some assistance.
    Barrie

    Hi  barrie,
    Well, sounds like you have half the problem fixed. But for the original account, even though you can't remember the answers to the original security questions, you CAN contact Apple Support to have them reset them for you. Once they are reset, also reset the password to whatever the password on the new account is so they are seamless.
    Also, on both accounts be sure to set up a RESCUE EMAIL ADDRESS with the Security Questions. This will prevent any issues down the road with forgotton passwords/security questions, and will allow you to recover in a much easier way than this has been.
    But again, for the original account. You need to do the following:
    1.  Contact Apple Support, provide them with the Original Apple ID, and let them know that you need to have the Security Questions reset.
    2.  Once that is done, set up new Security Questions for that old Apple ID as well as a RESCUE EMAIL ADDRESS with those new Secuity Questions
    3.  Reset the Password on that Old ID to be the same as the one on the new ID (and keep it consistent - any time you change the new one, change the old one)
    4.  Sign into iTunes one last time with that old ID and use up your $15
    Now, forget the old ID altogether except when you need to update the password to match the new one. Once you have done your final redemption, only the new Apple ID should exist for you. All apps and music purchased in the same iTunes Library with either ID will be able to be loaded onto the iPad. When one of the apps needs to be updated, it may display the old ID, or it may display the new ID - if the password is the same, it won't matter which is displayed for the update. Put in the password, and it will update.
    Whatever you do - Don't delete the apps purchased with the old ID. Once you get it squared away it will just be like a "phantom" id in the backround. Not really used, but still associated with the apps purchased under it. As long as they all live in the same iTunes Library, the ID they were purchased under is irrelevant. The only thing that matters after that is the password (as explained above) for any updates.
    For the iPads themselves, make sure that the new Apple ID is showing for the iCloud account. This is what ties the Apple ID being used to do purchases via the iPad.
    I hope the info I have provided has helped, and that your trip to Canberra will be a success. Sounds like an all-around nightmare, and you have been a very patient and sweet brother-in-law to stick with this whole thing.
    Best of luck, and do let me know how it all turns out! I would love a line from you as the adventure progresses!!!
    Cheers,
    GB

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

  • Set username/password using in Java client proxy for a JAX-WS webservice

    Hi, i am invoking one deployed EBS webservice , while trying to run that client program me
    i am getting error WSSE security, where can i set Uname pwd , through java program me
    ++Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Missing <wsse:Security> in SOAP Header
    Thanks Regards
    Raj
    Edited by: 952094 on Jan 23, 2013 1:42 PM

    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    import javax.xml.ws.BindingProvider;
    import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
    import weblogic.xml.crypto.wss.WSSecurityContext;
    import weblogic.xml.crypto.wss.provider.CredentialProvider;
    you can add username for weblogic client using
    // Create list of credential providers
    List credProviders = new ArrayList();
    // Create user name token provider
    ClientUNTCredentialProvider unt = new ClientUNTCredentialProvider("weblogic", "weblogic");
    credProviders.add(unt);
    credProviders.add(cp);
    // Finally add the credential providers to the request context
    Map<string, object=""> requestContext = ((BindingProvider)brokerService).getRequestContext();
    requestContext.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);

  • 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

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

  • Hi, back ups to my TC suddenly won't work saying there's a problem with network username/password.  Any help greatly appreciated!

    I've deselected the disc, reselected it & re-entered the password 3 times now with no luck.
    Any help greatly appreciated!

    It sounds like you have much more issues than simply the TC..
    I can suggest or have suggested the workaround to the TC problem.
    Did you try it??
    What happened if you did?
    Did you simply try the standard old reboot the TC.. ie yank out the power cord. count to 10.. plug in the power cord.
    That magically fixes lots of network issues.
    Mavericks has some major issues.. do you upgrade install.
    Let me strongly recommend a clean install.. if you haven't done it. Your issues with safari look like a corrupted install to me.. but I am not an eggs spurt in OS issues.. by any long stretch of the imagination.. post the issue over in the Mavericks area.
    But as an old computer support man.. (old should be emphasised) upgrade installation are anethma.. I have never seen them work 100% and that includes with Mac. Of course you cannot expect windows to work.. but things go wrong in every OS.. no matter how wonderful.
    Make sure you have a good TM backup .. clean install and migrate your documents back.. maybe reinstall software from scratch. Not easy but the only way.

  • 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

Maybe you are looking for