Server Conntion State Problem

We have a java game which runs with communication from a server and it depends upon regular connectivity with the server. Our problem is in connection discontinuation.
Firstly in between connection �Stream Corrupted Exception� arrives and connection with server breaks (it�s not lost actually but the ser is go in a state where is neither send any thing nor receive but the connection still not braked).
And Second one - some time without exception server just hangs up does not listen and neither replies for some clients but same time work properly for other
Here are some codes for data sending and receiving
at sending on server
public void sendMessage(CMessage cMessage)
     if(bIsClosed==false)
            try
              objOutputStream.writeObject(cMessage);
              objOutputStream.flush();
            }catch(Exception e)
                 bIsClosed=true;
                 System.out.println("Error Sending Message "+cMessage.get_title()+e.toString());
               server.removeConnection( socket );
}at recive on client
public void run()
     Object objMessageRecived;
     CMessage cMessageRecived;
     while(true)
          try
               objMessageRecived=objInputStream.readObject();
               cMessageRecived=(CMessage)objMessageRecived;
               m_cWindow.handle_message(cMessageRecived);
          }catch(StreamCorruptedException sce){
               System.out.println("Error in connection !!!!!! "+sce.toString());
               break;
          catch(IOException ex){
               System.out.println("Error in connection "+ex.toString());
               break;
          catch(ClassNotFoundException ce){System.out.println("Error in connection !!!!!! "+ce.toString());}
}

Couple of things:
1: When you say it doesn't forward what does happen? Did you verify that you are in fact reaching the forward statement? Do you get an error?
2: I am not sure I understand you logic.
You get a username and password from the client.
You go to the database with "SELECT USERNAME, USERPASSWORD from USERLIST" which brings back all of the user/password pairs in the database.
You then cycle through this list of user/password pairs in a while loop:
while(rs.next()){
String users = rs.getString("USERNAME"); <-- Why set this within the loop
String pass = rs.getString("USERPASSWORD"); <-- will set multiple times
if(!users.equals(username))){  <-- what if the user is not the first user in the database? Will fail more times than succeed.
Why not do
SELECT USERNAME, USERPASSWORD from USERLIST where USERNAME = user and USERPASSWORD = password
Then check the results to see if it returned a record.

Similar Messages

  • SQL Server 2012 installation problem (error server didn't respond in timely fashion ....)

    Hi everyone,
    I am new to SQL server....I am learning C# programming using visual studio 2013 . And I want to learn SQL database language to create and practice C# database project....My computer meets all the hardware requirement for SQL installation (i.e. My computer
    has window 7 OS , 80 GB freen HD  and 6 GB RAM. ) Therefore I  download Microsoft SQL server express 2012 try to install it in my computer (which already has visual studio).
    But during installation of SQL server  I have problem ...it says
    the server doesn't respond in timely fashion. When I research about it everyone were saying uninstall sql and reinstall again. I uninstall and re install but still having same problem...
    The database engine  also not installed displaying same error.
    I don't know how can i install sql server 2012 to use with visual studio in same computer.
    Can somebody please help with SQL installation please ?
    It will be great help.
    Many thanks in advance 
    regards
    rash

    Hi 
    my summary file is :
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2146232832
      Start time:                    2015-04-06 11:34:18
      End time:                      2015-04-06 19:04:46
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for SQLEngine:       Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for DQ:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for FullText:        Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for Replication:     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for IS:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for RS:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for AS:              Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
    Machine Properties:
      Machine name:                  RASHA-VAIO
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered 
      SQL Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             Database Engine Services                 1033      
              Express Edition      10.1.2531.0     No        
      SQL Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             SQL Server Replication                   1033      
              Express Edition      10.1.2531.0     No        
    Package properties:
      Description:                   Microsoft SQL Server 2012 Service Pack 1
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      SPLevel:                       0
      Installation location:         E:\x64\setup\
      Installation edition:          Enterprise
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      false
      AGTSVCACCOUNT:                 NT Service\SQLSERVERAGENT
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config
      ASDATADIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data
      ASLOGDIR:                      C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  TABULAR
      ASSVCACCOUNT:                  NT Service\MSSQLServerOLAPService
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            RASHA-VAIO\RASHA
      ASTEMPDIR:                     C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   MAIN
      CLTRESULTDIR:                  C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir\
      CLTSTARTUPTYPE:                Manual
      CLTSVCACCOUNT:                 NT Service\SQL Server Distributed Replay Client
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir\
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20150406_112342\ConfigurationFile.ini
      CTLRSTARTUPTYPE:               Manual
      CTLRSVCACCOUNT:                NT Service\SQL Server Distributed Replay Controller
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     RASHA-VAIO\RASHA
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                false
      FEATURES:                      SQLENGINE, REPLICATION, FULLTEXT, DQ, AS, RS, RS_SHP, RS_SHPWFE, DQC, BIDS, CONN, IS, BC, SDK, BOL, SSMS, ADV_SSMS, DREPLAY_CTLR, DREPLAY_CLT, SNAC_SDK, MDS
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  NT Service\MSSQLFDLauncher
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    MSSQLSERVER
      INSTANCENAME:                  MSSQLSERVER
      ISSVCACCOUNT:                  NT Service\MsDtsServer110
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          <empty>
      RSINSTALLMODE:                 FilesOnlyMode
      RSSHPINSTALLMODE:              SharePointFilesOnlyMode
      RSSVCACCOUNT:                  NT Service\ReportServer
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  Latin1_General_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQLSERVER
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           RASHA-VAIO\RASHA
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    1
      UIMODE:                        Normal
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20150406_112342\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Passed
      Feature:                       Client Tools Connectivity
      Status:                        Passed
      Feature:                       Client Tools SDK
      Status:                        Passed
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Passed
      Feature:                       Management Tools - Basic
      Status:                        Passed
      Feature:                       SQL Server Data Tools
      Status:                        Passed
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x80004005
      Error description:             The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC112D1C%400xDC80C325&EvtType=0xDC112D1C%400xDC80C325
      Feature:                       Data Quality Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x80004005
      Error description:             The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC112D1C%400xDC80C325&EvtType=0xDC112D1C%400xDC80C325
      Feature:                       Full-Text and Semantic Extractions for Search
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x80004005
      Error description:             The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC112D1C%400xDC80C325&EvtType=0xDC112D1C%400xDC80C325
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x80004005
      Error description:             The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC112D1C%400xDC80C325&EvtType=0xDC112D1C%400xDC80C325
      Feature:                       Master Data Services
      Status:                        Passed
      Feature:                       Distributed Replay Client
      Status:                        Passed
      Feature:                       Distributed Replay Controller
      Status:                        Passed
      Feature:                       Integration Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Integration Services
      Component error code:          0x84BB0001
      Error description:             The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC112D1C%400xDC80C325&EvtType=0xDC112D1C%400xDC80C325
      Feature:                       Data Quality Client
      Status:                        Passed
      Feature:                       Reporting Services - Native
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Reporting Services
      Component error code:          0x84BB0001
      Error description:             The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC112D1C%400xDC80C325&EvtType=0xDC112D1C%400xDC80C325
      Feature:                       Analysis Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Analysis Services
      Component error code:          0x80131600
      Error description:             The service could not be started. Reason:  The service did not respond to the start or control request in a timely fashion.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0x88A466B0%400x857354B0&EvtType=0x88A466B0%400x857354B0
      Feature:                       Reporting Services - SharePoint
      Status:                        Passed
      Feature:                       Reporting Services Add-in for SharePoint Products
      Status:                        Passed
      Feature:                       SQL Browser
      Status:                        Passed
      Feature:                       Documentation Components
      Status:                        Passed
      Feature:                       SQL Writer
      Status:                        Passed
      Feature:                       SQL Client Connectivity
      Status:                        Passed
      Feature:                       SQL Client Connectivity SDK
      Status:                        Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20150406_112342\SystemConfigurationCheck_Report.htm
    I hope it will help you to figure out ...i dont know how to solve this issue ..i have un install and re install more than 5 times.
    thank you

  • ADF server-side state saving method

    Hi all,
    As far as I know, ADF has three view state saving methods.
    1. client - tokens
    2. client - all
    3. server
    My question is about server-side state saving.
    If I set state saving methos "server" in web.xml, view state is stored in session scope as LRU map.
    And the size of the map can be configured with below parameters in web.xml.
    <context-param>
    <param-name>com.sun.faces.numberOfViewsInSession</param-name>
    <param-value>10</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.numberOfLogicalViews</param-name>
    <param-value>5</param-value>
    </context-param>
    However I think these parameters is offered by Mojarra (Sun's JSF RI) and any ADF guides don't mention them.
    These parameters are supported in ADF?
    Regards,
    Atsushi

    Hi,
    don't have a support statement for this but would be surprised if we don't as ADF Faces runs on top of the JSF RI.
    However, I am wondering why your customer prefers state saving being handled on the server as it doesn't allow fail over for your application setup. Also it is the recommended option
    http://docs.oracle.com/cd/E25054_01/web.1111/b31973/ap_config.htm#CEGECDJF
    +"Context parameter javax.faces.STATE_SAVING_METHOD: Specifies where to store the application's view state. By default this value is server, which stores the application's view state on the server. *It is recommended that you set javax.faces.STATE_SAVING_METHOD to client* when you use ADF Faces, to store the view state on the browser client. When set to client, ADF Faces then automatically uses token-based, client-side state saving. *You can specify the number of tokens to use instead of using the default number of 15*.+
    +You can specify the following state-saving context parameters:+
    +org.apache.myfaces.trinidad.CLIENT_STATE_METHOD: Specifies the type of client-side state saving to use when client-side state saving is enabled by using javax.faces.STATE_SAVING_METHOD. The values for CLIENT_STATE_METHOD are:+
    +token: (Default) Stores the page state in the session, but persists a token to the client. The simple token, which identifies a block of state stored back on the HttpSession object, is stored on the client. This enables ADF Faces to disambiguate the same page appearing multiple times. Failover is supported.+
    +all: Stores all state information on the client in a (potentially large) hidden form field. It is useful for developers who do not want to use HttpSession.+
    +*Performance Tip:*+
    +Because of the potential size of storing all state information, it is recommended that you set client-state saving to token.+
    +*org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS*: Specifies how many tokens should be stored at any one time per user, when token-based client-side state saving is enabled. The default is 15. When the number of tokens is exceeded, the state is lost for the least recently viewed pages, which affects users who actively use the Back button or who have multiple windows opened at the same time. If you are building HTML applications that rely heavily on frames, you would want to increase this value.+
    +*org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE*: Specifies whether or not to globally compress state saving on the session. Each user session can have multiple pageState objects that heavily consume live memory and thereby impact performance. This overhead can become a much bigger issue in clustering when session replication occurs. The default is off.+
    +org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE: Enables the Application View Cache (AVC), which can improve scalability by caching the state for the initial renders of the page's UI at an application scope. However, every page in the application must by analyzed for support in the AVC to avoid potential problems with debugging in an unexpected state and information leakage between users. Additionally, development is more difficult since page updates are not noticed until the server is restarted, and although initial render performance is enhanced, session size is not.+
    +*CAUTION:*+
    +The Application View Cache is not supported for this release. The feature does not work for any page where the rendering of the component tree causes the structure of the component tree to change temporarily. Since this is often the case, USE_APPLICATION_VIEW_CACHE should not be used."+
    So unless your customer has a good reason for server side state I would suggest him/her to go with best practices
    Frank

  • Work around for server not found problems on FF36

    I have found a work around for all the people having server not found problems with FF36.
    If you manually set your network adapter DNS to an external DNS server (as opposed to your local ISP) then the problem goes away. I set mine to use the two google DNS servers:
    Preferred: 8.8.8.8
    Alternate: 8.8.4.4
    Not a clue why this works but it is 100% successful on my desktop PC, whereas before I could hardly connect to a webpage with FF36 without multiple page refreshes and much frustration, even though FF35 was fine and rolling back to FF35 was also fine.
    Something has changed in FF36 and either the way it handles DNS or the way it works with some network adapters.
    It is nothing to do with add-ons, profiles or firewall software as I have tried all of these things and only the DNS change made a difference. I even copied over a full working profile and the program files directory for Mozilla from my portable which was having no problems and the problem still existed on the desktop, which is why I started looking at the network adapater since everything else between the working PC and the non working one was identical.
    Hopefully this will help the developers to pin down the real cause of the problem and fix it in the next release.

    Well done. Thanks for finding that.
    That is not only assigned but has an approved patch included in the scheduled Fx36.0.1 release so it should be fixed in few days, watch out for the upgrade.
    * Bug 1093983 - DNS resolver should not use 'ANY' to get cached records for TTL <sup>[https://bugzilla.mozilla.org/show_bug.cgi?id=1093983#c35 c#35]</sup>
    * https://wiki.mozilla.org/Firefox/Channels/Meetings/2015-03-03#Schedule_Update
    With the bug now fixed it would not really be appropriate to add further comment. I do now see another related bug assigned but not being fast tracked, so if all goes well that will probably land in Firefox 39.
    * Bug 1138242 - DNS: Request A and AAAA record types rather than ANY when obtaining TTL on Windows

  • Switch statement problem

    I am doing a question in which I have to make a simple ATM program that can withraw and deposit money as many times as the user wants. To exit the program the user has to hit "x". I have to use a switch statement. Im getting incompatible type errors after compiling it. Can anyone help me? Sorry if the formattings not too good.
    //ATM.java
    //This program reads in a user's opening balance and performs a withdrawal or a deposit at the request of the user
    import java.text.*;
         public class ATM
         public static void main(String args[])
              int      balance;
              char      withdrawal, deposit, choice;
              //Ask for the opening balance
              System.out.print("Please enter your opening balance");
              balance=UserInput.getInt();
              //Find out what the user wants done
              System.out.print("What would you like to do? (Withdrawal, Depositor Exit(x))");
              choice=UserInput.getChar();
                                                                          switch(choice){     
    case "w":
                                                                          while(balance>0)
                                                                                              System.out.print("How much would you like to withdraw?");
                                                                                              withdrawal=UserInput.getChar();
                                                                                              balance=balance-withdrawal;
                                                                                              System.out.print("Your remaining balance is " + balance);
                                                                                              break;
    case "d":     
    while(balance>0)
                                                                                              System.out.print("How much do you wish to deposit?");
                                                                                              deposit=UserInput.getChar();
                                                                                              balance=balance+deposit;
                                                                                              System.out.print("Your new balance is " + balance);
                                                                                              break;
    case "x":          
                                                                System.out.print("Goodbye and thank you for using this program");
                                                                                              break;
    default:     
                                                                     System.out.print("We were not able to process your request, please try again");
                                                                                              break;
    }

    Type a reply to the topic using the form below. When finished, you can optionally preview your reply by clicking on the "Preview" button. Otherwise, click the "Post" button to submit your message immediately.
    Subject:
    Click for bold      Click for italics      Click for underline           Click for code tags      
      Formatting tips
    Message:
    Add topic to Watchlist:
    Original Message:
    Switch statement problem
    Xivilai Registered: Mar 3, 2007 9:52 AM      Mar 3, 2007 10:06 AM
    I am doing a question in which I have to make a simple ATM program that can withraw and deposit money as many times as the user wants. To exit the program the user has to hit "x". I have to use a switch statement. Im getting incompatible type errors after compiling it. Can anyone help me? Sorry if the formattings not too good.
    //ATM.java
    //This program reads in a user's opening balance and performs a withdrawal or a deposit at the request of the user
    import java.text.*;
    public class ATM
    public static void main(String args[])
    int balance;
    char withdrawal, deposit, choice;
    //Ask for the opening balance
    System.out.print("Please enter your opening balance");
    balance=UserInput.getInt();
    //Find out what the user wants done
    System.out.print("What would you like to do? (Withdrawal, Depositor Exit(x))");
    choice=UserInput.getChar();
    switch(choice){
    case 'w':
    while(balance>0)
    System.out.print("How much would you like to withdraw?");
    withdrawal=UserInput.getChar();
    balance=balance-withdrawal;
    System.out.print("Your remaining balance is " + balance);
    break;
    case 'd':
    while(balance>0)
    System.out.print("How much do you wish to deposit?");
    deposit=UserInput.getChar();
    balance=balance+deposit;
    System.out.print("Your new balance is " + balance);
    break;
    case 'x':
    System.out.print("Goodbye and thank you for using this program");
    break;
    default:
    System.out.print("We were not able to process your request, please try again");
    break;
    }

  • Official documents on escaping characters in SQL Server query statements

    Hi,
    Are there any official documents on how to escaping special characters in SQL Server query statements? I find a lot of online resources discussing about this, but there are no definitive conclusions on:
    Which characters should be escaped? (Some only said single-quote needs to be escaped, double-quote does not need. While others said both need to be escaped)
    How to escape characters? (Some said using two single-quote to escape a single-quote. Others said using a backslash, etc.)
    So I just wonder if there is an official document from Microsoft regarding this?
    Thanks
    Alan

    Depends on where you're using them
    If its string values then single quotes(') should be escaped by putting one more single quote before it.
    If its LIKE operator you can use ESCAPE keyword or use [] to escapre special characters 
    see
    http://visakhm.blogspot.in/2013/01/wildcard-character-based-pattern-search.html
    If inside SSIS expression you can escape characters like \ " etc by adding an extra \ before the characters
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Sun Application Server 8 response problem

    Hi forum. I�d installed moths ago SJAS 8 and it woks good. By any reason, I�d to uninstall it. But recently I reinstall te server, without any problem, and I can use teh "Start default server" on the Menu Start. But when I try to access the "localhost:8080", the browser stand hanged. And unusually, any browser in my system (netscape,iexplorer,opera,firefox) won�t work, even to load any site when the Server is working. The option "Stop default server" don�t working too. I�d try install SJAS 8.0, SJAS 8.1 and SJAS 8.1 multilanguaje, but with the same results. Even I�d try change the HTTP port from 8080 to 8282, but nothing happends. Any idea?

    Hi, again. Other details of my installation , The server is SUn Java System Application Server Plataform Edition 8.12005Q1, my machine is an AMD Athlon 1.25Mhz, with 256Mb RAM (Yes, slow for use the server, but it ran without troubles the first time I installed), The JDK is J2SE1.5.0_5 and JRE1.5.0_05. I had read the troubleshotting guide, and the server log register that the server successful finish the start up proccess, and the file domain.xml register correctly the "http-listener" on 8080 port. When I start to search the source of trouble, I remmember that I have the Tomcat 5.5 installed and using the 8080 port, then I uninstall the Tomcat, but the problem persist with the SJAS.

  • WEBLOGIC MANGED SERVER HEALTH STATE IS UNKNOWN

    Dear Team,
    I am working as support engineer in a production environment.
    I am facing some issue described below:
    1. One of Weblogic managed server health state is WARNING. I have checked in managed server log and found below error:
        <Jun 22, 2014 5:13:37 AM IST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "7,222" seconds working on the request "Workmanager: nlsi/wm/MarshallerWorkManager, Version: 0, Scheduled=true, Started=true, Started time: 7222299 ms
    ", which is more than the configured time (StuckThreadMaxTime) of "7,200" seconds. Stack trace:
    As the Health is in warning state managed server become fully unresponsive.
    Now I have following query:
    1. What is the risk if managed server health state is WARNING?
    2. Is Stuck thread will make the server go into an Unknown state?
    3. If managed server state in UNKNOWN then what is the risk?
    3. Could you please provide any solution so that in future we should not face this WARNING health state.
    4. Could you please investigate why this health state WARNING occur?
    Please help me.
    Regards,
    Maity

    Dear Team,
    I am working as support engineer in a production environment.
    I am facing some issue described below:
    1. One of Weblogic managed server health state is WARNING. I have checked in managed server log and found below error:
        <Jun 22, 2014 5:13:37 AM IST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "7,222" seconds working on the request "Workmanager: nlsi/wm/MarshallerWorkManager, Version: 0, Scheduled=true, Started=true, Started time: 7222299 ms
    ", which is more than the configured time (StuckThreadMaxTime) of "7,200" seconds. Stack trace:
    As the Health is in warning state managed server become fully unresponsive.
    Now I have following query:
    1. What is the risk if managed server health state is WARNING?
    2. Is Stuck thread will make the server go into an Unknown state?
    3. If managed server state in UNKNOWN then what is the risk?
    3. Could you please provide any solution so that in future we should not face this WARNING health state.
    4. Could you please investigate why this health state WARNING occur?
    Please help me.
    Regards,
    Maity

  • HT1923 itunes does not recognise CD's uploaded ,    can't connect to server it states  ,

    itunes does not recognise CD's uploaded 
    can't connect to server it states
    although PC is connected to the internet itunes can't find the connection 
    have an ipod nano
    this is complicating things as I can't change what's on the ipod either

    Try a hard reset by pressing the Home button and Wake / Sleep button at the same time, keep them both pressed until the Apple Logo appears on the screen.
    This does not lose any data on your iPad.

  • JBOSS  4.0 Application Server start up problem?

    1. JBOSS Application Server start up problem?
    I have installed the JBOSS 4.0 application server in eclipse 3.4(Ganymede) in order to work with the adempiere open source ERP.When I start the JBOSS server,It displays the message &ldquo;Server started in Xm:XXs:XXXms&rdquo; in the console window.But the progress bar in server window is still running.Once the time out is over,it displays the message server cannot be started.
    What should I do in order to make eclipse know that the server is started(message in console as server started) and set its status to &ldquo;Started&rdquo;?
    2.Is it possible to copy and paste the .war created in eclipse 3.4 using JBOSS 4.0 to Glassfish v2 which requires archive file .ear form in NetBeans IDE 6.1?

    i also noticed when I start the server some times the first line it display in the container will be starting Microcontainer some times it diaplays microkernel?You can find out reason based on that also?
    Actually I was using 8080 port for my Oracle 10g Express Edition.Even when I change the port in server view,I had same problem.In order to recover from the problem,I finally changed my database port,My Jboss 4.0 has started succesfully. When I access the JBOSS in URL http://localhost:8080/jmx-console,i got the error can you tell me what can i do?
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
    root cause
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
         org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
         org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929)
         org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    Apache Tomcat/5.0.28

  • Fulfilment server encountered a problem with authentication

    I am trying to create my first app using DPS app builder, all the step have been done correctly, however creating the app give the f
    ollowing error
    "The fulfillment server encountered a problem with authentication"
    Anyone face this before? how to solve this issue? I can't find anything in the guidline files

    Hello again
    The app rejected once again and here is the itunes message
    "We found that while you have submitted In App Purchase products for your app, the In App Purchase functionality is not present in your binary. "
    I am able test the development version of the app and I can see the folio inside it with an option to buy, I can't locate any error in the development side and I need more clarification from your side about the rejection, why the binary is rejected?
    There is nothing wrong from my side. my app is working on the testing version and everything is OK.
    You rejected the app because in-app purchase is not enabled as you claimed. but I can see the folio inside the app with an option to buy, nothing wrong and no error what so ever is facing me. why you rejected the binary?
    I really need your help to identify where the problem is, I have to get the viewer ready for sale July 1st. it is been rejected for couple of time and I am not sure why.
    Regards;
    Rafah Alkhatib
    CEO
    [email protected]
    http://www.reachsn.com
    Dubai, Riyadh, Amman

  • EX13 Server Component State for 'proxy' inactive

    Hi All,
    I've just ran a Get-ServerComponentState and its showing that all the 'proxy' components are Inactive, I have tried the Set-ServerComponentState but this doesn't help. Has anyone had this before by any chance or know a way to activate them?
    Thanks,
    R182

    I haven't done so intentionally, how do I check this or revert the changes back so they're active again as I think this is causing connection issues.
    Thanks!
    R182
    Run this:
    $MM = Get-ServerComponentState -id EX13 -Component  ServerWideOffline
    $MM.localstates
    ...to check what requester that put the components in a Inactive state.
    During an upgrade or Exchange security patch install - Exchange itself use the requester
    Functional and if you see that in the output you get running the above,  run:
    Set-ServerComponentState -id SERVERNAME -Component  ServerWideOffline -state Active -Requester Functional
    For more information, See:Server Component States in Exchange 2013
    http://blogs.technet.com/b/exchange/archive/2013/09/26/server-component-states-in-exchange-2013.aspx
    Martina Miskovic

  • Problem with server side state saving ,JSF 1.1.1

    Hello,
    In my web.xml  the.STATE_SAVING_METHOD setting is s server
    <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
    for measurement of application security isn't not allow to change this parameter to client , so the problem  when i access for application and i open a new page via linker for print for example and i would access for my initial page to make change or modify my initial page it s no possible to make any modification because i have a empty bean , but if the state saving is a client i haven't a problem because a tree map is stored in client browser, so my version of JSF is 1.1.1 ,
    So can you explain the cause for his problem
    and what's the solution for my problem ?
    NB:i can't change the parameter for STATE_SAVING_METHOD for a client
    Thank you

    did you search this form, there were lot of discussions in the past about server side cookies, you may find an answer to your problem.
    alternate approache for sending a value from parent page to the pop up window.
    1. when opening the pop up pass the values along with the url (if the size of variable is small)
    alternatively you can store the value in a hidden form field in parent window and access the same from poup window using
    you can simple access the page one form field value in page 2 (pop up) by using the following code.
    window.opener.document.getElementById('hiddenformfieldid').value

  • Problem : SQL Server Delete Statement vs Oracle Delete Statement

    Hi,
    I am currently involved in a SQL Server - Oracle Migration effort and I have hit a roadblock on one of the queries.
    I have created two tables named DUMMY and DUMMY1 in MSDE with the same structure :-
    CREATE TABLE DUMMY
         CLIENT_ID                                             INT,
         NME                                                   VARCHAR(80),
         BATCH_ID                                              INT,
         CATALOG_NAME                                          VARCHAR(50),
         DATA_SOURCE                                           VARCHAR(50)
    GOI have a DELETE statement that deletes from the two tables, by selecting common data using Joins:-
    DELETE  DUMMY
    FROM      DUMMY src
            JOIN
         DUMMY1 dst 
              ON
                  src.batch_id = dst.batch_id 
              AND src.catalog_name = dst.catalog_name 
              AND src.data_source = dst.data_source
         WHERE
                   src.batch_id     = 1
              AND      src.catalog_name = '1'
                  AND      src.data_source  = '1'Now, I have created the same Tables ( DUMMY and DUMMY1 ) in Oracle :-
    CREATE TABLE DUMMY
         CLIENT_ID                                             NUMBER(5),
         NME                                                      VARCHAR2(80),
         BATCH_ID                                             NUMBER(10),
         CATALOG_NAME                                  VARCHAR2(50),
         DATA_SOURCE                                     VARCHAR2(50)
    )I have written a Delete statement to mimic the fucntionality in this manner :-
    DELETE FROM 
              DUMMY 
    WHERE
                   client_id,
                   nme,
                   batch_id,
                   catalog_name,
                   data_source
              IN
                   SELECT *
                   FROM
                        DUMMY  src
                                           JOIN 
                        DUMMY1  dst 
                             ON
                                  src.batch_id = dst.batch_id
                             AND      src.catalog_name = dst.catalog_name
                             AND      src.data_source = dst.data_source
                        WHERE
                                  src.batch_id = 1
                             AND      src.catalog_name= '1'
                             AND      src.data_source = '1'
              )However, I keep getting this error whe I try to test it :-
    ORA-06550: line 1, column 89:
    PL/SQL: ORA-00913: too many values
    Can you please help me modify the query to simulate the same functionality as the orignial SQL Server Query ?
    Thanks,
    Sandeep

    There is probably a mismatch between the number of columns.
    Try this * Not Tested *
    DELETE FROM 
              DUMMY 
    WHERE
                   client_id,
                   nme,
                   batch_id,
                   catalog_name,
                   data_source
              IN
                   SELECT      src.client_id,
                   src.nme,
                   src.batch_id,
                   src.catalog_name,
                   src.data_source
                   FROM
                        DUMMY  src
                                           JOIN 
                        DUMMY1  dst 
                             ON
                                  src.batch_id = dst.batch_id
                             AND      src.catalog_name = dst.catalog_name
                             AND      src.data_source = dst.data_source
                        WHERE
                                  src.batch_id = 1
                             AND      src.catalog_name= '1'
                             AND      src.data_source = '1'
              );

  • Mac Mini with Mavericks Windows Server Access Permissions Problem

    We have a Mac Mini that was running Lion. This machine was joined to our Active Directory network using Beyond Trust’s PowerBroker Identity Services add-on. This had been working fine with no issues.
    We recently had to change the permissions on the file server (Windows Server 2012) for one of the directory branches. The share permissions are set to Modify and the file permissions were set so the user of the Mac had full control over the files.
    The Mac then started experiencing a problem where it could not open some of the files on the network this only affected certain files or folders. A couple of other machines we have running Mavericks who are not domain joined had no problems accessing the files when connected to the share as the same user.
    I then upgraded the Mac to Mavericks after removing the Beyond Trust software. The Mac was then re-joined to the domain using the native support of Mavericks. This fixed the problem temporarily and by this all seems fine for maybe one or two hours and then suddenly you cannot access files anymore.
    When I looked at the permissions of a file that could not be opened it was showing the same user name twice. One with r/w access and the other with Custom. If the Mac was re-booted the problem would disappear again for another hour or so but then come back.
    Thinking the issue was with the AD integration yesterday I took the Mac off the domain and just left it as standalone connecting to the server. The local user accounts that were from the AD user have been deleted so there is now only Administrator, Guest (disabled) and the user. This has not fixed the problem.
    What I have noticed is that while it is working when you look at the permissions on the file through finder they say “You have custom access”. When it is broken the permission change to showing the user multiple times, etc.
    I have reset the permissions on the server a number of times and it makes no difference.
    I am assuming that when it is working the Mac is reading the permissions correctly from the Windows Server and then it suddenly decides to use some other set of permissions it is getting locally to the files.
    Does anyone have any idea how I can fix this?
    Thanks

    Both OS X and OS X Server can host Subversion (SVN), yes.  That's been possible for many years, and there are directions posted around the 'net for downloading and installing and setting up the Subversion server.
    Distributed source code control packages (and links from there) — such as Mercurial and particularly git — would be some of the more common and newer technologies used here.  These too can be installed on OS X and OS X Server.
    On the 'net, Subversion, git, Mercurial, Bizaar and other distributed packages are all platform-independent.  The remote clients don't know and don't care about the type of server hosting the repository.
    As for your Mavericks Server question — and quoting directly from this Apple web page, and thus permitted to be posted here — "The new features in Xcode Server make it easier than ever for a Mac or iOS development team to create robust, reliable software, thanks to continuous integration, testing, and repository hosting services."    (Beyond this quote and any other officially-public Apple statements or public Apple presentations, you'll have to be a registered Apple Developer to gather more information and potentially access to the previews, as OS X Mavericks and Mavericks Server and Xcode 5 are all presently under NDA.)

Maybe you are looking for