GW POA Can't write .pid file to var/run/novell/groupwise

I'm running GW 8.0.2 HP2 on SLES 10, and just recently figured out after trying to set up a CRON job that I can't restart my POA without rebooting the server. When I run a rcgrpwise status, the POA shows as "unused." Running rcgrpwise stop or restart fails to stop the POA, though the domain goes up and down with no issue. I've checked my gwha.conf file, and everything appears to be in the correct case, and referencing the correct locations. The domain can create its .pid file in /var/run/novell/groupwise just fine.....
I've read and followed the directions in the tid 7003322 (which sounded like a direct match for this issue), but when I edit the header for the POA an rcgrpwise status returns that it is "unable to check [@gw4post.poa]"
The forum thread titled: "rcgrpwise status shows "unused", but it is running." also sounds like the same problem, but there was no resolution.
Anyone have any ideas? Please let me know if I can provide any further informnation - I'm writing this at 0-dark-30 and probably left something out....
Thanks,
Stacey

Okay, so your stuff looks good.
Yes, when the system boots it's supposed to basically load/fire up the rcgrpwise script (more or less, but it reads the gwha.conf file)
That is quite odd that if you bounce the server, it's fine.
Greg is correct that the PID file(s) get written to the directory where your log files are at.
Do you know where you log directories are at for the MTA/POA?
They should be in diff. directories.
Brief section from the docs:
If you selected Launch GroupWise Agents on System Startup in the Installation program, the Installation program configured your system so that the agents start automatically each time you restart your server. The Agent Installation programs always creates a grpwise startup script in /etc/init.d for starting the agents, as described in Starting the Linux GroupWise Agents as Daemons. To enable automatic startup, the Agent Installation programs also create symbolic links named Snngrpwise in the rc3.d and rc5.d directories so that the agents load on restart into level 3 or 5, depending on the configuration of your Linux system. The value of nn is determined by the chkconfig command during installation so that the GroupWise agents are started in the proper sequence with other processes running on the server.
When the grpwise script runs and starts the GroupWise agents, the agents read the agent startup files in /opt/novell/groupwise/agents/share to check for configuration information provided by startup switches. Because the --show switch cannot be used in the startup files, the agents do not run with server console interfaces when started automatically when the server restarts, unless you modify the gwha.conf file as described in Enabling the High Availability Service for the Linux GroupWise Agents.

Similar Messages

  • Sickbeard fails to start. "Unable to write PID file" [Solved]

    I've installed sickbeard from the AUR but can't seem to get it started.
    when running "sudo systemctl start sickbeard.service" I get the following output:
    Job for sickbeard.service failed. See 'systemctl status sickbeard.service' and 'journalctl -xn' for details.
    'systemctl status sickbeard.service' provides:
    sickbeard.service - SickBeard daemon
          Loaded: loaded (/etc/systemd/system/sickbeard.service; disabled)
          Active: failed (Result: exit-code) since Sat 2013-02-23 14:49:19 CST; 1min 4s ago
         Process: 11518 ExecStart=/usr/bin/sickbeard --nolaunch --daemon --quiet --config $SB_CONF --datadir $SB_DATA --port $SB_PORT --pidfile=/run/sickbeard/sickbeard-8081.pid (code=exited, status=1/FAILURE)
    Feb 23 14:49:18 arch systemd[1]: Starting SickBeard daemon...
    Feb 23 14:49:19 arch sickbeard[11518]: Unable to write PID file: No such file or directory [2]
    Feb 23 14:49:19 arch systemd[1]: sickbeard.service: control process exited, code=exited status=1
    Feb 23 14:49:19 arch systemd[1]: Failed to start SickBeard daemon.
    Feb 23 14:49:19 arch systemd[1]: Unit sickbeard.service entered failed state
    And it looks like 'journalctl -xn' provides about the same info:
    -- Logs begin at Tue 2013-01-08 17:25:44 CST, end at Sat 2013-02-23 14:53:29 CST. --
    Feb 23 14:49:19 arch sickbeard[11518]: Unable to write PID file: No such file or directory [2]
    Feb 23 14:49:19 arch systemd[1]: sickbeard.service: control process exited, code=exited status=1
    Feb 23 14:49:19 arch systemd[1]: Failed to start SickBeard daemon.
    -- Subject: Unit sickbeard.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/li … temd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Softwar … e9d022f03d
    -- Unit sickbeard.service has failed.
    -- The result is failed.
    Feb 23 14:49:19 arch systemd[1]: Unit sickbeard.service entered failed state
    Also, here is the current systemd file for sickbeard, if that helps:
    [Unit]
    Description=SickBeard daemon
    After=network.target
    [Service]
    EnvironmentFile=/etc/conf.d/sickbeard
    User=sickbeard
    Group=sickbeard
    ExecStart=/usr/bin/sickbeard --nolaunch --daemon --quiet --config "$SB_CONF" --datadir "$SB_DATA" --port "$SB_PORT" --pidfile=/run/sickbeard/sickbeard-8081.pid
    Type=forking
    TimeoutStopSec=20
    PIDFile=/run/sickbeard/sickbeard-8081.pid
    [Install]
    WantedBy=multi-user.target
    So I guess obviously the important part is "Unable to write PID file: No such file or directory [2]", but I'm not really sure what that means or how to fix it. I've played around with the PIDfile configuration for the systemd service (tried renaming from sickbeard to sickbeard-8081) but I always get the same error.
    Any ideas?
    Edit: Solved by teekay
    Last edited by spurious_access (2013-02-24 08:09:01)

    The sabnzbd systemd unit file doesn't use a pidfile. Not sure why. It would make more sense there than it does for sickbeard, because IMHO sickbeard should run as the user who owns the target tv-series media folders. Using tmpfiles.d just causes a headache when you are going to update it using the AUR package.
    I installed it once using sickbeard-git from AUR, changed the systemd unit file and /usr/lib/tmpfiles.d/sickbeard.conf to match my user, chown -R'ed /opt/sickbeard, ran "pacman -R --dbonly sickbeard-git", and ever since use "git pull" to update. That also works directly from web interface.
    Last edited by teekay (2013-02-24 08:47:42)

  • Can't write cache file for while creating domain in soa 11.1.1.5 on HP-UX

    Hi,
    Installing SOA 11.1.1.5 on HP-UX and during domain creation/configuration I am getting the below errors
    **sys-package-mgr: can't write cache file for**
    and have lots of cache file errors for different packages
    Any idea what might be wrong and whats the cause of these errors and is it safe to ignore these errors if not what is the work arround. As I already looked at the below post but I don't find */var/tmp/wlstTemp* on my machine as suggested in the post below.
    SOA 11.1.1.5 install got can't write cache file
    So wondering if there's anything else I can do i.e. while creating or configuring a Domain pass some parameter to config.sh etc.
    Thanks

    Hi,
    I don't see python.cachedir in config.sh. Here is config.sh
    #!/bin/sh
    mypwd="`pwd`"
    # Determine the location of this script...
    # Note: this will not work if the script is sourced (. ./config.sh)
    SCRIPTNAME=$0
    case ${SCRIPTNAME} in
    /*)  SCRIPTPATH=`dirname "${SCRIPTNAME}"` ;;
      *)  SCRIPTPATH=`dirname "${mypwd}/${SCRIPTNAME}"` ;;
    esac
    # Set the ORACLE_HOME relative to this script...
    ORACLE_HOME=`cd "${SCRIPTPATH}/../.." ; pwd`
    export ORACLE_HOME
    # Set the MW_HOME relative to the ORACLE_HOME...
    MW_HOME=`cd "${ORACLE_HOME}/.." ; pwd`
    export MW_HOME
    # Set the home directories...
    . "${SCRIPTPATH}/setHomeDirs.sh"
    # Set the config jvm args...
    CONFIG_JVM_ARGS="${CONFIG_JVM_ARGS} -DCOMMON_COMPONENTS_HOME='${COMMON_COMPONENTS_HOME}'"
    export CONFIG_JVM_ARGS
    # Delegate to the main script...
    "${WL_HOME}/common/bin/config.sh" "$@"Thanks

  • SOA 11.1.1.5 install got can't write cache file

    Hi,
    I installed 2 node cluster of SOA 11.1.1.5 on linux and during domain configuration I got errors i.e.
    **sys-package-mgr: can't write cache file for**
    Installation was done and all the servers start/stop fine am able to deploy the processes, am able to access all the urls fine everything coming up fine BAM, SOA, OSB etc . Just wondering if the error above have any effect on the installation or any piece that might not work. As I have already did the installation and ignored those errors above so just wanted to see if anything I need to look for.
    Thanks

    Hi,
    It's a cluster install and took sometime to do the full install so it will be a pain to re-install everything over. Currently have tested the processes and seems to be working fine.
    Also I don't find
    /var/tmp/wlstTemp
    I do see wlstTemp appended with linux users who did Oracle SOA install.
    Also in-future when creating a new environment besides the above chmod 777 on /var/tmp/wlstTemp is there any parameter we can supply when running config.sh. I read some where that in-order to get by these errors at the time of domain creation we can also pass some parameter.
    Thanks

  • How can i write properties file for Hindi font

    Hi All,
    i'm using jdev 11.1.1.5.0
    in my use case i have worked on internationalization where i want to use hindi font
    like this link -
    Majid Hussain: Internationalization of ADF 11.1.1.3 Applications
    as in above post majid used german language and write properties file for german language(which is using english character).
    but my problem is that i want to use hindi language
    so how can i write propery file which support hindi font.
    Manish

    Hi Manish,
    We also had same requirement where we need to show indian local language(Hindi ,Bengali and many more ).
    We had implemented following approach and perhaps it will helpful for you.
    1-First we changed the encoding value in jdeveloper.
       go to jdeveloper --> tools --->preference-->encoding , select to UTF8
    2-We used to get the properties and it's translated value from business and then we were manually put these pair into related resource bundle.
    And using this we were able to implemented multilanguage support.
    Thanks
    Prateek

  • Mail Server Error: Fatal error: can't write proc file

    I am a novice with OS X Server. It has been running fine for months but now I am having trouble. I get the following error log in SA:
    Dec 3 19:19:24 MasterControl imap[1761]: Fatal error: can't write proc file
    Dec 3 19:19:25 MasterControl imap[1763]: DBERROR: dbenv->open '/var/imap/db' failed: Permission denied
    Dec 3 19:19:25 MasterControl imap[1763]: DBERROR: init() on berkeley
    Dec 3 19:19:25 MasterControl imap[1763]: IOERROR: creating /var/imap/proc/1763: No space left on device
    The drive has lots of space left on it.
    Also in the maintenance accounts section, it states for every user there is an unknown mailbox path in the mailbox store.
    Any help would be appreciated.

    I rechecking the situation, the drive is showing that it is totally full. Its a 60 gig drive that yesterday had 10 gigs on it...now it is full. Not sure where the other 50 came from or where they are. I've just deleted some programs and the drive is still showing full.

  • How can I write a file and fill it in periods?

    Hi Every body!
    I need help with this.
    I have my aplication(power quality analiser),This VI obtain several varibles and make a lot of calculus and operation, to obtein others parameters in real time so my problem is Save the acquire data and calculus data into a file (similar as a report) every period(custumizable for the user in time units) 
    I mean make a only one file wich is write every period continuously , e.g.  Start my principal VI and this event start the write of file, past one period,make other row or colum into the same file and continue that way until we stop the principal VI.
    How can I make that?
    Thaks very much 
    Best Regards

    Hi,
    assuming you have your trigger (notifier or just periodically) you can append the data to a single record.
    Open the file, set the file position to the end, write the data and close the file.
    Hope this helps

  • I can not write in file

    hi
    i use tomcat5.32 + cpanel .
    my code is :
    <%
    String path = application.getRealPath("");
    path +="/as.txt" ;
    FileOutputStream fos = new FileOutputStream(path);
    fos.write("this is test ?".getBytes());
    fos.flush();
    fos.close();
    %>
    when requested get this error :
    java.io.FileNotFoundException: /home/domainname/public_html/ROOT/as.txt (Permission denied)
    java.io.FileOutputStream.open(Native Method)
    java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    org.apache.jsp.newjsp2_jsp._jspService(newjsp2_jsp.java:61)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    the perms is 0644 or 0664 but my program can not write in own files .
    please help me !!

    Are you sure that the tomcat process is run by the right user that actually has permission to write the file?
    The file's permissions might be '664' to you, but maybe the tomcat process's user is not in the correct group.

  • Can't write to file when double-clicking jar...

    This issue has me stumped. I have a jar dssetup.jar... The manifest looks like the following...
    Manifest-Version: 1.0
    Main-Class: DSsetUp
    Created-By: 1.3.0_02 (Sun Microsystems Inc.)
    I also have a text file that I read and write to(this file is outside the jar):
    datasource.txt
    If I execute my jar from the command line, I can read and write to the file...no problem. However, if I double click my jar to run it, I can read the text file but cannot write to the text file. Has anyone seen this before?
    Thanks

    It is true ..
    you can not write anything to .jar file directly..
    .jar file is not a common file, it is compressed.
    the following tool give you some cue.
    tool named JavaJar(written by java) can compress and decompress jar,war, ear and.zip...
    may download from http://www.qwerks.com/download/4114/JavaJar.zip
    the tool is very verygood tool.
    but the homepage(www.pivotonic.com) of JavaJar cannot be accessed.
    it is funny.
    good lucky.

  • Can't Write XMP Files

    I'm using Windows XP and LR 1.3.1 and I can't seem to write a specific folder of files. I'm trying to create the XMP files so I can do a global edit to modify the Lense type. When I select all and then click on Save Metadata to Files, the program does not write the files for this specific folder. I have tried this on other files and I don't get the same problem. I have tried moving the specific files themselves to their own collection and trying the same process above, but I get the same result.
    These are Pentax K10D files saved as PEF files.

    The only way that I could get Lightroom to write the xmp files for these specific files was to make a change to all of them AND I had to turn on Automatically write changes to xmp files in the catalog preferences section. If this option was not set, even after making a change to the files, Lightroom would not create the xmp files.
    So I finally got the program to create the xmp files, I just can't understand what's different about these 93 files that insisted on having xmp writes turned on globally before any xmp files could be created. I turned off this global setting after creating the needed files.
    The whole purpose of this exercise was to change the Lense Description to a Sigma 10-20mm F4 from a Tamron lense. I found a shareware program that allowed me to select a directory of files and make a global edit to all 93 xmp files at once. I then read the XMP files back into Lightroom and everything is right with the world.
    Is the option of NOT changing the lense designation within Lightroom a XMP limitation or is this a design decision of the LR engineering team? It sure would be nice to have the option to PAINT the changes (in this case lense description) from one image to the rest of the group, if one chose to do this.

  • Mac Pro Can't write temporary files to 10.4 Server?

    We run a file server on an old G4 tower to a network of about 8 Macs. We are having problems with our first Intel machine. We have a 3ghz Mac pro that appears to work fine except for one problem. The server doesn't allow the Mac pro to automatically write temporary files. This is a problem since we are a design firm and we use indesign for a majority of our projects. Without this temporary file users can access the same file at the same time. This is a major problem!
    Sever is running the latest version of 10.4
    Mac pro is running the latest version of 10.4 as well
    I also ran a test where I logged in from the Mac pro to one of our G5s. Indesign functioned normal in that situation.
    Anyone have any suggestions?

    By looking at your post i have several questions to ask :
    Where are the temporary files stored ?
    Which data sharing scheme are you using for them ? AFP with POSIX or ACL behaviors, something Indesign uses ?
    Which versions of indesign are you using ? Some differences exists in between PPC installs and Universal install and may play havoc with that.
    There might as well be the question of ownership and rights that may differ as mentionned above in between your G5 workgroup and the MacPro.

  • Until how many lines can we  write java file

    in java file, how many lines can I write?
    Manybe It will depend on file system such as window, unix file system.
    but, I don't know the exact size.
    please let me know how many lines I can wirte in java file of window and unix file system.
    thank you in advance.

    A class and method implementation in source lines of code (sans comments and white space) should be as large as necessary, but no larger. Good design principals tend to drive towards smaller peices, but there is no one right size size limit.
    Personally, I suspect any method that has over 50 lines of code as being too large and probably refactorable. I also suspect any single class (or for that matter .java file) with more than 50 methods or more than 2000 lines of code as being too large and probably refactorable. But sometimes we might really need a 500 line method or an 8000 line, 200 method class. Maybe its a performance thing. Maybe it is just that complicated and too hard to break up. I doubt it occurs frequently, but I won't be shocked when I see it.
    Sometimes GUI classes (Swing and AWT) get really huge. Sometimes this is due to code generation, sometimes its just being sloppy. It pays to know the difference.
    But the Java langauge sets reasonable (if not overly generous) limits on bytecode and constant pool sizes If the Java compiler begins to complain that something you have built is is too large, face it, it probably is. It's like running into scope nesting or nested name (class in a class in a class...) size limits - usually not a good sign for the structure of your code.
    Chuck

  • Can you open a file in PS & run a script from LR?

    So one of my commercial clients wants their product files in a variety of formats, including PNG with transparency. I'd love to be able to provide them with this from LR, but you can't export as a PNG. So I've written a script which takes the active document in PS, turns off the relevant layers, converts to sRGB, and saves as a PNG. Is there any way for me to invoke this script from LR, as I am opening the document? Ideally, I'd like to include it in the "Edit in" menu, as a menu item which would invoke PS and run the script. That way I could simply select the images, and get them processing while I do something else. Or do I have to open all the files and then run the script on all the open files?

    99jon (à Johannes de Vilder) il y a 2 mois
    Images are automatically saved back to the LR library but you need to follow a logical sequence for LR to render the export copy. You need to start the round trip from LR as follows and use the save command (Ctrl+S) not save as:
    1) Ctrl+E in the Library to export selected image with develop settings (I choose PSD but tiff is also available in the prefs)
    2) Edit in Photoshop; then Ctrl+S to replace (overwrite) Lightroom export copy
    3) Ctrl+W to close in Photoshop and update Lightroom thumbnail. The saved copy is usually stacked next to the original so don't worry about XMP.
    On Mac OSX Cmd+E; Cmd+S; Cmd+W

  • Can we pass Workflow's text description to Novell Groupwise subject line ??

    Hi experts,
    I have a MM workflow which runs whenever a person creates some material requirement. And that requirement goes to the approver's Groupwise(External Email).
    So my requirement is:-
    If there is any way to pass Workflow's text description to Novell Groupwise Subject Text, so that endusers can be informed of the nature of the workflow.
    Thanks in Advance
    Anu

    What you need to do first is to set this mailbox as a primary profile in outlook (** temporarily - just for the purpose of creating a server side autoreply rule).
    http://support.microsoft.com/kb/829918/en-us?spid=2520&sid=1309
    Once this mailbox has been set as the primary profile, then go to tools => Rules and Alerts => New Rule => Start from a Blank Rule then select "check messages when they arrive" => Next=> then select "Where my name is in the To or Cc box" = Next => then select "Have server reply using a Specific Message" on the Step2 box underneath, click "a specific template" then compose the autoreply on the body of the email and put the subject you want on the sibject field. Once completed composing the autoreply dont forget to click "Save and Close". => Next => Next => Finish.
    Close your outlook and let someone try to send a test email to the "secondary mailbox". They should be able to receive an autoreply regardless if your outlook is closed.

  • Can you write to files with an applet or what?

    Hi I can't get the bufferwriter to output any text to a file. Not sure if this is because I'm using an applet? I wouldn't assume so, but any help would be appreciated
    The problem area is :
    private boolean registerNewUser()
            FileOutputStream writer;
            try
                BufferedWriter out = new BufferedWriter(new FileWriter("logins.txt"));
                out.write(regUserField.getText());
                char [] tempPass = regPasswordField.getPassword();
                String tempString = tempPass.toString();
                out.write("\n" + tempString);
                out.close();
            catch(IOException e)
                System.out.println("Writing file error.");
                System.exit(0);
            int intSS = Integer.parseInt(regSSNField.getText());
            currentUserAccount = new Account(regNameField.getText(), intSS);
            return true;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.Icon;
    import javax.swing.JApplet;
    import javax.swing.JLabel;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    public class JBank extends JApplet implements ActionListener
        private static double totalMoney = 0;
        private static final String BANK_MENUITEM = "Bank";
        private static final String NEW_ACCT_MENUITEM = "New Account";
        private static final String OPEN_ACCT_MENUITEM = "Open Account";
        private static final String DELETE_ACCT_MENUITEM = "Delete Account";
        private static final String TRANSFER_ACCT_MENUITEM = "Account transfer";
        private static final String WITHDRAW_ACCT_MENUITEM = "Withdraw Funds";
        private static final String DEPOSIT_ACCT_MENUITEM = "Deposit Funds";
        private static final String OVERVIEW_ACCT_MENUITEM = "Overview of Accounts";
        private static final String CHECKING_RADIO_BUTTON = "new account checking";
        private static final String SAVINGS_RADIO_BUTTON = "new account savings";
        private static final String RETIREMENT_RADIO_BUTTON = "new account retirement";
        private static final String LOGIN_BUTTON = "login";
        private static final String REGISTER_BUTTON = "register";
        private static final String CANCEL_BUTTON = "cancel";
        private static final String NEW_ACCT_OK_BUTTON = "new account ok";
        private static final String NEW_ACCT_CANCEL_BUTTON = "new account cancel";
        private static final String NEW_USER_REGISTER_BUTTON = "new user registration";
        private static final String MAIN_TITLE_TEXT = "JBank - A Comp 285 Project";
        private Container contentPane = getContentPane();
        private JFrame loginFrame = new JFrame();
        private JFrame registrationFrame = new JFrame();
        private JFrame newAccountFrame = new JFrame();
        private JLabel title;
        private JTextField loginField;
        private JPasswordField passwordField;
        private JTextField regNameField;
        private JTextField regSSNField;
        private JTextField regUserField;
        private JTextField initialMoneyField;
        private JPasswordField regPasswordField;
        boolean trueUser = false;
        boolean savingsSelected = false;
        boolean checkingSelected = false;
        boolean retirementSelected = false;
        Account currentUserAccount;
        public void init()
            //Login First
            loginFrame();
            contentPane.setLayout(new BorderLayout());
            // background color: lightblue
            float red = 0f;
            float blue = .3f;
            float green = .2f;                                     // Java sees double, must specify a suffix of f to
            float alpha = .05f;                                    //create float since
            Color lightBlue = new Color(red, green, blue, alpha); //<-- constructor requires floats
            contentPane.setBackground(lightBlue);
            // Menu
            JMenuBar jBar = new JMenuBar();
            JMenu bankMenu = new JMenu(BANK_MENUITEM);
            JMenuItem b;
            b = new JMenuItem(NEW_ACCT_MENUITEM);
            b.addActionListener(this);
            bankMenu.add(b);
            b = new JMenuItem(OPEN_ACCT_MENUITEM);
            b.addActionListener(this);
            bankMenu.add(b);
            b = new JMenuItem(DELETE_ACCT_MENUITEM);
            b.addActionListener(this);
            bankMenu.add(b);
            b = new JMenuItem(TRANSFER_ACCT_MENUITEM);
            b.addActionListener(this);
            bankMenu.add(b);
            b = new JMenuItem(OVERVIEW_ACCT_MENUITEM);
            b.addActionListener(this);
            bankMenu.add(b);
            jBar.add(bankMenu);
            setJMenuBar(jBar);
            // Title JBankset
            title = new JLabel(MAIN_TITLE_TEXT);
            contentPane.add(title);
        public void actionPerformed(ActionEvent arg0)
            String command = arg0.getActionCommand();
            if (command.equals(BANK_MENUITEM))
                title.setText(MAIN_TITLE_TEXT + " " +
                        BANK_MENUITEM);
            else if (command.equals(NEW_ACCT_MENUITEM))
                title.setText(MAIN_TITLE_TEXT + " " +
                        NEW_ACCT_MENUITEM);
                newAccountFrame();
            else if (command.equals(OPEN_ACCT_MENUITEM))
                title.setText(MAIN_TITLE_TEXT + " " +
                        OPEN_ACCT_MENUITEM);
            else if (command.equals(DELETE_ACCT_MENUITEM))
                title.setText(MAIN_TITLE_TEXT + " " +
                        DELETE_ACCT_MENUITEM);
            else if (command.equals(TRANSFER_ACCT_MENUITEM))
                title.setText(MAIN_TITLE_TEXT + " " +
                        TRANSFER_ACCT_MENUITEM);
            else if (command.equals(OVERVIEW_ACCT_MENUITEM))
                title.setText(MAIN_TITLE_TEXT + " " +
                        OVERVIEW_ACCT_MENUITEM);
            else if (command.equals(LOGIN_BUTTON))
                Scanner loginFile = null;
                String currentFileLoginName;
                String triedLogin = loginField.getText();
                try
                   loginFile = new Scanner(new FileInputStream("logins.txt"));
                catch(FileNotFoundException e)
                    System.out.println("Internal Error");
                    System.exit(0);
                do
                   currentFileLoginName = loginFile.nextLine();
                   if  (processLogin(currentFileLoginName, triedLogin, loginFile)) //Send Logins&File | Return boolean
                       loginFile.close(); //Close File
                       break; //Login true. Break out of while loop
                while (loginFile.hasNextLine() == true);
            else if (command.equals(REGISTER_BUTTON))
                registrationFrame();
            else if (command.equals(NEW_USER_REGISTER_BUTTON))
                registrationFrame.setVisible(false);
                if (checkFields() == false)
                    registrationFrame.dispose();
                    registrationFrame();
                else
                registerNewUser();
            else if (command.equals(CHECKING_RADIO_BUTTON))
                savingsSelected = false;
                checkingSelected = true;
                retirementSelected = false;
            else if (command.equals(SAVINGS_RADIO_BUTTON))
                savingsSelected = true;
                checkingSelected = false;
                retirementSelected = false;
            else if(command.equals(RETIREMENT_RADIO_BUTTON))
                savingsSelected = false;
                checkingSelected = false;
                retirementSelected = true;
            else if (command.equals(NEW_ACCT_OK_BUTTON))
                double doubleInitialMoney = Double.parseDouble(initialMoneyField.getText());
                if (savingsSelected)
                    currentUserAccount.registerAccount("savings");
                    currentUserAccount.deposit("savings", doubleInitialMoney);
                if (checkingSelected)
                    currentUserAccount.registerAccount("checking");
                    currentUserAccount.deposit("checking", doubleInitialMoney);
                if (retirementSelected)
                    currentUserAccount.registerAccount("register");
                    currentUserAccount.deposit("retirement", doubleInitialMoney);
                newAccountFrame.dispose();
        private void loginFrame()
            loginFrame.setTitle("JBank -- Login Required");
            loginFrame.setDefaultLookAndFeelDecorated(true);
            loginFrame.setBounds(400,350,225,130);
            JTextField login = new JTextField("User ID");
            JTextField password = new JTextField("Password");
            loginFrame.setLayout(new GridLayout(0,2));
            //Button Panel
            JPanel buttonPanel = new JPanel();
            buttonPanel.setLayout(new GridLayout(4,0));
            JLabel space = new JLabel("                   ");
            JButton okButton = new JButton("Login");
            okButton.isDefaultButton();
            okButton.setVerticalTextPosition(AbstractButton.CENTER);
            JButton register = new JButton("Register");
            register.setVerticalTextPosition(AbstractButton.CENTER);
            okButton.setActionCommand(LOGIN_BUTTON);
            register.setActionCommand(REGISTER_BUTTON);
            okButton.addActionListener(this);
            register.addActionListener(this);
            buttonPanel.add(okButton);
            buttonPanel.add(space);
            buttonPanel.add(register);
            buttonPanel.add(space);
            //Text Panel
            JPanel textPanel = new JPanel();
            textPanel.setLayout(new GridLayout(4,0));
            JLabel userIDLabel = new JLabel("User ID:");
            JLabel passwordLabel = new JLabel("Password:");
            loginField = new JTextField(14);
            passwordField = new JPasswordField(14);
            textPanel.add(userIDLabel);
            textPanel.add(loginField);
            textPanel.add(passwordLabel);
            textPanel.add(passwordField);
            loginFrame.add(textPanel);
            loginFrame.add(buttonPanel);
            loginFrame.setVisible(true);
        private void registrationFrame()
            loginFrame.setVisible(false);
            //Registration's Frame
            registrationFrame.setTitle("JBank -- Registration");
            registrationFrame.setDefaultLookAndFeelDecorated(true);
            registrationFrame.setBounds(400,350,300,300);
            registrationFrame.setLayout(new BorderLayout());
            //Buttons
            JButton registerButton = new JButton("Register");
            JButton cancelButton = new JButton("Cancel");
            //Text Fields
            regNameField = new JTextField(20);
            regSSNField = new JTextField(8);
            regUserField = new JTextField(14);
            regPasswordField = new JPasswordField(14);
            //Labels
            JLabel nameLabel = new JLabel("Name:  ");
            JLabel ssnLabel = new JLabel("Social Security: ");
            JLabel newUserLabel = new JLabel("Desired User ID: ");
            JLabel newPasswordLabel = new JLabel("Desired Password: ");
            //Top Panel
            JPanel newUserFieldsPanel = new JPanel();
            newUserFieldsPanel.setLayout(new GridLayout(8,0));
            //Bottom Panel
            JPanel newUserButtonsPanel = new JPanel();
            newUserButtonsPanel.setLayout(new GridLayout(0,2));
            //Add
            newUserFieldsPanel.add(nameLabel);
            newUserFieldsPanel.add(regNameField);
            newUserFieldsPanel.add(ssnLabel);
            newUserFieldsPanel.add(regSSNField);
            newUserFieldsPanel.add(newUserLabel);
            newUserFieldsPanel.add(regUserField);
            newUserFieldsPanel.add(newPasswordLabel);
            newUserFieldsPanel.add(regPasswordField);
            newUserButtonsPanel.add(registerButton);
            newUserButtonsPanel.add(cancelButton);
            registrationFrame.add(newUserFieldsPanel, BorderLayout.CENTER);
            registrationFrame.add(newUserButtonsPanel, BorderLayout.SOUTH);
            //Action Listeners
            registerButton.setActionCommand(NEW_USER_REGISTER_BUTTON);
            cancelButton.setActionCommand(CANCEL_BUTTON);
            registerButton.addActionListener(this);
            cancelButton.addActionListener(this);
            registrationFrame.setVisible(true);
        private void newAccountFrame()
            //New Account Frame
            newAccountFrame.setTitle("Create New Account");
            newAccountFrame.setDefaultLookAndFeelDecorated(true);
            newAccountFrame.setBounds(400,350,300,300);
            newAccountFrame.setLayout(new BorderLayout());
            //Buttons
            JButton newAcctOkButton = new JButton("OK");
            JButton newAcctCancelButton = new JButton("Cancel");
            //Radio Buttons
            JRadioButton checkingOption = new JRadioButton("Checking Account");
            JRadioButton savingsOption = new JRadioButton("Savings Account");
            JRadioButton retirementOption = new JRadioButton("Retirement Account");
            //Group 'em
            ButtonGroup accountSettings = new ButtonGroup();
            accountSettings.add(checkingOption);
            accountSettings.add(savingsOption);
            accountSettings.add(retirementOption);
            //Text Fields
            initialMoneyField = new JTextField("0", 8);
            //Labels
            JLabel depositLabel = new JLabel("Initial Deposit:  ");
            JLabel optionLabel = new JLabel("What kind of account would \n"
            + "you like to create?");
            //Top Panel
            JPanel newAcctOptionsPanel = new JPanel();
            newAcctOptionsPanel.setLayout(new GridLayout(4,0));
            //Bottom Panel
            JPanel newAcctTextPanel = new JPanel();
            newAcctTextPanel.setLayout(new GridLayout(2,2));
            //Add
            newAcctOptionsPanel.add(optionLabel);
            newAcctOptionsPanel.add(checkingOption);
            newAcctOptionsPanel.add(savingsOption);
            newAcctOptionsPanel.add(retirementOption);
            newAcctTextPanel.add(depositLabel);
            newAcctTextPanel.add(initialMoneyField);
            newAcctTextPanel.add(newAcctOkButton);
            newAcctTextPanel.add(newAcctCancelButton);
            newAccountFrame.add(newAcctOptionsPanel, BorderLayout.CENTER);
            newAccountFrame.add(newAcctTextPanel, BorderLayout.SOUTH);
            //Action Listeners
            checkingOption.setActionCommand(CHECKING_RADIO_BUTTON);
            savingsOption.setActionCommand(SAVINGS_RADIO_BUTTON);
            retirementOption.setActionCommand(RETIREMENT_RADIO_BUTTON);
            checkingOption.addActionListener(this);
            savingsOption.addActionListener(this);
            retirementOption.addActionListener(this);
            newAcctOkButton.setActionCommand(NEW_ACCT_OK_BUTTON);
            newAcctCancelButton.setActionCommand(NEW_ACCT_CANCEL_BUTTON);
            newAcctOkButton.addActionListener(this);
            newAcctCancelButton.addActionListener(this);
            newAccountFrame.setVisible(true);
        private boolean checkFields()
            //Check Name Field
            String triedName = regNameField.getText();
            if (triedName.length() == 0)
                JOptionPane.showMessageDialog(null,
                "Empty Name Field. Try Again.",
                "Error Message",
                JOptionPane.ERROR_MESSAGE);
                return false;
            //Check SSN
            String triedSS = regSSNField.getText();
            int parsedSS = 0;
            try
                parsedSS = Integer.parseInt(triedSS);
            catch(Exception e)
                JOptionPane.showMessageDialog(null,
                "Numbers only in Social Security Field!\n Try Again.",
                "Error Message",
                JOptionPane.ERROR_MESSAGE);
                return false;
            if (triedSS.length() < 8)
                JOptionPane.showMessageDialog(null,
                "Social Security Number is not 8 Digits.\n Try Again.",
                "Error Message",
                JOptionPane.ERROR_MESSAGE);
                return false;
            //Check User ID
            String triedUser = regUserField.getText();
            if (triedUser.length() < 6)
                JOptionPane.showMessageDialog(null,
                "Desired User ID too short.\n Try Again",
                "Error Message",
                JOptionPane.ERROR_MESSAGE);
                return false;
            //Check Password
            char[] triedPassword = regPasswordField.getPassword();
            String stringPassword = triedPassword.toString();
            if (stringPassword.length() < 6)
                JOptionPane.showMessageDialog(null,
                "Desired Password Too Short. \n Try Again.",
                "Error Message",
                JOptionPane.ERROR_MESSAGE);
                return false;
            return true;
        private boolean registerNewUser()
            FileOutputStream writer;
            try
                BufferedWriter out = new BufferedWriter(new FileWriter("logins"));
                out.write(regUserField.getText());
                char [] tempPass = regPasswordField.getPassword();
                String tempString = tempPass.toString();
                out.write("\n" + tempString);
                out.close();
            catch(IOException e)
                System.out.println("Writing file error.");
                System.exit(0);
            int intSS = Integer.parseInt(regSSNField.getText());
            currentUserAccount = new Account(regNameField.getText(), intSS);
            return true;
        private boolean processLogin(String currentFileLoginName, String triedLogin, Scanner loginFile)
            char[] userPassword = passwordField.getPassword();
            if (currentFileLoginName.equals(triedLogin))
                String currentFilePassword = loginFile.nextLine(); //Login recognized, go to next line for password
                char[] charPassword = currentFilePassword.toCharArray();
                if (charPassword.length == userPassword.length) //Password Lengths match?
                    if(Arrays.equals(userPassword, charPassword)) //Do characters match?
                        trueUser = true;
                        loginFrame.dispose();
                        return true;
                else
                    JOptionPane.showMessageDialog(null, //Notify User of Incorrect password
                     "Invalid password. Try again.",
                     "Error Message",
                     JOptionPane.ERROR_MESSAGE);
                     return false;
            else
                JOptionPane.showMessageDialog(null, //Notify user of unrecognized login
                "Unknown User ID. Try again\n or Register.",
                "Error Message",
                JOptionPane.ERROR_MESSAGE);
                return false;
            return false;
        private class Account
        private String name;
        private int ssn;
        private double totalUserMoney;
        private boolean checking = false;
        private boolean savings = false;
        private boolean retirement = false;
        private double checking_holdings;
        private double savings_holdings;
        private double retirement_holdings;
       public Account(String userName, int ss)
           name = userName;
           ssn = ss;
        public int getSSN()
            return ssn;
        public double getTotalUserMoney()
            return totalUserMoney;
        public boolean getUserAccounts(String type)
           if (type.equals("checking"))
               if (checking == false)
               return false;
               else
               return true;
            if (type.equals("savings"))
                if (savings == false)
                return false;
                else
                return true;
            if (type.equals("retirement"))
                if (retirement == false)
                return false;
                else
                return true;
            return false;
        public void registerAccount(String type)
            if (type.equals("checking"))
            checking = true;
            else if (type.equals("savings"))
            savings = true;
            else if (type.equals("retirement"))
            retirement = true;
            else
            System.out.println("Internal error"); //Should not reach here
        public boolean withdraw(String type, Double moneyAmount)
            if(getUserAccounts(type))
                if(type.equals("checking"))
                    if (moneyAmount > checking_holdings)
                        JOptionPane.showMessageDialog(null,"Insufficient holdings in checking account");
                    else
                        checking_holdings -= moneyAmount;
                        totalUserMoney -= moneyAmount;
                        return true;
                if(type.equals("savings"))
                    if (moneyAmount > checking_holdings)
                        JOptionPane.showMessageDialog(null,"Insufficient holdings in savings account");
                    else
                        savings_holdings -= moneyAmount;
                        totalUserMoney -= moneyAmount;
                        return true;
                if(type.equals("retirement"))
                    if (moneyAmount > checking_holdings)
                        JOptionPane.showMessageDialog(null,"Insufficient holdings in retirement account");
                    else
                        retirement_holdings -= moneyAmount;
                        totalUserMoney -= moneyAmount;
                        return true;
            else
                JOptionPane.showMessageDialog(null,"No such account exists");
                return false;
        public boolean deposit(String type, Double moneyAmount)
            if(getUserAccounts(type))
                if(type.equals("checking"))
                    checking_holdings += moneyAmount;
                    totalUserMoney += moneyAmount;
                    return true;
                if(type.equals("savings"))
                    savings_holdings += moneyAmount;
                    totalUserMoney += moneyAmount;
                    return true;
                if(type.equals("retirement"))
                    retirement_holdings += moneyAmount;
                    totalUserMoney += moneyAmount;
                    return true;
            else
                JOptionPane.showMessageDialog(null,"No such account exists");
                return false;
        public void deleteAccount(String type)
            if (type.equals("checking"))
                totalUserMoney -= checking_holdings;
                checking = false;
            if (type.equals("savings"))
                totalUserMoney -= savings_holdings;
                savings = false;
            if (type.equals("retirement"))
                totalUserMoney -= retirement_holdings;
                retirement = false;
        public void showAccountInfo()
            if (checking == true && savings == true && retirement == true)
            System.out.println(name + "'s Accounts: " + "\nChecking Account: $" + checking_holdings
            + "\nSavings Account: $" + savings_holdings + "\nRetirement Account: $" +
            retirement_holdings + "\n\nTotal: $" + totalUserMoney);
        public void showAccountInfo(String type)
            System.out.println(name + " ");
    }

    In the future, do not post eleventeenkathousand lines of code. No one is going to read it all and - quite frankly - no one really cares.
    As for the issue at hand, whenever you are going to access the file system, a remote server, access the clipboard and a handful of other "security" related issues, you must sign your applet.
    Google for sun's tutorial on signing applets.

Maybe you are looking for

  • BW QA system pointing towards different R/3 QA

    Hello all, We have a situation here where HR is doing their QA testing in one box (DRQ) and FI is going to do their QA testing in different box (DRX) and the time difference between their testing in not much infact they will do the testing in the sam

  • Downloading older versions of Photoshop Elements to Mac (V. 9)

    Does anyone know how I can download version 9 of Photoshop Elements for Mac? I have the serial number for the program but no disc drive any longer so need a web install.  thanks.

  • Problem to add office 365 domain because of RMS

    Hi team, I've purchased an office 365 small business plan. I wasn't able to add my personal domain & the office 365 support told me that's because I've my own domain registred in the RMS sharing application. Could you please delete my domain "dhersin

  • Placing one word doc sectioned over many INDDs

    Is it possible at all to place a portion of the Word doc into mulitple INDD files? Working on a book, I am given one doc for the whole book, but must break it into chapters, etc. I can't cut and paste of course, because I lose all formatting. Our edi

  • Modifying ESS/MSS iViews

    Hi, Can someone please guide me to how I can modify standard ESS/MSS iViews, for example, to remove unwanted UI elements etc. The portal version is EP6. Also, I understand that with EP7 most iViews are Web Dynpro Java/ABAP, can these be modified also