问题是当我的 hsql 服务器启动时,它告诉别名存在,一切都连接成功:
rpi@RaspberryPi:/home/snb/update_skynetwork/apps/App/bin$ sh skysql.sh
/home/snb/update_skynetwork/apps/App/lib/hsqldb-2.2.8.jar
[Server@133796]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@133796]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@133796]: Startup sequence initiated from main() method
[Server@133796]: Could not load properties from file
[Server@133796]: Using cli/default properties only
[Server@133796]: Initiating startup sequence...
[Server@133796]: Server socket opened successfully in 7 ms.
] opened sucessfully in 1462 ms.=0, id=0, db=file:/home/snb/update_skynetwork/apps/App/sky-network-hsqldb/sky-network-hsqldb, alias=sky-network-hsqldb
[Server@133796]: Startup sequence completed in 1473 ms.
[Server@133796]: 2012-12-20 10:23:11.843 HSQLDB server 2.2.8 is online on port 9001
[Server@133796]: To close normally, connect and execute SHUTDOWN SQL
[Server@133796]: From command line, use [Ctrl]+[C] to abort abruptly
但是当我尝试连接我的 java 应用程序时,我收到了这个错误:
-在服务器上:
[Server@133796]: [Thread[HSQLDB Connection @bdb503,5,HSQLDB Connections @133796]]: database alias=sky-network-hsqldb does not exist
[Server@133796]: [Thread[HSQLDB Connection @110003,5,HSQLDB Connections @133796]]: database alias=sky-network-hsqldb does not exist
[Server@133796]: [Thread[HSQLDB Connection @175d6ab,5,HSQLDB Connections @133796]]: database alias=sky-network-hsqldb does not exist
-在客户端:
Caused by: org.hsqldb.HsqlException: General error: database alias does not exist
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.ClientConnection.<init>(Unknown Source)
... 16 more
我试过用sqltool测试连接,但还是一样。另外,我已经检查了客户端属性中的别名 - 都一样,就像需要一样。hsql的罐子是一样的。一切都匹配。
作为操作系统,我有一个 Raspberry-pi VM。
编辑
这是我的 sqltool.sh :
#! /bin/sh -e
export CLASSPATH=../lib/hsqldb-2.2.8.jar:$CLASSPATH
export CLASSPATH=../lib/sqltool.jar:$CLASSPATH
java -classpath $CLASSPATH org.hsqldb.cmdline.SqlTool -- inlineRc=url=jdbc:hsqldb:hsql://localhost/sky-network-hsqldb,user=SA,password=