我正在尝试使用此命令启动hsqldb:
java -classpath ..\war\WEB-INF\lib\hsqldb.jar org.hsqldb.Server -database test
这取自http://static.springsource.org/docs/Spring-MVC-step-by-step/part5.html - “5.1。创建数据库启动脚本”
部分这是我得到的错误:
C:\Projects3\springapp\db>java -classpath ..\war\WEB-INF\lib\hsqldb.jar org.hsql
db.Server -database
[Server@e0e1c6]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@e0e1c6]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@e0e1c6]: [Thread[main,5,main]]: Failed to set properties
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at java.lang.String.substring(String.java:1904)
at org.hsqldb.server.ServerProperties.validateMultiProperty(Unknown Sour
ce)
at org.hsqldb.server.ServerProperties.validate(Unknown Source)
at org.hsqldb.server.Server.setProperties(Unknown Source)
at org.hsqldb.server.Server.main(Unknown Source)
这不是启动hsql数据库的正确方法吗?
答案 0 :(得分:4)
试试这个:
java -classpath ..\war\WEB-INF\lib\hsqldb.jar org.hsqldb.Server --database.0 test