Wie set-Eigenschaft autoReconnect für mysql-db-url in Play Framework-Konfiguration-Datei?

Ich versuche, autoReconnect=true mysql-connection-Eigenschaft in der Anwendung.conf-Datei von meinem Play Framework 2.0-Anwendung. Aber es gibt mir die folgende Fehlermeldung :

Caused by: java.sql.SQLException: The connection property 'autoReconnect' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'true?useUnicode=yes' is not in this set.

Dies ist mein Verbindungszeichenfolge in der Anwendung.conf-Datei:

db.default.url="mysql://db_user:db_user@localhost/mydb?autoReconnect=true"

Ich bin versucht, in diesem Zusammenhang parameter, da bin ich immer diesen Fehler in meiner Bewerbung, nachdem er im Leerlauf für eine lange Zeit :

[error] c.j.b.ConnectionHandle - Database access problem. Killing off all remaining connections in the connection pool. SQL State = 08S01
[error] application - Failed to login the user : guest
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully  
received from the server was 153,398,761 milliseconds ago.  
The last packet sent successfully to the server was 153,398,762 milliseconds ago. is longer than the server configured value of 'wait_timeout'. 
You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

Ich habe auch versucht die Einstellung in diesen spielen, db-Parameter, um dieses Problem beheben Problem wie hier erwähnt ( https://groups.google.com/forum/#!Thema/Spiel-framework/KzvbZ61j9Eo ), aber es hat das problem nicht lösen.

idleConnectionTestPeriod=10
testConnectionOnCheckin=true

Keine Anleitung zur Lösung des Problems wäre sehr geschätzt.

Dank.

hat das geklappt? Ich Hinzugefügt ?autoReconnect=true, um die jdbc-url, aber wenn ich zu lange warten, es stil bekommt die gleichen Fehler, ist es nicht automatisch wiederherstellen

InformationsquelleAutor invinc4u | 2013-07-27

Schreibe einen Kommentar