Closed aaannndddyyy closed 8 years ago
I think we have what you are looking for already: File -> Save Seed File. File -> Load Seed File.
Of course this assumes you have an out-of-band means for sharing the seed file.
Thanks. I just tried the option to save a seed file, and it crashes Aktie:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1871)
at org.eclipse.swt.widgets.FileDialog.presetChooserDialog(Unknown Source)
at org.eclipse.swt.widgets.FileDialog.openChooserDialog(Unknown Source)
at org.eclipse.swt.widgets.FileDialog.open(Unknown Source)
at aktie.gui.SWTApp$SaveSeeds.widgetSelected(SWTApp.java:1065)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at aktie.gui.SWTApp.open(SWTApp.java:2146)
at aktie.gui.SWTApp.main(SWTApp.java:1564)
org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
at aktie.net.InIdentityProcessor.process(InIdentityProcessor.java:51)
at aktie.BatchProcessor.processCObj(BatchProcessor.java:90)
at aktie.net.ConnectionThread.run(ConnectionThread.java:1374)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Die Datenbank wurde bereits geschlossen (um das automatische Schliessen beim Stopp der VM zu deaktivieren, die Datenbank URL mit ";DB_CLOSE_ON_EXIT=FALSE" ergänzen)
Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.message.DbException.get(DbException.java:143)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1468)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1443)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:446)
at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:938)
at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:93)
at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)
... 7 more
org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
at aktie.net.InIdentityProcessor.process(InIdentityProcessor.java:51)
at aktie.BatchProcessor.processCObj(BatchProcessor.java:90)
at aktie.net.ConnectionThread.run(ConnectionThread.java:1374)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Die Datenbank wurde bereits geschlossen (um das automatische Schliessen beim Stopp der VM zu deaktivieren, die Datenbank URL mit ";DB_CLOSE_ON_EXIT=FALSE" ergänzen)
Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.message.DbException.get(DbException.java:143)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1468)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1443)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:446)
at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:938)
at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:93)
at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)
... 7 more
org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
at aktie.net.InIdentityProcessor.process(InIdentityProcessor.java:51)
at aktie.BatchProcessor.processCObj(BatchProcessor.java:90)
at aktie.net.ConnectionThread.run(ConnectionThread.java:1374)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Die Datenbank wurde bereits geschlossen (um das automatische Schliessen beim Stopp der VM zu deaktivieren, die Datenbank URL mit ";DB_CLOSE_ON_EXIT=FALSE" ergänzen)
Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.message.DbException.get(DbException.java:143)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1468)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1443)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:446)
at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:938)
at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:93)
at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)
... 7 more
org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
at aktie.net.InIdentityProcessor.process(InIdentityProcessor.java:51)
at aktie.BatchProcessor.processCObj(BatchProcessor.java:90)
at aktie.net.ConnectionThread.run(ConnectionThread.java:1374)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Die Datenbank wurde bereits geschlossen (um das automatische Schliessen beim Stopp der VM zu deaktivieren, die Datenbank URL mit ";DB_CLOSE_ON_EXIT=FALSE" ergänzen)
Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.message.DbException.get(DbException.java:143)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1468)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1443)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:446)
at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:938)
at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:93)
at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)
... 7 more
org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
at aktie.net.InIdentityProcessor.process(InIdentityProcessor.java:51)
at aktie.BatchProcessor.processCObj(BatchProcessor.java:90)
at aktie.net.ConnectionThread.run(ConnectionThread.java:1374)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Die Datenbank wurde bereits geschlossen (um das automatische Schliessen beim Stopp der VM zu deaktivieren, die Datenbank URL mit ";DB_CLOSE_ON_EXIT=FALSE" ergänzen)
Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.message.DbException.get(DbException.java:143)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1468)
at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1443)
at org.h2.jdbc.JdbcConnection.getAutoCommit(JdbcConnection.java:446)
at com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:938)
at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:93)
at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)
... 7 more
[WARNING] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@43c055af -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
[WARNING] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@43c055af -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@54e6658b
on thread: C3P0PooledConnectionPoolManager[identityToken->z8kfsx9hu8bqpcrdbtnt|5181d903]-HelperThread-#0
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@6214b438
on thread: C3P0PooledConnectionPoolManager[identityToken->z8kfsx9hu8bqpcrdbtnt|5181d903]-HelperThread-#1
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@3d43fad6
on thread: C3P0PooledConnectionPoolManager[identityToken->z8kfsx9hu8bqpcrdbtnt|5181d903]-HelperThread-#2
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@3a091706
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2ac6a8ae
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@586c4d72
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2e50a4b8
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@306e43c9
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@172459f6
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@538e3158
Pool thread stack traces:
Thread[C3P0PooledConnectionPoolManager[identityToken->z8kfsx9hu8bqpcrdbtnt|5181d903]-HelperThread-#2,5,main]
org.h2.engine.Engine.openSession(Engine.java:157)
org.h2.engine.Engine.createSessionAndValidate(Engine.java:142)
org.h2.engine.Engine.createSession(Engine.java:125)
org.h2.engine.Engine.createSession(Engine.java:27)
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:331)
org.h2.jdbc.JdbcConnection.
EXITING.. RC: 0
And doing it right after start, the error is much shorter: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1871) at org.eclipse.swt.widgets.FileDialog.presetChooserDialog(Unknown Source) at org.eclipse.swt.widgets.FileDialog.openChooserDialog(Unknown Source) at org.eclipse.swt.widgets.FileDialog.open(Unknown Source) at aktie.gui.SWTApp$SaveSeeds.widgetSelected(SWTApp.java:1065) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at aktie.gui.SWTApp.open(SWTApp.java:2146) at aktie.gui.SWTApp.main(SWTApp.java:1564) EXITING.. RC: 0
if all hardcoded seednodes are down, and I and my friends are the only ones we know of who have this app, then it should be possible that we connect to each other by bottsotrapping from one another.
Needed:
Low priority