This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to create hsqldb for spring

 
Tyagi Ashish
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
I have been following the spring tutorial (http://static.springsource.org/docs/Spring-MVC-step-by-step/part5.html).

When I tried to create database using following command

For Windows add:

'springapp/db/server.bat':

java -classpath ..\war\WEB-INF\lib\hsqldb.jar org.hsqldb.Server -database test

Now you can open a command window, change to the 'springapp/db' directory and start the database by running one of these startup scripts. I am getting following error.


C:\RSAWorkspace\spring\firstspring\db>java -classpath ..\war\WEB-INF\lib\hsqldb.jar org.hsqldb.Server -database test
[Server@6ca1c]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@6ca1c]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@6ca1c]: [Thread[main,5,main]]: Failed to set properties
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at java.lang.String.substring(Unknown Source)
at org.hsqldb.server.ServerProperties.validateMultiProperty(Unknown Source)
at org.hsqldb.server.ServerProperties.validate(Unknown Source)
at org.hsqldb.server.Server.setProperties(Unknown Source)
at org.hsqldb.server.Server.main(Unknown Source)


Could anyone tell me what I am doing wrong. I am using latest hsqldb.jar file in my lib folder.
 
Hadi Teo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tyagi,

I have encountered exactly the same issue. Subsequently i googled to the hsqldb user guide (http://hsqldb.org/doc/guide/guide.html#N10148).

According to the user guide, the following command is recommended in order to start the server :



Regards,

hadi teo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic