-
Публикаций
129 -
Зарегистрирован
-
Посещение
-
Отзывы
0%
Сообщения, опубликованные sotiga
-
-
ты лучше посмотри что собираются компилить :pandaredlol:
тех исходниках нету исходного кода DBCP я выдрал его но заного копилирую выдаёт ошибки , вот и интересуюсь может у кого есть правильный код без ошибак ?
-
Привет всем, есть у кого правильный исходный код ApacheDBCP.java на сборку Lucera 2 , а то я выпилил со сборки но при компиляции выдаёт ошибки !
/* */ package ru.lucera2.dbcp; /* */ /* */ import java.sql.Connection; /* */ import java.sql.SQLException; /* */ import org.apache.commons.dbcp2.BasicDataSource; /* */ import ru.catssoftware.sql.AbstractDatabaseFactory; /* */ /* */ public class ApacheDBCP extends AbstractDatabaseFactory /* */ { /* */ private BasicDataSource source; /* */ /* */ public void init() /* */ { /* 18 */ this.source = new BasicDataSource(); /* */ try { /* 20 */ this.source.setDriverClassName(this.databaseDriver); /* 21 */ this.source.setUrl(this.databaseUrl); /* 22 */ this.source.setUsername(this.databaseLogin); /* 23 */ this.source.setPassword(this.databasePassword); /* */ /* 25 */ this.source.setInitialSize(this.maxConnections >> 1); /* 26 */ this.source.setMaxTotal(this.maxConnections); /* 27 */ this.source.setMaxIdle(this.maxConnections); /* 28 */ this.source.setMinIdle(1); /* */ /* 30 */ this.source.setMaxWaitMillis(-1L); /* 31 */ this.source.setDefaultReadOnly(Boolean.valueOf(false)); /* 32 */ this.source.setDefaultAutoCommit(Boolean.valueOf(true)); /* 33 */ this.source.setPoolPreparedStatements(true); /* */ /* 35 */ this.source.setValidationQuery("SELECT 1"); /* 36 */ this.source.setTestOnBorrow(false); /* 37 */ this.source.setTestWhileIdle(false); /* 38 */ this.source.setTimeBetweenEvictionRunsMillis(600000L); /* 39 */ this.source.setNumTestsPerEvictionRun(this.maxConnections); /* 40 */ this.source.setMinEvictableIdleTimeMillis(30000L); /* */ /* 42 */ this.source.setRemoveAbandonedOnBorrow(true); /* 43 */ this.source.setRemoveAbandonedOnMaintenance(true); /* 44 */ this.source.setRemoveAbandonedTimeout(60); /* */ /* 46 */ this.source.getConnection().close(); /* */ } catch (SQLException e) { /* 48 */ throw new RuntimeException("Failed init DBCP.", e); } } /* */ // ERROR // /* */ public Connection getConnection(Connection con) throws SQLException { // Byte code: /* */ // 0: aload_1 /* */ // 1: ifnonnull +18 -> 19 /* */ // 4: aload_0 /* */ // 5: getfield 4 ru/lucera2/dbcp/ApacheDBCP:source Lorg/apache/commons/dbcp2/BasicDataSource; /* */ // 8: invokevirtual 39 org/apache/commons/dbcp2/BasicDataSource:getConnection ()Ljava/sql/Connection; /* */ // 11: astore_1 /* */ // 12: goto -12 -> 0 /* */ // 15: astore_2 /* */ // 16: goto -16 -> 0 /* */ // 19: aload_1 /* */ // 20: areturn /* */ // /* */ // Exception table: /* */ // from to target type /* */ // 4 12 15 java/lang/Throwable /* */ } /* */ public void shuwdown() { try { this.source.close(); /* */ } /* */ catch (Throwable localThrowable) /* */ { /* */ } /* */ } /* */ } /* Location: E:\Source\libs\extensions\dbcp.jar * Qualified Name: ru.lucera2.dbcp.ApacheDBCP * JD-Core Version: 0.5.3 */
-
import org.apache.commons.dbcp2.BasicDataSource
измени на:
import org.apache.commons.dbcp.BasicDataSource
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:5: error: package org.apache.commons.dbcp does not exist [javac] /* */ import org.apache.commons.dbcp.BasicDataSource; [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:10: error: cannot find symbol [javac] /* */ private BasicDataSource source; [javac] ^ [javac] symbol: class BasicDataSource [javac] location: class ApacheDBCP [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:14: error: cannot find symbol [javac] /* 18 */ this.source = new BasicDataSource(); [javac] ^ [javac] symbol: class BasicDataSource [javac] location: class ApacheDBCP [javac] 3 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 3 minutes 48 seconds
всё равно
-
постой-ка, вот тут: java/lang/Throwable }
Опусти '}'. Что бы получилось вот так:
/* */ // 4 12 15 java/lang/Throwable
/* */}
В самом низу, удали '}'
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:5: error: package org.apache.commons.dbcp2 does not exist [javac] /* */ import org.apache.commons.dbcp2.BasicDataSource; [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:10: error: cannot find symbol [javac] /* */ private BasicDataSource source; [javac] ^ [javac] symbol: class BasicDataSource [javac] location: class ApacheDBCP [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:14: error: cannot find symbol [javac] /* 18 */ this.source = new BasicDataSource(); [javac] ^ [javac] symbol: class BasicDataSource [javac] location: class ApacheDBCP [javac] 3 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 3 minutes 33 seconds
теперь вот что =(
-
public void shuwdown();
';' Вот это нужно убрать.
что ещё можешь посоветовать ?
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown() { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown() { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: ';' expected [javac] /* */ public void shuwdown() { try { this.source.close(); [javac] ^ [javac] 3 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 3 minutes 11 seconds
/* */ package ru.impulse.dbcp; /* */ /* */ import java.sql.Connection; /* */ import java.sql.SQLException; /* */ import org.apache.commons.dbcp2.BasicDataSource; /* */ import ru.impulse.sql.AbstractDatabaseFactory; /* */ /* */ public class ApacheDBCP extends AbstractDatabaseFactory /* */ { /* */ private BasicDataSource source; /* */ /* */ public void init() /* */ { /* 18 */ this.source = new BasicDataSource(); /* */ try { /* 20 */ this.source.setDriverClassName(this.databaseDriver); /* 21 */ this.source.setUrl(this.databaseUrl); /* 22 */ this.source.setUsername(this.databaseLogin); /* 23 */ this.source.setPassword(this.databasePassword); /* */ /* 25 */ this.source.setInitialSize(this.maxConnections >> 1); /* 26 */ this.source.setMaxTotal(this.maxConnections); /* 27 */ this.source.setMaxIdle(this.maxConnections); /* 28 */ this.source.setMinIdle(1); /* */ /* 30 */ this.source.setMaxWaitMillis(-1L); /* 31 */ this.source.setDefaultReadOnly(Boolean.valueOf(false)); /* 32 */ this.source.setDefaultAutoCommit(Boolean.valueOf(true)); /* 33 */ this.source.setPoolPreparedStatements(true); /* */ /* 35 */ this.source.setValidationQuery("SELECT 1"); /* 36 */ this.source.setTestOnBorrow(false); /* 37 */ this.source.setTestWhileIdle(false); /* 38 */ this.source.setTimeBetweenEvictionRunsMillis(600000L); /* 39 */ this.source.setNumTestsPerEvictionRun(this.maxConnections); /* 40 */ this.source.setMinEvictableIdleTimeMillis(30000L); /* */ /* 42 */ this.source.setRemoveAbandonedOnBorrow(true); /* 43 */ this.source.setRemoveAbandonedOnMaintenance(true); /* 44 */ this.source.setRemoveAbandonedTimeout(60); /* */ /* 46 */ this.source.getConnection().close(); /* */ } catch (SQLException e) { /* 48 */ throw new RuntimeException("Failed init DBCP.", e); } } /* */ // ERROR // /* */ public Connection getConnection(Connection con) throws SQLException { // Byte code: /* */ // 0: aload_1 /* */ // 1: ifnonnull +18 -> 19 /* */ // 4: aload_0 /* */ // 5: getfield 4 ru/lucera2/dbcp/ApacheDBCP:source Lorg/apache/commons/dbcp2/BasicDataSource; /* */ // 8: invokevirtual 39 org/apache/commons/dbcp2/BasicDataSource:getConnection ()Ljava/sql/Connection; /* */ // 11: astore_1 /* */ // 12: goto -12 -> 0 /* */ // 15: astore_2 /* */ // 16: goto -16 -> 0 /* */ // 19: aload_1 /* */ // 20: areturn /* */ // /* */ // Exception table: /* */ // from to target type /* */ // 4 12 15 java/lang/Throwable } /* */ public void shuwdown() { try { this.source.close(); /* */ } /* */ catch (Throwable localThrowable) /* */ { /* */ } /* */ } /* */ } }
-
Осталось 3 ошибки кто поможет ?
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: ';' expected [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] 3 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 3 minutes 30 seconds
/* */ package ru.impulse.dbcp; /* */ /* */ import java.sql.Connection; /* */ import java.sql.SQLException; /* */ import org.apache.commons.dbcp2.BasicDataSource; /* */ import ru.impulse.sql.AbstractDatabaseFactory; /* */ /* */ public class ApacheDBCP extends AbstractDatabaseFactory /* */ { /* */ private BasicDataSource source; /* */ /* */ public void init() /* */ { /* 18 */ this.source = new BasicDataSource(); /* */ try { /* 20 */ this.source.setDriverClassName(this.databaseDriver); /* 21 */ this.source.setUrl(this.databaseUrl); /* 22 */ this.source.setUsername(this.databaseLogin); /* 23 */ this.source.setPassword(this.databasePassword); /* */ /* 25 */ this.source.setInitialSize(this.maxConnections >> 1); /* 26 */ this.source.setMaxTotal(this.maxConnections); /* 27 */ this.source.setMaxIdle(this.maxConnections); /* 28 */ this.source.setMinIdle(1); /* */ /* 30 */ this.source.setMaxWaitMillis(-1L); /* 31 */ this.source.setDefaultReadOnly(Boolean.valueOf(false)); /* 32 */ this.source.setDefaultAutoCommit(Boolean.valueOf(true)); /* 33 */ this.source.setPoolPreparedStatements(true); /* */ /* 35 */ this.source.setValidationQuery("SELECT 1"); /* 36 */ this.source.setTestOnBorrow(false); /* 37 */ this.source.setTestWhileIdle(false); /* 38 */ this.source.setTimeBetweenEvictionRunsMillis(600000L); /* 39 */ this.source.setNumTestsPerEvictionRun(this.maxConnections); /* 40 */ this.source.setMinEvictableIdleTimeMillis(30000L); /* */ /* 42 */ this.source.setRemoveAbandonedOnBorrow(true); /* 43 */ this.source.setRemoveAbandonedOnMaintenance(true); /* 44 */ this.source.setRemoveAbandonedTimeout(60); /* */ /* 46 */ this.source.getConnection().close(); /* */ } catch (SQLException e) { /* 48 */ throw new RuntimeException("Failed init DBCP.", e); } } /* */ // ERROR // /* */ public Connection getConnection(Connection con) throws SQLException { // Byte code: /* */ // 0: aload_1 /* */ // 1: ifnonnull +18 -> 19 /* */ // 4: aload_0 /* */ // 5: getfield 4 ru/lucera2/dbcp/ApacheDBCP:source Lorg/apache/commons/dbcp2/BasicDataSource; /* */ // 8: invokevirtual 39 org/apache/commons/dbcp2/BasicDataSource:getConnection ()Ljava/sql/Connection; /* */ // 11: astore_1 /* */ // 12: goto -12 -> 0 /* */ // 15: astore_2 /* */ // 16: goto -16 -> 0 /* */ // 19: aload_1 /* */ // 20: areturn /* */ // /* */ // Exception table: /* */ // from to target type /* */ // 4 12 15 java/lang/Throwable } /* */ public void shuwdown(); { try { this.source.close(); /* */ } /* */ catch (Throwable localThrowable) /* */ { /* */ } /* */ } /* */ } }
-
/* */ package ru.impulse.dbcp; /* */ /* */ import java.sql.Connection; /* */ import java.sql.SQLException; /* */ import org.apache.commons.dbcp2.BasicDataSource; /* */ import ru.impulse.sql.AbstractDatabaseFactory; /* */ /* */ public class ApacheDBCP extends AbstractDatabaseFactory /* */ { /* */ private BasicDataSource source; /* */ /* */ public void init() /* */ { /* 18 */ this.source = new BasicDataSource(); /* */ try { /* 20 */ this.source.setDriverClassName(this.databaseDriver); /* 21 */ this.source.setUrl(this.databaseUrl); /* 22 */ this.source.setUsername(this.databaseLogin); /* 23 */ this.source.setPassword(this.databasePassword); /* */ /* 25 */ this.source.setInitialSize(this.maxConnections >> 1); /* 26 */ this.source.setMaxTotal(this.maxConnections); /* 27 */ this.source.setMaxIdle(this.maxConnections); /* 28 */ this.source.setMinIdle(1); /* */ /* 30 */ this.source.setMaxWaitMillis(-1L); /* 31 */ this.source.setDefaultReadOnly(Boolean.valueOf(false)); /* 32 */ this.source.setDefaultAutoCommit(Boolean.valueOf(true)); /* 33 */ this.source.setPoolPreparedStatements(true); /* */ /* 35 */ this.source.setValidationQuery("SELECT 1"); /* 36 */ this.source.setTestOnBorrow(false); /* 37 */ this.source.setTestWhileIdle(false); /* 38 */ this.source.setTimeBetweenEvictionRunsMillis(600000L); /* 39 */ this.source.setNumTestsPerEvictionRun(this.maxConnections); /* 40 */ this.source.setMinEvictableIdleTimeMillis(30000L); /* */ /* 42 */ this.source.setRemoveAbandonedOnBorrow(true); /* 43 */ this.source.setRemoveAbandonedOnMaintenance(true); /* 44 */ this.source.setRemoveAbandonedTimeout(60); /* */ /* 46 */ this.source.getConnection().close(); /* */ } catch (SQLException e) { /* 48 */ throw new RuntimeException("Failed init DBCP.", e); } } /* */ // ERROR // /* */ public Connection getConnection(Connection con) throws SQLException { // Byte code: /* */ // 0: aload_1 /* */ // 1: ifnonnull +18 -> 19 /* */ // 4: aload_0 /* */ // 5: getfield 4 ru/lucera2/dbcp/ApacheDBCP:source Lorg/apache/commons/dbcp2/BasicDataSource; /* */ // 8: invokevirtual 39 org/apache/commons/dbcp2/BasicDataSource:getConnection ()Ljava/sql/Connection; /* */ // 11: astore_1 /* */ // 12: goto -12 -> 0 /* */ // 15: astore_2 /* */ // 16: goto -16 -> 0 /* */ // 19: aload_1 /* */ // 20: areturn /* */ // /* */ // Exception table: /* */ // from to target type /* */ // 4 12 15 java/lang/Throwable } /* */ public void shuwdown(); { try { this.source.close(); /* */ } /* */ catch (Throwable localThrowable) /* */ { /* */ } /* */ } /* */ } /* Location: E:\Source\libs\extensions\dbcp.jar * Qualified Name: ru.lucera2.dbcp.ApacheDBCP * JD-Core Version: 0.5.3 */
Простым языком, предпоследняя "{" в не ту сторону повернута.
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: ';' expected [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:68: error: reached end of file while parsing [javac] /* */ } [javac] ^ [javac] 4 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 5 minutes 38 seconds
ошибка не исправленная ещё есть варианты ?
-
после shudown() точку с запятой поставь)
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: ';' expected [javac] /* */ public void shuwdown(); { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:68: error: reached end of file while parsing [javac] /* */ { [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:73: error: reached end of file while parsing [javac] */ [javac] ^ [javac] 5 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 3 minutes 24 seconds
-
[echo] Build: dbcp clear: [delete] Deleting directory E:\Surce\Source impulse\build\classes [mkdir] Created dir: E:\Surce\Source impulse\build\classes [javac] Compiling 1 source file to E:\Surce\Source impulse\build\classes [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown() { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: illegal start of expression [javac] /* */ public void shuwdown() { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:62: error: ';' expected [javac] /* */ public void shuwdown() { try { this.source.close(); [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:68: error: reached end of file while parsing [javac] /* */ } [javac] ^ [javac] E:\Surce\Source impulse\gameserver\dbcp\ru\impulse\dbcp\ApacheDBCP.java:73: error: reached end of file while parsing [javac] */ [javac] ^ [javac] 5 errors BUILD FAILED E:\Surce\Source impulse\ant\build.xml:15: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_dbcp.xml:12: The following error occurred while executing this line: E:\Surce\Source impulse\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 3 minutes 21 seconds
кто знает из за чего ошибку выдаёт ?
/* */ package ru.impulse.dbcp; /* */ /* */ import java.sql.Connection; /* */ import java.sql.SQLException; /* */ import org.apache.commons.dbcp2.BasicDataSource; /* */ import ru.impulse.sql.AbstractDatabaseFactory; /* */ /* */ public class ApacheDBCP extends AbstractDatabaseFactory /* */ { /* */ private BasicDataSource source; /* */ /* */ public void init() /* */ { /* 18 */ this.source = new BasicDataSource(); /* */ try { /* 20 */ this.source.setDriverClassName(this.databaseDriver); /* 21 */ this.source.setUrl(this.databaseUrl); /* 22 */ this.source.setUsername(this.databaseLogin); /* 23 */ this.source.setPassword(this.databasePassword); /* */ /* 25 */ this.source.setInitialSize(this.maxConnections >> 1); /* 26 */ this.source.setMaxTotal(this.maxConnections); /* 27 */ this.source.setMaxIdle(this.maxConnections); /* 28 */ this.source.setMinIdle(1); /* */ /* 30 */ this.source.setMaxWaitMillis(-1L); /* 31 */ this.source.setDefaultReadOnly(Boolean.valueOf(false)); /* 32 */ this.source.setDefaultAutoCommit(Boolean.valueOf(true)); /* 33 */ this.source.setPoolPreparedStatements(true); /* */ /* 35 */ this.source.setValidationQuery("SELECT 1"); /* 36 */ this.source.setTestOnBorrow(false); /* 37 */ this.source.setTestWhileIdle(false); /* 38 */ this.source.setTimeBetweenEvictionRunsMillis(600000L); /* 39 */ this.source.setNumTestsPerEvictionRun(this.maxConnections); /* 40 */ this.source.setMinEvictableIdleTimeMillis(30000L); /* */ /* 42 */ this.source.setRemoveAbandonedOnBorrow(true); /* 43 */ this.source.setRemoveAbandonedOnMaintenance(true); /* 44 */ this.source.setRemoveAbandonedTimeout(60); /* */ /* 46 */ this.source.getConnection().close(); /* */ } catch (SQLException e) { /* 48 */ throw new RuntimeException("Failed init DBCP.", e); } } /* */ // ERROR // /* */ public Connection getConnection(Connection con) throws SQLException { // Byte code: /* */ // 0: aload_1 /* */ // 1: ifnonnull +18 -> 19 /* */ // 4: aload_0 /* */ // 5: getfield 4 ru/lucera2/dbcp/ApacheDBCP:source Lorg/apache/commons/dbcp2/BasicDataSource; /* */ // 8: invokevirtual 39 org/apache/commons/dbcp2/BasicDataSource:getConnection ()Ljava/sql/Connection; /* */ // 11: astore_1 /* */ // 12: goto -12 -> 0 /* */ // 15: astore_2 /* */ // 16: goto -16 -> 0 /* */ // 19: aload_1 /* */ // 20: areturn /* */ // /* */ // Exception table: /* */ // from to target type /* */ // 4 12 15 java/lang/Throwable } /* */ public void shuwdown() { try { this.source.close(); /* */ } /* */ catch (Throwable localThrowable) /* */ { /* */ } /* */ { /* */ }
-
Чет я сомневаюсь, что с такими вопросами до них дойдет дело.
на стадии развития , спасибо разобрался
-
Пул, геоингайн и квесты.
Делают вообще роль.
просто они с исходниками шли уже компилированные и уже их не исправить
-
хочу узнать для чего нужна папка extensions и в ней файлы dbcp , fpengine , quests ! они делают вообще роль ?
-
импорт сделай недостающих классов.
Спасибо понял
-
компиляция на какой Java ?
1.8
-
Buildfile: E:\Surce\Source\ant\build.xml all: revision: [echo] Revision: {git.Revision.count [echo] Time: 23/05/2015 11:21 build: [delete] Deleting directory E:\Surce\Source\build [mkdir] Created dir: E:\Surce\Source\build [mkdir] Created dir: E:\Surce\Source\build\libs [mkdir] Created dir: E:\Surce\Source\build\login [mkdir] Created dir: E:\Surce\Source\build\login\log [mkdir] Created dir: E:\Surce\Source\build\game [mkdir] Created dir: E:\Surce\Source\build\game\extensions [mkdir] Created dir: E:\Surce\Source\build\sql [copy] Copying 27 files to E:\Surce\Source\build\libs [copy] Copying 3 files to E:\Surce\Source\build\game\extensions build: def: [echo] Build: impulse-commons clear: [mkdir] Created dir: E:\Surce\Source\build\classes [javac] Compiling 133 source files to E:\Surce\Source\build\classes [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [jar] Building jar: E:\Surce\Source\build\impulse-commons.jar [echo] Revision: ${Revision} [echo] Time: 23/05/2015 11:21:31 [copy] Copying 1 file to E:\Surce\Source\build\libs build: def: [echo] Build: gameserver clear: [delete] Deleting directory E:\Surce\Source\build\classes [mkdir] Created dir: E:\Surce\Source\build\classes [javac] Compiling 1659 source files to E:\Surce\Source\build\classes [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\L2Character.java:3027: error: cannot find symbol [javac] public final void addStatFunc(Func f) [javac] ^ [javac] symbol: class Func [javac] location: class L2Character [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\L2Character.java:3061: error: cannot find symbol [javac] public final void addStatFuncs(Func[] funcs) [javac] ^ [javac] symbol: class Func [javac] location: class L2Character [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\L2Character.java:3067: error: cannot find symbol [javac] public final void addStatFuncs(Iterable<Func> funcs) [javac] ^ [javac] symbol: class Func [javac] location: class L2Character [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\itemcontainer\PcInventory.java:240: error: cannot find symbol [javac] public TradeList.TradeItem[] getAvailableItems(TradeList tradeList) [javac] ^ [javac] symbol: class TradeList [javac] location: class PcInventory [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\itemcontainer\PcInventory.java:240: error: package TradeList does not exist [javac] public TradeList.TradeItem[] getAvailableItems(TradeList tradeList) [javac] ^ [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\actor\instance\L2DoorInstance.java:65: error: cannot find symbol [javac] private ClanHall _clanHall; [javac] ^ [javac] symbol: class ClanHall [javac] location: class L2DoorInstance [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\actor\instance\L2DoorInstance.java:289: error: cannot find symbol [javac] public void setClanHall(ClanHall clanHall) { [javac] ^ [javac] symbol: class ClanHall [javac] location: class L2DoorInstance [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\actor\instance\L2DoorInstance.java:293: error: cannot find symbol [javac] public ClanHall getClanHall() { [javac] ^ [javac] symbol: class ClanHall [javac] location: class L2DoorInstance [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\actor\instance\L2DoorInstance.java:99: error: cannot find symbol [javac] public void stopMove(Location pos) [javac] ^ [javac] symbol: class Location [javac] location: class L2DoorInstance.AIAccessor [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\mapregion\L2MapRegionRestart.java:38: error: cannot find symbol [javac] private Castle _castle; [javac] ^ [javac] symbol: class Castle [javac] location: class L2MapRegionRestart [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\mapregion\L2MapRegionRestart.java:178: error: cannot find symbol [javac] public void setCastle(Castle c) { [javac] ^ [javac] symbol: class Castle [javac] location: class L2MapRegionRestart [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\mapregion\L2MapRegionRestart.java:181: error: cannot find symbol [javac] public Castle getCastle() { return _castle; } [javac] ^ [javac] symbol: class Castle [javac] location: class L2MapRegionRestart [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\actor\instance\L2DoormenInstance.java:42: error: cannot find symbol [javac] private ClanHall _clanHall; [javac] ^ [javac] symbol: class ClanHall [javac] location: class L2DoormenInstance [javac] E:\Surce\Source\gameserver\src\ru\impulse\gameserver\model\actor\instance\L2DoormenInstance.java:57: error: cannot find symbol [javac] public final ClanHall getClanHall() [javac] ^ [javac] symbol: class ClanHall [javac] location: class L2DoormenInstance [javac] 14 errors BUILD FAILED E:\Surce\Source\ant\build.xml:10: The following error occurred while executing this line: E:\Surce\Source\ant\build_gameserver.xml:15: The following error occurred while executing this line: E:\Surce\Source\ant\build_template.xml:6: Compile failed; see the compiler error output for details. Total time: 57 seconds
кто знает что за ошибки при компиляции?
-
Название: (Шара) Нпц Продающий Скилы
Добавил: sotiga
Добавлен: 21 Apr 2015
Категория: Серверные дополнения
Автор: masoneХроники: Interlude
такой нпц был на сервере Pulse-World.ru (не реклама)
- 3
-
Я хочу получить купон! -
Продам дизайн + 2 домена tirael.ws и tirael.info
за 2к руб.
Все предлы в пм (можете сразу кидать туда свои контакты для фидбэка).
Гарантии:
перс. аттестат, 60 BL
Домены пушим в ваш аккаунт reghouse.ru.
Дизайн (psd + верстка) 7z архивом на почту.
верстка под sw 13 ?
-
Нужен человек кто может Делать дизайн и верстать сайты на ghtweb 4.0.11 не из дорогих , есть кто на примете ?
-
Я же тебе говорю, открываешь проект эклипсом и смотришь, что за ошибки всплывают. Не забудь только указать к проекту версию Java 1.8.
спасибо щас попробую
-
Думаю лучше подойдет eclipse в плане списка классов с ошибками в консоли. Очень удобно.
ну так запустил прописал это и что уже он на java 8 я не думаю что то ещё надо сделать , но что?
<target name="compile" depends="init" description="Compile the source."> <javac destdir="${build.classes}" includeantruntime="true" optimize="on" debug="on" source="1.8" target="1.8" nowarn="off" encoding="UTF-8"> <compilerarg value="-Xlint:all"></compilerarg> <src path="${src}"/> <classpath refid="classpath"/> </javac>
-
Netbeans ты про это имел виду ?Ошибки типичны, возьми и откройте проект в IDE
-
<?xml version="1.0" encoding="UTF-8"?> <project name="GameServer" default="dist" basedir="."> <description> This script will build the Interlude Server. </description> <property name="src" location="java"/> <property name="lib" location="lib"/> <property name="build" location="build"/> <property name="build.classes" location="${build}/classes"/> <property name="build.dist" location="${build}/dist"/> <property name="build.dist.login" location="${build.dist}/login"/> <property name="build.dist.game" location="${build.dist}/gameserver"/> <path id="classpath"> <fileset dir="${lib}"> <include name="c3p0-0.9.1.2.jar"/> <include name="bsf.jar"/> <include name="bsh-2.0b4.jar"/> <include name="commons-logging-1.1.jar"/> <include name="commons-lang-2.4.jar"/> <include name="jython.jar"/> <include name="javolution-5.5.1.jar"/> <include name="mysql-connector-java-5.1.13-bin.jar"/> <include name="ISProtect.jar"/> <include name="l2jserver.jar"/> </fileset> </path> <target name="init" depends="clean" description="Create the output directories."> <mkdir dir="${build}"/> <mkdir dir="${build.classes}"/> <mkdir dir="${build.dist}" /> <mkdir dir="${build.dist.login}" /> <mkdir dir="${build.dist.game}" /> </target> <target name="compile" depends="init" description="Compile the source."> <javac destdir="${build.classes}" includeantruntime="true" optimize="on" debug="on" source="1.8" target="1.8" nowarn="off" encoding="UTF-8"> <compilerarg value="-Xlint:all"></compilerarg> <src path="${src}"/> <classpath refid="classpath"/> </javac> </target> <target name="jar" depends="compile" description="Create the jar file"> <pathconvert property="libs.project" pathsep=" "> <mapper> <chainedmapper> <flattenmapper/> <globmapper from="*" to="*"/> </chainedmapper> </mapper> <path> <fileset dir="${lib}"> <include name="*.jar"/> </fileset> </path> </pathconvert> <jar destfile="${build}/l2jserver.jar"> <fileset dir="${build.classes}"/> <manifest> <attribute name="Main-Class" value="net.sf.l2j.Server"/> <attribute name="Implementation-Vendor-Id" value="RusTeam"/> <attribute name="Class-Path" value="${libs.project}"/> </manifest> </jar> <copy todir="${build.dist.login}"> <fileset dir="${build}"> <include name="l2jserver.jar"/> </fileset> </copy> <copy todir="${build.dist.game}"> <fileset dir="${build}"> <include name="l2jserver.jar"/> </fileset> </copy> </target> <target name="dist" depends="jar"> <copy todir="${build.dist.login}"> <fileset dir="${src}"> <include name="log.cfg"/> <include name="banned_ip.cfg"/> <include name="console.cfg"/> <include name="servername.xml"/> </fileset> </copy> <copy todir="${build.dist.game}"> <fileset dir="${src}"> <include name="log.cfg"/> <include name="console.cfg"/> <include name="rt.cfg"/> </fileset> </copy> <copy todir="${build.dist.login}/lib"> <fileset dir="${src}/../lib"> <include name="c3p0-0.9.1.2.jar"/> <include name="commons-lang-2.4.jar"/> <include name="mysql-connector-java-5.1.13-bin.jar"/> <include name="javolution-5.5.1.jar"/> <include name="mmocore.jar"/> </fileset> </copy> <copy todir="${build.dist.game}/lib"> <fileset dir="${src}/../lib"> <include name="*.jar"/> </fileset> </copy> <copy todir="${build.dist}"> <fileset dir="${basedir}"> <include name="README.txt"/> <include name="CHANGELOG.txt"/> </fileset> </copy> <copy todir="${build.dist}"> <fileset dir="${src}/../lib"> <include name="*LICENSE*"/> </fileset> </copy> <copy todir="${build.dist.login}"> <fileset dir="dist"> <include name="startAccountManager.*"/> <include name="startSQLAccountManager.*"/> <include name="LoginServer_loop.sh"/> <include name="startLoginServer.*"/> <include name="RegisterGameServer.*"/> </fileset> </copy> <copy todir="${build.dist.game}"> <fileset dir="dist"> <include name="GameServer_loop.sh"/> <include name="startGameServer.*"/> </fileset> </copy> <fixcrlf srcdir="${build.dist.game}" eol="lf" eof="remove" includes="**/*.sh"> </fixcrlf> <fixcrlf srcdir="${build.dist.login}" eol="lf" eof="remove" includes="**/*.sh"> </fixcrlf> <fixcrlf srcdir="${build.dist.game}" eol="crlf" eof="remove" includes="**/*.bat"> </fixcrlf> <fixcrlf srcdir="${build.dist.login}" eol="crlf" eof="remove" includes="**/*.bat"> </fixcrlf> <mkdir dir="${build.dist.game}/log" /> <mkdir dir="${build.dist.login}/log" /> <mkdir dir="${build.dist.game}/config" /> <mkdir dir="${build.dist.login}/config" /> <copy todir="${build.dist.game}/config"> <fileset dir="java/config"> <include name="*.ini"/> <include name="sayfilter.txt"/> <include name="sayfilter-ex.txt"/> <include name="license.key"/> <exclude name="loginserver.ini" /> <exclude name="login_dev.ini" /> </fileset> </copy> <copy todir="${build.dist.login}/config"> <fileset dir="java/config"> <include name="loginserver.ini"/> <include name="login_dev.ini"/> <include name="telnet.ini"/> </fileset> </copy> <mkdir dir="${build.dist.game}/data" /> <copy todir="${build.dist.game}/data"> <fileset dir="data"> <include name="*.csv"/> <include name="*.txt"/> </fileset> </copy> <mkdir dir="${build.dist.game}/data/geodata" /> <copy todir="${build.dist.game}/data/geodata"> <fileset dir="data/geodata"> <include name="*.txt"/> <include name="*.l2j"/> </fileset> </copy> <mkdir dir="${build.dist.game}/data/pathnode" /> <copy todir="${build.dist.game}/data/pathnode"> <fileset dir="data/pathnode"> <include name="*.txt"/> <include name="*.pn"/> </fileset> </copy> <zip destfile="${build}/GameServer.zip" basedir="${build.dist}" /> </target> <target name="clean" description="Remove the output directories"> <delete dir="${build}"/> </target> </project>
в build файле правте jdk1.6 на jdk1.8 или может быть java6 на java8 и должны быть установлены jdk/Jre 1.8
так?
-
Привет всем кто может обьяснить ,у меня исходный код lineage 2 на основе java 6 как мне сделать что бы исхдоный код был на java 7 или 8 ?
ApacheDBCP.java
в Ядро сервера
Опубликовано
вот где этот код находиться или где взять ?