MySQL (Fehler)

Dieses Thema im Forum "Programmierung" wurde erstellt von Plugin00, 21. Juni 2013.

  1. Plugin00
    Offline

    Plugin00

    Registriert seit:
    3. Februar 2013
    Beiträge:
    71
    Hey, Ich arbeite das erste mal mit "MySQL" Und ich komme grade nicht Weiter,

    Datenbank (DB):

    Code (Text):
    1. import java.sql.Connection;
    2. import java.sql.DriverManager;
    3. import java.sql.ResultSet;
    4. import java.sql.Statement;
    5. import java.sql.SQLException;
    6. import java.util.Iterator;
    7. import org.bukkit.Bukkit;
    8. import org.bukkit.entity.Player;
    9.  
    10. public class DB {
    11.    
    12.     public static Plugin00 plugin = Plugin00.instance;
    13.  
    14.     public static Connection c;
    15.     public static String url;
    16.    
    17.    
    18.     public static void connect() {
    19.         try {
    20.             url = ("jdbc:mysql://" + Plugin00.host+"/"+Plugin00.db+"?user="+Plugin00.user+"&password="+Plugin00.password+"&autoReconnect=true");
    21.             c = DriverManager.getConnection(url);
    22.  
    23.         } catch (SQLException e) {
    24.             e.printStackTrace();
    25.         }
    26.     }
    27.  
    28.     public static void close() {
    29.         try {
    30.             if (c != null) {
    31.                 c.close();
    32.             }
    33.         } catch (Exception e) {
    34.             e.printStackTrace();
    35.         }
    36.        
    37.     }
    38.       public static ResultSet Update(String qry)
    39.       {
    40.         try {
    41.           Statement stmt = c.createStatement();
    42.           stmt.executeUpdate(qry);
    43.  
    44.           stmt.close();
    45.         } catch (Exception ex) {
    46.           connect();
    47.         }
    48.         return null;
    49.       }
    50.  
    51.       public static ResultSet query(String qry) {
    52.         ResultSet rs = null;
    53.         try {
    54.           Statement stmt = c.createStatement();
    55.           rs = stmt.executeQuery(qry);
    56.         }
    57.         catch (Exception ex) {
    58.           connect();
    59.         }
    60.         return rs;
    61.       }
    62. }
    Hauptklasse (Main):
    Code (Text):
    1.  
    2.     public static String host = "";
    3.     public static String password = "";
    4.     public static String user = "";
    5.     public static String db = "";
    6.     public static String port = "";
    onEnable (Plugin geladen):
    Code (Text):
    1.         host = getConfig().getString("DB.Host");
    2.         password = getConfig().getString("DB.Password");
    3.         user = getConfig().getString("DB.User");
    4.         db = getConfig().getString("DB.DB");
    5.  
    6.         getConfig().addDefault("DB.Host", "//Host//");
    7.         getConfig().addDefault("DB.Password", "//Password//");
    8.         getConfig().addDefault("DB.User", "//User");
    9.         getConfig().addDefault("DB.DB", "//DB//");
    10.         getConfig().options().copyDefaults(true);
    11.         saveConfig();
    12.  
    Vllt. sieht ihr den Fehler. :)
     
    #1
  2. TimBone
    Online

    TimBone

    Mit der Fehlermeldung finden wir den Fehler leichter.
     
    #2
  3. Chrisliebaer
    Online

    Chrisliebaer

    Und jetzt nenn noch bitte den Fehler. Ich geh bestimmt nicht den ganzen Code durch um ne Stelle zu finden, die vielleicht falsch ist. Poste bitte die Fehlermeldung, die du bekommst oder wo du nicht weiter kommst.
     
    #3
  4. Plugin00
    Offline

    Plugin00

    Registriert seit:
    3. Februar 2013
    Beiträge:
    71
    Code (Text):
    1. 2013-06-21 21:12:38 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    2. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    3. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    4. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    5. 2013-06-21 21:12:38 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    6. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    7. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.Util.getInstance(Util.java:382)
    8. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
    9. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    10. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
    11. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
    12. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2239)
    13. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2168)
    14. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    15. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    16. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    17. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    18. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    19. 2013-06-21 21:12:38 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    20. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    21. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    22. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    23. 2013-06-21 21:12:38 [SEVERE]    at java.sql.DriverManager.getConnection(Unknown Source)
    24. 2013-06-21 21:12:38 [SEVERE]    at java.sql.DriverManager.getConnection(Unknown Source)
    25. 2013-06-21 21:12:38 [SEVERE]    at me.Plugin00.Plugin00.DB.connect(DB.java:23)
    26. 2013-06-21 21:12:38 [SEVERE]    at me.Plugin00.Plugin00.Plugin00.onEnable(Plugin00.java:357)
    27. 2013-06-21 21:12:38 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    28. 2013-06-21 21:12:38 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
    29. 2013-06-21 21:12:38 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
    30. 2013-06-21 21:12:38 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugin(CraftServer.java:282)
    31. 2013-06-21 21:12:38 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.enablePlugins(CraftServer.java:264)
    32. 2013-06-21 21:12:38 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.j(MinecraftServer.java:304)
    33. 2013-06-21 21:12:38 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.e(MinecraftServer.java:283)
    34. 2013-06-21 21:12:38 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.a(MinecraftServer.java:243)
    35. 2013-06-21 21:12:38 [SEVERE]    at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:151)
    36. 2013-06-21 21:12:38 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382)
    37. 2013-06-21 21:12:38 [SEVERE]    at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
    38. 2013-06-21 21:12:38 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    39.  
    40. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    41. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    42. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    43. 2013-06-21 21:12:38 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    44. 2013-06-21 21:12:38 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    45. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    46. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    47. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    48. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    49. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2186)
    50. 2013-06-21 21:12:38 [SEVERE]    ... 25 more
    51. 2013-06-21 21:12:38 [SEVERE] Caused by: java.net.ConnectException: Connection refused: connect
    52. 2013-06-21 21:12:38 [SEVERE]    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    53. 2013-06-21 21:12:38 [SEVERE]    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    54. 2013-06-21 21:12:38 [SEVERE]    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    55. 2013-06-21 21:12:38 [SEVERE]    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    56. 2013-06-21 21:12:38 [SEVERE]    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    57. 2013-06-21 21:12:38 [SEVERE]    at java.net.PlainSocketImpl.connect(Unknown Source)
    58. 2013-06-21 21:12:38 [SEVERE]    at java.net.SocksSocketImpl.connect(Unknown Source)
    59. 2013-06-21 21:12:38 [SEVERE]    at java.net.Socket.connect(Unknown Source)
    60. 2013-06-21 21:12:38 [SEVERE]    at java.net.Socket.connect(Unknown Source)
    61. 2013-06-21 21:12:38 [SEVERE]    at java.net.Socket.<init>(Unknown Source)
    62. 2013-06-21 21:12:38 [SEVERE]    at java.net.Socket.<init>(Unknown Source)
    63. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    64. 2013-06-21 21:12:38 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    65. 2013-06-21 21:12:38 [SEVERE]    ... 27 more
    66. 2013-06-21 21:12:48 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    67. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    68. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    69. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    70. 2013-06-21 21:12:48 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    71. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    72. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.Util.getInstance(Util.java:382)
    73. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
    74. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    75. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
    76. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
    77. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2239)
    78. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2168)
    79. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    80. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    81. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    82. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    83. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    84. 2013-06-21 21:12:48 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    85. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    86. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    87. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    88. 2013-06-21 21:12:48 [SEVERE]    at java.sql.DriverManager.getConnection(Unknown Source)
    89. 2013-06-21 21:12:48 [SEVERE]    at java.sql.DriverManager.getConnection(Unknown Source)
    90. 2013-06-21 21:12:48 [SEVERE]    at me.Plugin00.Plugin00.DB.connect(DB.java:23)
    91. 2013-06-21 21:12:48 [SEVERE]    at me.Plugin00.Plugin00.DB.Update(DB.java:55)
    92. 2013-06-21 21:12:48 [SEVERE]    at me.Plugin00.Plugin00.Plugin00.onEnable(Plugin00.java:359)
    93. 2013-06-21 21:12:48 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    94. 2013-06-21 21:12:48 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
    95. 2013-06-21 21:12:48 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
    96. 2013-06-21 21:12:48 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugin(CraftServer.java:282)
    97. 2013-06-21 21:12:48 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.enablePlugins(CraftServer.java:264)
    98. 2013-06-21 21:12:48 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.j(MinecraftServer.java:304)
    99. 2013-06-21 21:12:48 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.e(MinecraftServer.java:283)
    100. 2013-06-21 21:12:48 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.a(MinecraftServer.java:243)
    101. 2013-06-21 21:12:48 [SEVERE]    at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:151)
    102. 2013-06-21 21:12:48 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382)
    103. 2013-06-21 21:12:48 [SEVERE]    at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
    104. 2013-06-21 21:12:48 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    105.  
    106. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    107. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    108. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    109. 2013-06-21 21:12:48 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    110. 2013-06-21 21:12:48 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    111. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    112. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    113. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    114. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    115. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2186)
    116. 2013-06-21 21:12:48 [SEVERE]    ... 26 more
    117. 2013-06-21 21:12:48 [SEVERE] Caused by: java.net.ConnectException: Connection refused: connect
    118. 2013-06-21 21:12:48 [SEVERE]    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    119. 2013-06-21 21:12:48 [SEVERE]    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    120. 2013-06-21 21:12:48 [SEVERE]    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    121. 2013-06-21 21:12:48 [SEVERE]    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    122. 2013-06-21 21:12:48 [SEVERE]    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    123. 2013-06-21 21:12:48 [SEVERE]    at java.net.PlainSocketImpl.connect(Unknown Source)
    124. 2013-06-21 21:12:48 [SEVERE]    at java.net.SocksSocketImpl.connect(Unknown Source)
    125. 2013-06-21 21:12:48 [SEVERE]    at java.net.Socket.connect(Unknown Source)
    126. 2013-06-21 21:12:48 [SEVERE]    at java.net.Socket.connect(Unknown Source)
    127. 2013-06-21 21:12:48 [SEVERE]    at java.net.Socket.<init>(Unknown Source)
    128. 2013-06-21 21:12:48 [SEVERE]    at java.net.Socket.<init>(Unknown Source)
    129. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    130. 2013-06-21 21:12:48 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    131. 2013-06-21 21:12:48 [SEVERE]    ... 28 more
    132. 2013-06-21 21:12:58 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    133. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    134. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    135. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    136. 2013-06-21 21:12:58 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    137. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    138. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.Util.getInstance(Util.java:382)
    139. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
    140. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    141. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
    142. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
    143. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2239)
    144. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2168)
    145. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    146. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    147. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    148. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    149. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    150. 2013-06-21 21:12:58 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    151. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    152. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    153. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    154. 2013-06-21 21:12:58 [SEVERE]    at java.sql.DriverManager.getConnection(Unknown Source)
    155. 2013-06-21 21:12:58 [SEVERE]    at java.sql.DriverManager.getConnection(Unknown Source)
    156. 2013-06-21 21:12:58 [SEVERE]    at me.Plugin00.Plugin00.DB.connect(DB.java:23)
    157. 2013-06-21 21:12:58 [SEVERE]    at me.Plugin00.Plugin00.DB.Update(DB.java:55)
    158. 2013-06-21 21:12:58 [SEVERE]    at me.Plugin00.Plugin00.Plugin00.onEnable(Plugin00.java:360)
    159. 2013-06-21 21:12:58 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    160. 2013-06-21 21:12:58 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
    161. 2013-06-21 21:12:58 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
    162. 2013-06-21 21:12:58 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugin(CraftServer.java:282)
    163. 2013-06-21 21:12:58 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.enablePlugins(CraftServer.java:264)
    164. 2013-06-21 21:12:58 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.j(MinecraftServer.java:304)
    165. 2013-06-21 21:12:58 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.e(MinecraftServer.java:283)
    166. 2013-06-21 21:12:58 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.a(MinecraftServer.java:243)
    167. 2013-06-21 21:12:58 [SEVERE]    at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:151)
    168. 2013-06-21 21:12:58 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382)
    169. 2013-06-21 21:12:58 [SEVERE]    at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
    170. 2013-06-21 21:12:58 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    171.  
    172. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    173. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    174. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    175. 2013-06-21 21:12:58 [SEVERE]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    176. 2013-06-21 21:12:58 [SEVERE]    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    177. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    178. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    179. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    180. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    181. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2186)
    182. 2013-06-21 21:12:58 [SEVERE]    ... 26 more
    183. 2013-06-21 21:12:58 [SEVERE] Caused by: java.net.ConnectException: Connection refused: connect
    184. 2013-06-21 21:12:58 [SEVERE]    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    185. 2013-06-21 21:12:58 [SEVERE]    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    186. 2013-06-21 21:12:58 [SEVERE]    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    187. 2013-06-21 21:12:58 [SEVERE]    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    188. 2013-06-21 21:12:58 [SEVERE]    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    189. 2013-06-21 21:12:58 [SEVERE]    at java.net.PlainSocketImpl.connect(Unknown Source)
    190. 2013-06-21 21:12:58 [SEVERE]    at java.net.SocksSocketImpl.connect(Unknown Source)
    191. 2013-06-21 21:12:58 [SEVERE]    at java.net.Socket.connect(Unknown Source)
    192. 2013-06-21 21:12:58 [SEVERE]    at java.net.Socket.connect(Unknown Source)
    193. 2013-06-21 21:12:58 [SEVERE]    at java.net.Socket.<init>(Unknown Source)
    194. 2013-06-21 21:12:58 [SEVERE]    at java.net.Socket.<init>(Unknown Source)
    195. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    196. 2013-06-21 21:12:58 [SEVERE]    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    197. 2013-06-21 21:12:58 [SEVERE]    ... 28 more
    Das ist hier der Fehler.
     
    #4
  5. Chrisliebaer
    Online

    Chrisliebaer

    Code (Text):
    1. 2013-06-21 21:12:58 [SEVERE] Caused by: java.net.ConnectException: Connection refused: connect
    Dann würde ich das mal fixen ;)
     
    #5
  6. OT:
    Davon mal abgesehen, dass der Codestil nicht mit dem meinigem übereinstimmt (Schlimmer: Es erinnert mich an die DeBukkit-Seuche)

    @Topic:
    Du solltest vielleicht entsprechend darauf achten, was die Fehlermeldung sagt, bevor du jedesmal hier fragst. Es ist offensichtlich was der Fehler ist: Keine Connection.
     
    #6
  7. Plugin00
    Offline

    Plugin00

    Registriert seit:
    3. Februar 2013
    Beiträge:
    71
    So, habe es hin bekommen.
     
    #7
  8. MrFlieder
    Offline

    MrFlieder

    Registriert seit:
    30. Dezember 2011
    Beiträge:
    333
    Ort:
    Österreich
    Minecraft:
    MrFlieder
    Und wie hast du das gemacht?
    Wäre für andere Leute mit selbigem Problem vielleicht nicht von all zu kleinem Interesse.
     
    #8
  9. Chrisliebaer
    Online

    Chrisliebaer

    Er hat entweder die IP oder den Port korrigiert. Eventuell wäre es auch möglich, dass der MySQL Server nicht lief oder eine Firewall aktiv war.
     
    #9