• Новые темы в этом разделе публикуются автоматически при добавлении файла в менеджер ресурсов.
    Ручное создание новых тем невозможно.
Иконка ресурса

[Grand Crusade]L2JUnity-Private

AppInit: Could not setup thread pools!
Блеать, это он че, ругается что у меня мария не дружит с ипаным коннектором от ораклов? Марию чтоль прикрутить...
Походу пора идти за горичительными напитками, тут без 100 грамм не разберешься.
 

На 10 нужно InMemoryJavaCompiler- вместо ecj-
 
Последнее редактирование:
Я на MySQL Server 5.7 запускал.
Не, я только марию юзаю. Прикручу коннертор от нее, и попробую.

Я на MySQL Server 5.7 запускал.
Не подскажешь где у них драйвер прописан?
Это я то нашел, а вот сам драйвер прогонял поиском, без результатов.
Код:
@ConfigGroupBeginning(name = "Database")
    @ConfigField(name = "URL", value = "jdbc:mysql://localhost/l2j?useSSL=false", comment =
    {
        "Database URL",
        "URL = jdbc:mysql://localhost/l2j?useSSL=false (default)",
    }, reloadable = false)
з.ы. А всё, нашел:
Код:
Class.forName("com.mysql.cj.jdbc.Driver").newInstance();

Да не, чёт до одного места замена коннектора. Тот же еррор.
Код:
[ERROR] AppInit: Could not setup thread pools!
java.lang.IllegalArgumentException: null
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1300) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1222) ~[?:?]
    at l2j.commons.util.concurrent.ThreadPool.initThreadPools(ThreadPool.java:37) ~[sources/:?]
    at l2j.commons.util.AppInit.defaultInit(AppInit.java:98) [sources/:?]
    at l2j.loginserver.L2LoginServer.<init>(L2LoginServer.java:58) [sources/:?]
    at l2j.loginserver.L2LoginServer.main(L2LoginServer.java:46) [sources/:?]
Старый стал :D
 
Не, я только марию юзаю. Прикручу коннертор от нее, и попробую.


Не подскажешь где у них драйвер прописан?
Это я то нашел, а вот сам драйвер прогонял поиском, без результатов.
Код:
@ConfigGroupBeginning(name = "Database")
    @ConfigField(name = "URL", value = "jdbc:mysql://localhost/l2j?useSSL=false", comment =
    {
        "Database URL",
        "URL = jdbc:mysql://localhost/l2j?useSSL=false (default)",
    }, reloadable = false)
з.ы. А всё, нашел:
Код:
Class.forName("com.mysql.cj.jdbc.Driver").newInstance();

Да не, чёт до одного места замена коннектора. Тот же еррор.
Код:
[ERROR] AppInit: Could not setup thread pools!
java.lang.IllegalArgumentException: null
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1300) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1222) ~[?:?]
    at l2j.commons.util.concurrent.ThreadPool.initThreadPools(ThreadPool.java:37) ~[sources/:?]
    at l2j.commons.util.AppInit.defaultInit(AppInit.java:98) [sources/:?]
    at l2j.loginserver.L2LoginServer.<init>(L2LoginServer.java:58) [sources/:?]
    at l2j.loginserver.L2LoginServer.main(L2LoginServer.java:46) [sources/:?]
Старый стал :D
ThreadPool это не коннектор базы, это пул для потоков. Проверьте что в строке ThreadPool.java:37.
 
Не, я только марию юзаю. Прикручу коннертор от нее, и попробую.


Не подскажешь где у них драйвер прописан?
Это я то нашел, а вот сам драйвер прогонял поиском, без результатов.
Код:
@ConfigGroupBeginning(name = "Database")
    @ConfigField(name = "URL", value = "jdbc:mysql://localhost/l2j?useSSL=false", comment =
    {
        "Database URL",
        "URL = jdbc:mysql://localhost/l2j?useSSL=false (default)",
    }, reloadable = false)
з.ы. А всё, нашел:
Код:
Class.forName("com.mysql.cj.jdbc.Driver").newInstance();

Да не, чёт до одного места замена коннектора. Тот же еррор.
Код:
[ERROR] AppInit: Could not setup thread pools!
java.lang.IllegalArgumentException: null
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1300) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1222) ~[?:?]
    at l2j.commons.util.concurrent.ThreadPool.initThreadPools(ThreadPool.java:37) ~[sources/:?]
    at l2j.commons.util.AppInit.defaultInit(AppInit.java:98) [sources/:?]
    at l2j.loginserver.L2LoginServer.<init>(L2LoginServer.java:58) [sources/:?]
    at l2j.loginserver.L2LoginServer.main(L2LoginServer.java:46) [sources/:?]
Старый стал :D
Не, я этот вопрос не ковырял, да и я l2 занимаюсь чисто хобби, а проектами бросил заниматься еще со времен Грации Финал.
 
Не, я этот вопрос не ковырял, да и я l2 занимаюсь чисто хобби, а проектами бросил заниматься еще со времен Грации Финал.
Я сервер запускал еще в 2к15, чисто от скуки ковыряю.
 
ThreadPool это не коннектор базы, это пул для потоков. Проверьте что в строке ThreadPool.java:37.
Глянул, ни ошибки, ничего. Хз че за дрянь.
Собственно 37я строка:
Код:
THREAD_POOL_EXECUTOR = new ThreadPoolExecutor(initializer.getThreadPoolSize(), initializer.getThreadPoolSize(), 1, TimeUnit.MINUTES, new LinkedBlockingQueue<>(), new PoolThreadFactory("L2J-IT-", Thread.NORM_PRIORITY));
screen.jpg
 
Глянул, ни ошибки, ничего. Хз че за дрянь.
Собственно 37я строка:
Код:
THREAD_POOL_EXECUTOR = new ThreadPoolExecutor(initializer.getThreadPoolSize(), initializer.getThreadPoolSize(), 1, TimeUnit.MINUTES, new LinkedBlockingQueue<>(), new PoolThreadFactory("L2J-IT-", Thread.NORM_PRIORITY));
Посмотреть вложение 25537
и так, заходим по стэку глубже, и видим следующие строки:

Java:
/**
     * Creates a new {@code ThreadPoolExecutor} with the given initial
     * parameters.
     *
     * @param corePoolSize the number of threads to keep in the pool, even
     *        if they are idle, unless {@code allowCoreThreadTimeOut} is set
     * @param maximumPoolSize the maximum number of threads to allow in the
     *        pool
     * @param keepAliveTime when the number of threads is greater than
     *        the core, this is the maximum time that excess idle threads
     *        will wait for new tasks before terminating.
     * @param unit the time unit for the {@code keepAliveTime} argument
     * @param workQueue the queue to use for holding tasks before they are
     *        executed.  This queue will hold only the {@code Runnable}
     *        tasks submitted by the {@code execute} method.
     * @param threadFactory the factory to use when the executor
     *        creates a new thread
     * @param handler the handler to use when execution is blocked
     *        because the thread bounds and queue capacities are reached
     * @throws IllegalArgumentException if one of the following holds:<br>
     *         {@code corePoolSize < 0}<br>
     *         {@code keepAliveTime < 0}<br>
     *         {@code maximumPoolSize <= 0}<br>
     *         {@code maximumPoolSize < corePoolSize}
     * @throws NullPointerException if {@code workQueue}
     *         or {@code threadFactory} or {@code handler} is null
     */
    public ThreadPoolExecutor(int corePoolSize,
                              int maximumPoolSize,
                              long keepAliveTime,
                              TimeUnit unit,
                              BlockingQueue<Runnable> workQueue,
                              ThreadFactory threadFactory,
                              RejectedExecutionHandler handler) {
        if (corePoolSize < 0 ||
            maximumPoolSize <= 0 ||
            maximumPoolSize < corePoolSize ||
            keepAliveTime < 0)
            throw new IllegalArgumentException(); // Конкретно это исключение у нас и выкидывает.

Проверяйте настройки пула, видимо у вас конфиг не считывает, может не там лежит или нечайно удалили.

Конкретно эти настройки ThreadPoolConfig.SCHEDULED_THREAD_POOL_SIZE и ThreadPoolConfig.THREAD_POOL_SIZE
 
и так, заходим по стэку глубже, и видим следующие строки:

Java:
/**
     * Creates a new {@code ThreadPoolExecutor} with the given initial
     * parameters.
     *
     * @param corePoolSize the number of threads to keep in the pool, even
     *        if they are idle, unless {@code allowCoreThreadTimeOut} is set
     * @param maximumPoolSize the maximum number of threads to allow in the
     *        pool
     * @param keepAliveTime when the number of threads is greater than
     *        the core, this is the maximum time that excess idle threads
     *        will wait for new tasks before terminating.
     * @param unit the time unit for the {@code keepAliveTime} argument
     * @param workQueue the queue to use for holding tasks before they are
     *        executed.  This queue will hold only the {@code Runnable}
     *        tasks submitted by the {@code execute} method.
     * @param threadFactory the factory to use when the executor
     *        creates a new thread
     * @param handler the handler to use when execution is blocked
     *        because the thread bounds and queue capacities are reached
     * @throws IllegalArgumentException if one of the following holds:<br>
     *         {@code corePoolSize < 0}<br>
     *         {@code keepAliveTime < 0}<br>
     *         {@code maximumPoolSize <= 0}<br>
     *         {@code maximumPoolSize < corePoolSize}
     * @throws NullPointerException if {@code workQueue}
     *         or {@code threadFactory} or {@code handler} is null
     */
    public ThreadPoolExecutor(int corePoolSize,
                              int maximumPoolSize,
                              long keepAliveTime,
                              TimeUnit unit,
                              BlockingQueue<Runnable> workQueue,
                              ThreadFactory threadFactory,
                              RejectedExecutionHandler handler) {
        if (corePoolSize < 0 ||
            maximumPoolSize <= 0 ||
            maximumPoolSize < corePoolSize ||
            keepAliveTime < 0)
            throw new IllegalArgumentException(); // Конкретно это исключение у нас и выкидывает.

Проверяйте настройки пула, видимо у вас конфиг не считывает, может не там лежит или нечайно удалили.

Конкретно эти настройки ThreadPoolConfig.SCHEDULED_THREAD_POOL_SIZE и ThreadPoolConfig.THREAD_POOL_SIZE
Дело в том, что конфиги не сгенерировались, и папка пустая. Попробую вручную добавить. (хотя он вроде как должен дефолтные подхватывать)
Код:
@ConfigGroupBeginning(name = "Threads")
@ConfigField(name = "ScheduledThreadPoolSize", value = "-1", comment =
{
   "Specifies how many threads will be in scheduled thread pool.",
   "If set to -1 (which is recommended), the server will decide the amount depending on the available processors"
})
public static int SCHEDULED_THREAD_POOL_SIZE;

@ConfigGroupEnding(name = "Threads")
@ConfigField(name = "InstantThreadPoolSize", value = "-1", comment =
{
   "Specifies how many threads will be in instant thread pool.",
   "If set to -1 (which is recommended), the server will decide the amount depending on the available processors"
})
public static int INSTANT_THREAD_POOL_SIZE;
 
Хотя нашел от куда ноги ростут.
screen.jpg
AppInit.java
ThreadPool.initThreadPools((IThreadPoolInitializer) clazz.newInstance()); - is deprecated
 
А попробуйте запустить
 
Совсем забыл, у меня были проблемы что ClassPathUtil.getAllClassesExtending не находил нужные классы, и по этому не грузились конфиги и скрипты, может у вас тоже самое. Не помню из-за чего, может из-за новой явы были или новой либы.

Попробуйте в ClassPathUtil,
Код:
final ClassPath classPath = ClassPath.from(ClassLoader.getSystemClassLoader());
заменить на
Код:
final ClassPath classPath = ClassPath.from(Thread.currentThread().getContextClassLoader());
 
А попробуйте запустить
Так его и запускаю. Толку нет, скрин выше.
Совсем забыл, у меня были проблемы что ClassPathUtil.getAllClassesExtending не находил нужные классы, и по этому не грузились конфиги и скрипты, может у вас тоже самое. Не помню из-за чего, может из-за новой явы были или новой либы.

Попробуйте в ClassPathUtil,
Код:
final ClassPath classPath = ClassPath.from(ClassLoader.getSystemClassLoader());
заменить на
Код:
final ClassPath classPath = ClassPath.from(Thread.currentThread().getContextClassLoader());
Да не, не помогает это дело.

По идеи даже если он и ругается на deprecated, то всё равно должен схавать и запустить сервер.
 
Да дело не в deprecated, оно не может подставить значения по умолчанию, у вас конфиги все пустые.

Для проверки сделайте так:

Java:
@ConfigGroupBeginning(name = "Threads")
@ConfigField(name = "ScheduledThreadPoolSize", value = "-1", comment =
{
   "Specifies how many threads will be in scheduled thread pool.",
   "If set to -1 (which is recommended), the server will decide the amount depending on the available processors"
})
public static int SCHEDULED_THREAD_POOL_SIZE = -1;

@ConfigGroupEnding(name = "Threads")
@ConfigField(name = "InstantThreadPoolSize", value = "-1", comment =
{
   "Specifies how many threads will be in instant thread pool.",
   "If set to -1 (which is recommended), the server will decide the amount depending on the available processors"
})
public static int INSTANT_THREAD_POOL_SIZE = -1;
 
  • Мне нравится
Реакции: Psycho

    Psycho

    Баллов: 25
    За помощь
Да дело не в deprecated, оно не может подставить значения по умолчанию, у вас конфиги все пустые.

Для проверки сделайте так:

Java:
@ConfigGroupBeginning(name = "Threads")
@ConfigField(name = "ScheduledThreadPoolSize", value = "-1", comment =
{
   "Specifies how many threads will be in scheduled thread pool.",
   "If set to -1 (which is recommended), the server will decide the amount depending on the available processors"
})
public static int SCHEDULED_THREAD_POOL_SIZE = -1;

@ConfigGroupEnding(name = "Threads")
@ConfigField(name = "InstantThreadPoolSize", value = "-1", comment =
{
   "Specifies how many threads will be in instant thread pool.",
   "If set to -1 (which is recommended), the server will decide the amount depending on the available processors"
})
public static int INSTANT_THREAD_POOL_SIZE = -1;
Вот теперь схавало. Спасибо.
 
Если заработало, то у вас не находит классы с конфигами, а значит еще не одна система сломается. Вам нужно починить ClassPathUtil

Проверьте, может у вас в папке с конфигами есть файл override.properties, если он есть то оно не будет генерировать конфиги.
 
Последнее редактирование:
  • Мне нравится
Реакции: kick
Если заработало, то у вас не находит классы с конфигами, а значит еще не одна система сломается. Вам нужно починить ClassPathUtil
Ну да, без конфигов я ничего не могу запустить. А генерировать он их отказывается.
Код:
ERROR StatusLogger No log4j2 configuration file found. Using default configurati
on: logging only errors to the console. Set system property 'org.apache.logging.
log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initializat
ion logging.
Для продолжения нажмите любую клавишу . . .
 
Закиньте в .jar файл . Оно то логи не показывает.
 
  • Мне нравится
Реакции: kick

    kick

    Баллов: 75
    75
Назад
Сверху Снизу