When I connect Squirrel SQL, I use the absolute path like
"jdbc:h2:tcp://localhost:9092/data/servers/glassfish/domains/myApp/
config/db"

The stacktrace is :
org.h2.jdbc.JdbcSQLException: Connection is broken [90067-100]
        at org.h2.message.Message.getSQLException(Message.java:103)
        at org.h2.message.Message.getSQLException(Message.java:114)
        at org.h2.message.Message.getSQLException(Message.java:77)
        at org.h2.message.Message.getSQLException(Message.java:149)
        at org.h2.engine.SessionRemote.checkClosed(SessionRemote.java:434)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:322)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer
(SessionRemote.java:227)
        at org.h2.engine.SessionRemote.createSession(SessionRemote.java:221)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:103)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:87)
        at org.h2.Driver.connect(Driver.java:57)
        at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection
(SQLDriverManager.java:133)
        at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute
(OpenConnectionCommand.java:97)
        at
net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand
$SheetHandler.run(ConnectToAliasCommand.java:279)
        at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run
(TaskExecuter.java:82)
        at java.lang.Thread.run(Thread.java:613)

Is important to have the possiblity to choose the port when an
external tool must be connected
to the database via the server.

Thanks

On Nov 25, 8:43 pm, "Thomas Mueller" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> > I'm using H2 database on Glassfish.
> > I've configured a connection pool with the following properties...
> >      <property value="jdbc:h2:./db/slenticketdb;auto_server=true"
> > When the domain starts, I can't connect to the database with an
> > external process like SQuirrel SQL Client ?
>
> If you get an exception, could you post it please? It should work when
> using the exact same URL as above
> jdbc:h2:./db/slenticketdb;auto_server=true
> however it's sometimes better to use an absolute path, or a path
> relative to the user home directory (jdbc:h2:~/...). Otherwise you
> could end up with two databases if the current working directory is
> different in the two applications.
>
> > How to allow other process to connect to a server started database ?
>
> It's allowed automatically when using ;auto_server=true (even remote
> access is allowed - but there is additional security using a randomly
> generated key that is stored in the .lock.db file in addition to the
> user password protection).
>
> > How to set the tcp port ?
>
> You don't need to set it, the port is picked automatically and saved
> in the .lock.db file.
>
> Regards,
> Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to