Hi I have a java local desktop application that use a shared H2 database
(on the LAN).
I use AUTO_SERVER=TRUE options, so the auto_server mode.
But I don't understand if this mode works only if the different
applications run on the same machine. I have this problem when an user
tries to use the program when another are using it:
org.h2.jdbc.JdbcSQLException: Connection is broken:
"java.net.ConnectException: Connection refused: connect: 127.0.1.1:44256"
[90067-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:434)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:344)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
at org.h2.Driver.connect(Driver.java:74)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at gestionalelauncher.db.DbManager.getConnection(DbManager.java:47)
at
gestionalelauncher.db.DbManager.getLastDateOfBackup(DbManager.java:67)
at
gestionalelauncher.GestionaleLauncher.start(GestionaleLauncher.java:75)
at
com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown
Source)
at
com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown
Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown
Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown
Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
Can you help me with this problem? I have to use a server mode? And then
how I can do with concurrency?
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.