• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Interacting with the HSQLDB

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have JForum installed, running and using HSQLDB. I read some of the documentation from the HSQLDB web site and I can interact with a test DB.

How do I interact the JForum HSQLDB tables?

What steps do I go through to get the results of:
select * from jforum_users;

Thanks...
[originally posted on jforum.net by spiderhere]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The default jforum hsqldb is started in embedded mode. If you want to access it while your jforum is running you will have to start it in server mode.

The hsqldb files for jforum are normally in config/database/hsqldb/jforum
[originally posted on jforum.net by marc]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info. Here is what I unsuccessfully tried.

# cd .../jforum/WEB-INF/config/database/hsqldb
java -classpath ../../../lib/hsqldb-1.7.3.0.jar org.hsqldb.Server &

[Server@19189e1]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@19189e1]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@19189e1]: Startup sequence initiated from main() method
[Server@19189e1]: Loaded properties from [/opt/SUNWwbsvr/https-ilsdev15.red.iplanet.com/webapps/https-ilsdev15.red.iplanet.com/jforum/WEB-INF/config/database/hsqldb/server.properties]
[Server@19189e1]: Initiating startup sequence...
[Server@19189e1]: Server socket opened successfully in 42 ms.
[Server@19189e1]: Database [index=0, id=0, db=file:test, alias=] opened sucessfully in 1202 ms.
[Server@19189e1]: Startup sequence completed in 1299 ms.
[Server@19189e1]: 2005-03-15 18:59:27.112 HSQLDB server 1.7.3 is online
[Server@19189e1]: To close normally, connect and execute SHUTDOWN SQL
[Server@19189e1]: From command line, use [Ctrl]+[C] to abort abruptly

*** At this point, hsqldb creates a test database in the directory I'm in.
Should I create a server.properties files? If yes, what should it look like?

# cat /sqltool.rc
urlid localhost-sa
url jdbc:hsqldb:hsql://localhost
username sa
password mypassword

# java -jar ../../../lib/hsqldb-1.7.3.0.jar localhost-sa
Failed to get a connection to jdbc:hsqldb:hsql://localhost as sa. Access is denied

*** I believe I fail to connect to the JForum db because the hsqldb server started up connected to the test db whereas I want to connect to the JForum db.

Any suggestions?


[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you have to specifiy the name of the database you want to start, otherwise a new db 'test' will be created.

try this:

java -classpath ../../../lib/hsqldb-1.7.3.0.jar org.hsqldb.Server -database.0 jforum -dbname.0 jforum &
[originally posted on jforum.net by marc]
 
The knights of nee want a shrubbery. And a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic