[Help] ShutDown Lithium Source v111

Results 1 to 6 of 6
  1. #1
    Valued Member xiaocino is offline
    MemberRank
    Jun 2012 Join Date
    Port Dickson, MLocation
    133Posts

    information [Help] ShutDown Lithium Source v111

    This source is Lithium v111 When i press !shutdown i shall get this error
    untitled.png


  2. #2
    Valued Member xiaocino is offline
    MemberRank
    Jun 2012 Join Date
    Port Dickson, MLocation
    133Posts

    Re: [Help] ShutDown Lithium Source v111

    again can't help ~~~
    Last edited by xiaocino; 04-12-12 at 03:05 PM.

  3. #3
    Account Upgraded | Title Enabled! royalmonky is offline
    MemberRank
    Jun 2011 Join Date
    648Posts

    Re: [Help] ShutDown Lithium Source v111

    The server got disconnected to the sql find the sql function and where it says auto reconnect change the false to true. It should work after that

  4. #4
    Valued Member xiaocino is offline
    MemberRank
    Jun 2012 Join Date
    Port Dickson, MLocation
    133Posts

    Re: [Help] ShutDown Lithium Source v111

    At where ? find the sql function? My Source>?

  5. #5
    至死不渝 noviceboy55 is offline
    MemberRank
    Dec 2008 Join Date
    SingaporeLocation
    708Posts

    Re: [Help] ShutDown Lithium Source v111

    Should be in your databaseconnections.java

  6. #6
    Valued Member xiaocino is offline
    MemberRank
    Jun 2012 Join Date
    Port Dickson, MLocation
    133Posts

    Re: [Help] ShutDown Lithium Source v111

    Okay i din't see Auto Reconnect ?

    PHP Code:
    /*
    This file is part of the OdinMS Maple Story Server
    Copyright (C) 2008 ~ 2010 Patrick Huy <patrick.huy@frz.cc> 
    Matthias Butz <matze@odinms.de>
    Jan Christian Meyer <vimes@odinms.de>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */
    package database;

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.Collection;
    import java.util.LinkedList;
    import constants.ServerConstants;
    import constants.GameConstants;
    import server.ServerProperties;

    /**
     * All OdinMS servers maintain a Database Connection. This class therefore "singletonices" the connection per process.
     * 
     * 
     * @author Frz
     */
    public class DatabaseConnection {

        private static final 
    ThreadLocal<Connectioncon = new ThreadLocalConnection();
        public static final 
    int CLOSE_CURRENT_RESULT 1;
        
    /**
         * The constant indicating that the current <code>ResultSet</code> object
         * should not be closed when calling <code>getMoreResults</code>.
         *
         * @since 1.4
         */
        
    public static final int KEEP_CURRENT_RESULT 2;
        
    /**
         * The constant indicating that all <code>ResultSet</code> objects that
         * have previously been kept open should be closed when calling
         * <code>getMoreResults</code>.
         *
         * @since 1.4
         */
        
    public static final int CLOSE_ALL_RESULTS 3;
        
    /**
         * The constant indicating that a batch statement executed successfully
         * but that no count of the number of rows it affected is available.
         *
         * @since 1.4
         */
        
    public static final int SUCCESS_NO_INFO = -2;
        
    /**
         * The constant indicating that an error occured while executing a
         * batch statement.
         *
         * @since 1.4
         */
        
    public static final int EXECUTE_FAILED = -3;
        
    /**
         * The constant indicating that generated keys should be made
         * available for retrieval.
         *
         * @since 1.4
         */
        
    public static final int RETURN_GENERATED_KEYS 1;
        
    /**
         * The constant indicating that generated keys should not be made
         * available for retrieval.
         *
         * @since 1.4
         */
        
    public static final int NO_GENERATED_KEYS 2;

        public static final 
    Connection getConnection() {
            return 
    con.get();
        }

        public static final 
    void closeAll() throws SQLException {
            for (final 
    Connection con ThreadLocalConnection.allConnections) {
            if (
    con != null) {
                    
    con.close();
            }
            }
        }

        private static final class 
    ThreadLocalConnection extends ThreadLocal<Connection> {

            public static final 
    Collection<ConnectionallConnections = new LinkedList<Connection>();

            @
    Override
            
    protected final Connection initialValue() {
                try {
                    Class.
    forName("com.mysql.jdbc.Driver"); // touch the mysql driver
                
    } catch (final ClassNotFoundException e) {
                    
    System.err.println("ERROR" e);
                }
                try {
                    final 
    Connection con DriverManager.getConnection(
                        
    "jdbc:mysql://localhost:3306/Lithium?autoReconnect=true"
                        
    ServerConstants.SQL_USERServerConstants.SQL_PASSWORD);
                    
    allConnections.add(con);
                    return 
    con;
                } catch (
    SQLException e) {
                    
    System.err.println("ERROR" e);
                    return 
    null;
                }
            }
        }

    Edit where?

    Okay i found it is ture now~



Advertisement