Servlet executes only once, the first time???

Hello evrybody,
I'll try to be specific regarding the problem. I have an HTML file called Login.html. When I click on this file, a page opens allowing the user to enter his/her username and password. So, I compiled my servlet and I clicked on the Login.html file. I entered some existing username/password combination and the new page opened saying "Login Succesful!". I then close that page and go and click on Login.html again. This time I enter some username/password combination that is not existing in database and according to my servlet a new page is supposed to be opened with a message saying "The username and password you provided are not valid. Please register first!". But, what happenes is that a blank new page is opened with no message (also same thing would happen even if I provided the valid username/password combination). What could cause this? I tried to put rs.close() in the code (rs is reference to a ResultSet object) but it does not make any difference. Can anyone give me a clue about what might be causing this strange behavior? Thanks in advance,Jimmy.
The code for my servlet is provided below:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import java.io.PrintWriter;
public class LoginServlet extends HttpServlet {
     String jdbcDriver="sun.jdbc.odbc.JdbcOdbcDriver";
     String dbURL="jdbc:odbc:Schedule";
     Connection dbConn=null;
     public void init() throws ServletException {
          try {
               Class.forName(jdbcDriver).newInstance();
               dbConn=DriverManager.getConnection(dbURL);
          catch (ClassNotFoundException e) {
               throw new UnavailableException("JDBC driver not found:"+jdbcDriver);
          catch (SQLException e) {
               throw new UnavailableException("Unavailable to connect to: "+dbURL);
          catch (Exception e) {
               throw new UnavailableException("Error: "+e);
     public void doPost(HttpServletRequest request,
                         HttpServletResponse response) throws IOException {
          try {
                    PrintWriter out=response.getWriter();
                    Statement stmt=dbConn.createStatement();
                    String username=request.getParameter("username");
                    String password=request.getParameter("password");
                    String sql="select UserName,Password from Personal_Info where Personal_Info.Username='"+username+"' AND Personal_Info.Password='"+password+"'";
                    ResultSet rs=stmt.executeQuery(sql);
                    if (rs.next()) {
                         out.println("<HTML><HEAD>");
                         out.println("<TITLE>Meeting Scheduling Page</TITLE>");
                         out.println("</HEAD>");
                         out.println("<BODY>");
                         out.println("<H2>Login Succesfull!</H2>");
                         out.println("</BODY></HTML>");
                         out.close();
                         rs.close();
                    else {
                         out.println("<HTML><HEAD>");
                         out.println("<TITLE>Please Register First</TITLE>");
                         out.println("</HEAD>");
                         out.println("<BODY>");
                         out.println("<H2>The username and password that you provided are not valid!</H2>");
                         out.println("<H2>Please enter the valid username and password or register first.</H2>");
                         out.println("</BODY></HTML>");
                         out.close();
                         rs.close();
          catch(Exception e)     {
                    e.printStackTrace();
          finally {
                    try {
                         if (dbConn !=null) {
                         dbConn.close();
                    catch (SQLException ignored) {

I solved the problem by using destroy() method instead of finally block. Thanks,anyway,Jimmy.

Similar Messages

  • Execute command only at the first time?

    English:
    Hi would like to take an application a particular command only at the first time run so he is no longer running for the 2nd time ! How to do that ? thanks Hollo1001
    German:
    Hallo möchte bei einer anwendung einen bestimmten befehl nur beim ersten mal ausführen so das er beim 2. mal nicht mehr ausgeführt wird! Wie macht man das? MFG Hollo1001

    use a boolean:
    var alreadyExecuted:Boolean;
    if(!alreadyExecuted){
    alreadyExecuted=true;
    // rest of once only code

  • Delay on playing an instrument (only at the first time)

    Hello,
    I'm new to Mainstage and have the following problem:
    Always I open my concert, there is a small delay in all instruments in all patches. But ONLY at the first time, I play the instrument (hit the key). For the rest of the performance everything works fine ... How can I get rid of that??
    My work-around right now is, to mute the Main Audio at the soundcheck and play every instrument/patch once ... :-(
    Thanks for your support and greets from Germany
    ... Joonas

    Thanks for your answers first of all !
    At the end I found the solution looking at the Note:307167.1 on Metalink:
    Discoverer Plus 10.1.2 Fails with ORA-1017 Error On First Login Attempt Then Works On Second Attempt
    This note is very useful but into the solution the point 3 is not correct !
    3. Modify the servername parameter to indicate the fully qualified servername.domain
    Example:
    An httpd.conf setting of: ServerName my_servername.mydomain.com should match a Discoverer Plus URL like http://my_servername.mydomain.com:7778/discoverer/plus
    I had this problem both with Viewer and Plus...so instead to change the server name parameter (into the Apache/Apache/conf/httpd.conf file) with my complete URL (http://gnvdev.ote.gr:7779/discoverer/plus), I just write my right server name:
    Example
    After the installation of the Discoverer 1og server, into the httpd.conf file it was written automatyically: ServerName gnvdev
    I just modified in ServerName gnvdev.ote.gr and both Viewer and Plus started to work perfectly at the first time.
    I hope that this hint will be useful for you and others in the Discoverer forum !!!
    Best Regards
    Alex

  • Applications are mentioned free, but when we start downloading one dollar is charged in my credit card, but only for the first time when i switch on and use it for the first time one dollar is charged. and from next application it is free. why?

    Applications are mentioned free, but when we start downloading one dollar is charged in my credit card, but only for the first time when i switch on and use it for the first time one dollar is charged. and from next application it is free. why?

    Kindly inform any email id or toll free number to contact apple for your below answer, Mr.King_Penguin
    About receiving my credit card being debited for Free App Store Application downloads,
    It should be within a few days, but it might vary a bit by bank/provider :
    I am in India, if the bank don't refunds , what to do?
    Rajagopal.pngr :-  It is only a holding charge, it is not a permanent charge. If it isn't refunded within a few days or so (and it quite possibly won't be over a weekend) then you can query the charge with Apple.

  • PDF only open the first time

    HI
    I have a problem with the PDF export, of any type of document; the situation is complicated in the case of documents which provide for the printing of batches of transactions. Let me give an example.
    I open a delivery customers and I click on the icon PDF: SAP opens the pdf of Transactions batch and then the standard form of delivery; simultaneously saves both pdf folder of images.
    If, once closed the pdf, I click again icon PDF (or after creating a new document), SAP only opens the transaction reports; the report of delivery is not open on the screen but is only saved in the attachments.
    In order to view again I have to close the form and reopen it.
    Is the first time that the next time, the log file I have the message "Invalid input parameter for DfltSeq", but the first time you open the pdf.
    Does anyone know help me to understand why:
    1. SAP does not reopen both reports from the second time
    2. the pdf are saved once in the path of the images, and after the path of attachments.
    Thanks
    NL

    Hi Maggie,
    can you tell me if there is something official SAP (Notes or other) with the problem and that SAP will provide a solution?
    I have the SAP 9.0 PL 14 and I do not have the problem.
    the customer have 9.0 PL 16 and has the problem.
    Thanks
    Nora

  • Setting a variable values only in the first time

    Hi all,
    I have a problem regadring PL-SQL coding..actually its something related to programming logics.
    I'm calling a method (modify) from client application and which calls several other methods. (check_update and update)
    method update updates the database and then calls some other method. (modify_something) That method modify_update calls check_update and and update methods.
    Also i have a global variable (var_1) defined in the packages level which is used for some condition checking in update method. But unfortunatly i have to change the value of that variable in modify_something method. So the original value of the var_1 is lost.
    Is there anyway to keep the original value of this variable...please dont tell that i have to stop changing the variable value in modify_something its NOT possible at any cost.
    Expecting some help from PL-SQL gurus..
    thanks in advance..
    /garuka

    Hi,
    I know about the concept of scoping. The problem here is not that.
    The problem is how i change a value of a variable only once when it calls for the first time and stop changing the value for the other times.
    If i explain it little more its like this.
    I want to change the value of the var_1 when it check_modify calls for the first time. and use if in some other methods. But var_1 is modified by some other client methods which are called by update method which is called after check_update method.
    So my problem is if i use the solution samir told how i set the value to that var only once when it calls in the check_update for the first time and then to stop setting it during other method calls and within check_update method which calls recursively.
    Simply do the variable assignment only in the first request only..
    /garuka

  • My AS3 buttons only work the first time

    I have set up my buttons so that are each a movieclip with 'over' and 'out' states/frame labels. They exist on the main timeline. The actionscript controlling them is situated in a frame on the main timeline and the frame holding that actionscript is on the same point within the main timeline where the buttons are introduced. I am using actionscript 3.
    The buttons have been set up so that they navigate to another frame on the same main timeline and on that frame is a movie. The movie dimensions are smaller than the main stage so the buttons are still accessible when each movie is played.
    The problem is my buttons are only working once - by that I mean they go to the correct place when clicked the first time, but when they are clicked again they navigate elsewhere.
    Totally doing my head in trying find a solution and if anyone can help and show me what I'm doing wrong that would be really really helpful. Here's the code I used for the buttons...
    stop();
    function mainBtnOver(event:MouseEvent):void {
    event.target.gotoAndPlay("over");
    function mainBtnOut(event:MouseEvent):void {
    event.target.gotoAndPlay("out");
    ///////// INDIVIDUAL BUTTON CLICK FUNCTIONS
    function mainBtn1Down(event:MouseEvent):void {
    gotoAndPlay("01Movie");
    function mainBtn2Down(event:MouseEvent):void {
    gotoAndPlay("02Movie");
    function mainBtn3Down(event:MouseEvent):void {
    gotoAndPlay("03Movie");
    function mainBtn4Down(event:MouseEvent):void {
    gotoAndPlay("04Movie");
    function mainBtn5Down(event:MouseEvent):void {
    gotoAndPlay("05Movie");
    ////////// Button 1 Listeners
    mainBtn1.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn1.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn1.addEventListener(MouseEvent.CLICK, mainBtn1Down);
    ////////// Button 2 Listeners
    mainBtn2.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn2.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn2.addEventListener(MouseEvent.CLICK, mainBtn2Down);
    ////////// Button 3 Listeners
    mainBtn3.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn3.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn3.addEventListener(MouseEvent.CLICK, mainBtn3Down);
    ////////// Button 4 Listeners
    mainBtn4.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn4.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn4.addEventListener(MouseEvent.CLICK, mainBtn4Down);
    ////////// Button 5 Listeners
    mainBtn5.addEventListener(MouseEvent.ROLL_OVER, mainBtnOver);
    mainBtn5.addEventListener(MouseEvent.ROLL_OUT, mainBtnOut);
    mainBtn5.addEventListener(MouseEvent.CLICK, mainBtn5Down);
    I'm sure it's me doing something very stupid - I'm very new to AS3. Any help much appreciated.
    Thanks :-)

    If the frame labels you are going to have movie clips that have your presentation content, you should use gotoAndStop("frameLabel") instead of gotoAndPlay("frameLabel"). There's no need to play the main timeline when you go to and show any of these movie clips. I'm not sure if this is your issue, though... Using your code, I had no problems.
    Also, you can set up your animated buttons in a way that eliminates the need to have your ROLL_OVER and ROLL_OUT events. This isn't necessarily better, but just another method. Although I might use other ways to animate a button, I do like to reduce the code it takes to use the buttons in an interface, and only use CLICK in most cases.

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • Failed to connect to database ONLY at the first time

    Hi all, I installed Discoverer 10g version and I'm using an Application User to connect to the server where's the Db is installed.
    Every time I try to connect to the server with Discoverer Viewer or Desktop I have a curious behavior....
    ALWAYS but ONLY the first time I try to connect I have the following error :
    - Failed to connect to database - Unable to connect to Oracle Applications database: invalid username/password.
    If I try to re-connect again the second time it works perfectly !!....so, I think, there's nothing related with my .dbc file.
    I tried also to write the ':' at the end of the user name....but it didn't work.
    Into the pref.txt file doesn't exist a parameter like DefaultUserTypeIsApps to set....
    Anybody have had the same "strange" behavior and found a solution or workaround ?
    Thanks in advance
    Alex

    Thanks for your answers first of all !
    At the end I found the solution looking at the Note:307167.1 on Metalink:
    Discoverer Plus 10.1.2 Fails with ORA-1017 Error On First Login Attempt Then Works On Second Attempt
    This note is very useful but into the solution the point 3 is not correct !
    3. Modify the servername parameter to indicate the fully qualified servername.domain
    Example:
    An httpd.conf setting of: ServerName my_servername.mydomain.com should match a Discoverer Plus URL like http://my_servername.mydomain.com:7778/discoverer/plus
    I had this problem both with Viewer and Plus...so instead to change the server name parameter (into the Apache/Apache/conf/httpd.conf file) with my complete URL (http://gnvdev.ote.gr:7779/discoverer/plus), I just write my right server name:
    Example
    After the installation of the Discoverer 1og server, into the httpd.conf file it was written automatyically: ServerName gnvdev
    I just modified in ServerName gnvdev.ote.gr and both Viewer and Plus started to work perfectly at the first time.
    I hope that this hint will be useful for you and others in the Discoverer forum !!!
    Best Regards
    Alex

  • JLabel with HTML visible only for the first time

    I've implemented a really simple applet:
    public class TestApplet extends JApplet {
      @Override
      public void init() {
        try {
          SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
              JPanel topPanel = new JPanel();
              topPanel.setLayout(new BorderLayout());
              getContentPane().add(topPanel);
              JLabel labelHello = new JLabel("<html>Hello World!</html>");
              topPanel.add(labelHello, BorderLayout.NORTH);
              JLabel labelHelloNoHTML = new JLabel("Hello World - without html!");
              topPanel.add(labelHelloNoHTML, BorderLayout.SOUTH);
        } catch (Exception e) {
          System.err.println("Couldn't initialize GUI");
    }And there are two html pages, both having the same applet and a link referring to each other:
    index.html
    <html>
           <head><title>Applet</title></head>
           <body>
                  <div><a href="link.html">Link</a></div>
                  <div>
                        <applet hspace="0" height="375" align="left" width="600" vspace="0" mayscript="" alt="GetJava" codebase="./"
                        code="com.test.TestApplet" name="TestApplet"></applet>         
                  </div>
           </body>
    </html>link.html
    <html>
           <head><title>Applet</title></head>
           <body>
                  <div><a href="index.html">Link</a></div>
                  <div>
                        <applet hspace="0" height="375" align="left" width="600" vspace="0" mayscript="" alt="GetJava" codebase="./"
                        code="com.test.TestApplet" name="TestApplet"></applet>         
                  </div>
           </body>
    </html>Now when I navigate to index.html the applet shows correctly both labels but in case I jump to link.html the applet shows only the second label i.e. Hello World - without html! . This seems to be specific to Java version 1.6.0_21 and 1.6.0_22, it was working properly in 1.6.0_17. Is anyone else experiencing similar issue or am I missing something?
    Edited by: user13135196 on Nov 25, 2010 4:33 AM
    Edited by: Slavek Tecl on 25.11.2010 13:12

    I am having this exact same issue. I have a JLabel with <html> for superscript in my JApplet. The first time I run my applet it displays fine. All subsequent times (refresh the page, or close the tab then open again) the JLabel with <html> doesn't show. This issue does NOT occur in the Eclipse Applet Viewer, but does occur with Google Chrome9 and IE8.
    I spent forever checking my methods and changing things trying to figure out why all the other labels show. Never would have guessed <html> in a JLabel would make it not display. This is terrible bug. Please fix ASAP.

  • [Solved] DVDs and CDs only work the first time I put them in

    First lets get this straight before it is asked later on down the line. I am a 6 year Linux user and 2 year Arch user. I am currently using xfce4 and thunar as my file manager with thunar-volman installed. This has been a problem for the past year or so. I use my laptop most of the time (also Arch 64 and working like a dream) so I only try fixing it every so often to no avail.
    I can put in a CD or a DVD and play them with VLC. Here's the catch: after I eject the CD/DVD and put in another one I can't play it or find it. The first time I put one in I even get an icon on the desktop. I don't think it's reasonable to have to reboot everytime I want to play another DVD (time wasted by constant rebooting is one of the very long list of reasons I don't use Microshaft products). I'm stumped, I can't be the only one, but my forum searches yield no treasures.
    Last edited by astrozombie (2010-02-03 01:00:15)

    Thanks for trying, however, I posted what I use for a reason. I am using VLC, and I am a minimalist so I don't want a bunch of programs for doing the exact same thing. VLC is the only player for Linux that plays MTS files out of the box, so I'm not interested in switching or adding another.
    Anyways, it's irrelevant because as I said before, thunar mounts it correctly the first time I put in a DVD or CD and displays an icon on the desktop for the disk. Therefore the problem is most likely hal related, since this began about the time we switched to hotplugging, and besides this I love hotplugging so I am also not interested in disabling that (who know what problems I'll introduce for my MAC keyboard and webcam if I do that). Yes I've read the hal and dbus wikis.
    I can even get a USB CD writer to work with xfburn, however it's a relic and I think that's a sorry work around when I have internal drives that, in theory, work just fine. I wonder if it has anything to do with the drives being IDE when I used the SATA install option on the install disk (I did a fresh install last week) since my hard drives are SATA.

  • HT201320 Setting up mail only works the first time and then fails...

    Hello,
    I own a new iPad 4.
    Setting up my own mail accounts works great for the first time (I see new mails and I can sent mails), but the second time I open the Mail-App it complains about my mail settings.
    Mails are provided from my own domain. Using other mail clients I don't have issues.
    Setting is based on IMAP ssl/port 993 and ssl/578. iPad runs on IOS6.1.
    Do you have an idea why?
    Carsten

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • Screen suspend + gnome only works the first time

    Hi all,
    Being new here , i hope i'm posting in the right place.
    I've just installed arch i686 , everything is running like clockwork, nearly everything actually.
    i'll try to explain the problem shortly.
    i've set screensaver to start after 1minute and the screen to suspend after 2 for testing. After a boot, these settings works like a charm, moving the mouse, enter password and go on working. After that, after 1 minute idling, screensaver starts but the screen never switch off. If i open the gnome application to manage power, re-apply my settings, it will work but just the first time.
    It's not a big issue, i know that i've just have to re appply settings each time i leave or switch off monitors manually but it's a bit annoying, and i'm curious , i'd really like to solve this little problem. As i'm not a linux guru at all, i don't know where to start searching, any clue will be greatly appreciated.
    Thx in advance.
    Jojo.
    P.S.: sorry if it's a bit confused and for my english .

    Thx for your answer loafer,
    i'm still "googleing" to find a clue. I'm sure the answer is simple, one day, i ll find it.
    I'm still looking for clues anyway.
    Thx in advance.
    Jojo.

  • HTTPService.send() only works the first time

    I have the follow HTTPService defintion in my mxml page:
    <mx:HTTPService
    id="updateRequest"
    url="{accessURL}"
    useProxy="false" result="onSuccessEvent(event)"
    fault="onFailEvent(event)">
    <mx:request>
    <username>{userName}</username>
    <password>{password}</password>
    <id></id>
    <sname></sname>
    <value></value>
    <randomNum>0</randomNum>
    </mx:request>
    </mx:HTTPService>
    Here is my call:
    updateRequest.request.id= myid;
    updateRequest.request.sname= myname;
    updateRequest.request.value = myvalue;
    updateRequest.request.randomNum = Math.random();
    updateRequest.send();
    The first time call is successful, but second time(after 30
    seconds), after send() function call, I didn't even received
    HTTPService call from server side. Is this somehow cached or I need
    to reinitial it? This looks strange.

    I am having the same issue but have already been using the
    post method. When I click my refresh button or if the timer I have
    set up resets I see no request made to the server.
    private function onResult(Event:ResultEvent):void {
    var myNum:int = Math.round(Math.random() * 2);
    var xmlResult:XML = XML(Event.result);
    _xlcMyListData = new XMLListCollection(xmlResult..asset);
    <mx:HTTPService id="tempXML" resultFormat="e4x"
    result="onResult(event)" method="POST" url="
    http://mysite.net/info_wrapper.php?customer={customer.text}&amp;username={username.text}&a mp;password={password.text}"
    useProxy="false"/>
    <mx:TileList dataProvider="{_xlcMyListData}"
    labelField="fleet" left="35" right="15"
    width="350" backgroundColor="#000000" color="#ff0000"
    fontSize="27" borderColor="#000000" columnWidth="315"
    rowHeight="50" themeColor="#808080" fontWeight="bold"
    allowMultipleSelection="true" id="TileList1" height="0" y="202"
    x="178"/>
    <mx:Button label="Refresh Page Now" height="27"
    fillAlphas="[1.0, 1.0]" fillColors="[#030000, #030000, #474545,
    #474545]" borderColor="#DCDEDF" click="tempXML.send();"/>

  • Suspend command only works the first time

    I'm seeing a strange issue with my machine. If I suspend the system by using either:
    systemctl suspend
    or
    dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
    the system will suspend the first time, but then if I try to suspend again, it doesn't suspend completely. The screen goes black and my external hd shuts down, but the box doesn't shutdown. It stays running.
    Could anyone offer some suggestions on what to check?
    I checked the systemd journal and I don't see any errors that stand out as being the problem.
    Last edited by Gumper (2013-03-03 13:28:56)

    I've got a similar error. When trying to suspend via systemctl the machine goes down.
    The screen goes blank and I can hear my harddrives spinning down but before they go completely silent, the system comes back up again.
    Fully working as if I never even wanted to suspend. I'm pretty sure my drives don't like that a lot.
    The first time after a boot works however, as mentioned by Gumper.
    systemctl reports this:
    A dependency job for suspend.target failed. See 'journalctl -xn' for details.
    But I can't see anything related in the journal.
    This is my second suspend problem now. I already have trouble waking up from suspension on my notebook:
    https://bbs.archlinux.org/viewtopic.php … 5#p1238615
    This new problem now is on my x64 desktop machine if that helps. Of course this happens on the same day I clean my pkg cache
    Last edited by Orim (2013-03-03 22:56:03)

Maybe you are looking for

  • Every time I try to open a project in final cut pro it says general error. What do I need to do to make it stop saying this? Please help me.

    My final cut pro software is acting up!!! Every time I try to open a project it says "general error" and the timeline doesn't even show up. What do I ahve to do to fix  this?

  • AppleScript to make All-Day Events?

    I'm new at this, so forgive the question if it's obvious. I routinely import a calendar using Outlook2Cal from a Windows machine to iCal 2.0.3 on my PowerBook. It works fine, but All-Day events in Outlook show up in iCal as starting at 12:00 AM the f

  • Call Web service in WTK 2.2

    Hy, what I want is to call a web service from a midlet. I am useing WTK 2.2 and it's Stub generator to create client classes from the WSDL file. The generation of the client classes in successful and also the compilation of the midlet. The problems s

  • Unwanted Emails

    I have been recieving the following email messages to my Blackberry over the past 3 days: "This message is used to carry data between the BlackBerry handheld and an associated server. Please do not delete, move or respond to this message - it will be

  • IPod issues, any advice is appreciated.

    Alright, so heres the break down. iPod Video 30g Model It has issues but I'll explain them after because they persist. First of all it only formats with error 50% of the time. When it boots up it takes atleast 3 times longer then any of my friends, a