Restoring Apache Derby Database - netbeans

I use Netbeans to develop a project with JSF, JPA and Java database. I can make a back up online by right clicking the database connections under services and excuting CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('c:/tem/2005-06-01') command. But how can I restore or create a database from that backup.
Several articles state that to use jdbc:derby:sample;restoreFrom=c:\mybackups\sample in the in the boot time connection URL. What is boot time connection? I tried to use it as the connection string in Netbeans new connection dialog, but that was not successful.
Please tell me how can I restore the backup.

There is a wealth of information about backing up and restoring Derby databases here: http://db.apache.org/derby/docs/10.9/adminguide/cadminhubbkup98797.html
If you're not comfortable using Derby outside of the Netbeans environment, start here: http://db.apache.org/derby/docs/10.9/getstart/

Related

How to share a postgreSQL database?

I'm currently working on a project with some colleagues and a colleague of mine linked a database created in her postgreSQL server to our visual studio project, but we don't know how she can share the database with the rest of us, or how can we modify the database without having it.
We're using postgreSQL 14.
One option is to create your database in a cloud provider such as AWS.
You can take a look at: https://aws.amazon.com/rds/postgresql/
This way all of you will be able to access the database.

JBoss Developer Studio (Eclipse) Data Source Explorer - Disconnect HSQL still locked

I have a database connection to HSQL in Eclipse via the Data Source Explorer (DSE). I can browse the existing HSQL database just fine, and then I disconnect and start a web app that uses the same database. After disconnecting, my web app won't start unless I restart Eclipse because it says the HSQL database is locked.
If I start Eclipse and run my web app then it works fine.
What it looks like is that when I disconnect hte Eclipse DSE it does not actually release the lock properly.
Any ideas?
For anyone who is still looking for an answer:
HSQLDB lock file is not released from Eclipse Data source explorer when you disconnect, when you connect to file based URL. To release the lock, execute SHUTDOWN command on the DB (e.g. by opening SQL Scrapbook against the connection and executing SHUTDOWN as an SQL statement) and then disconnect. Also, this command could even be executed by starting a new session from the data source explorer itself, if you have disconnected before executing the shutdown command.

Generating database and connection from schema

I'm using Glassfish server 4.0 as my app server for a java project in NetBeans 7.3.1. I have a database schema which I would like to include in my server as a database. Is there a way to generate the database in Glassfish based on a previous schema?
The extensions of the files are .frm and there's one .opt file.
Also, does Glassfish include a visual interface to modify a database's table's properties and registries?
Thanks in advance.
The answer to your the last part of your question is no. Glassfish itself does not include a visual interface for modifying database tables, properties etc. It includes a visual interface for creating JDBC Connection Pools and JDBC Resources. I personally use one integrated into my IDE of choice, Netbeans may have this feature, I happen to use IDEA. In production you could use any 3rd party app that does this, TOAD being a popular one but there are many.
I have some thoughts on the first part of your question but nothing ready to put into an answer at this point. When I do I'll update this one if its still an open question.

Create SQLite after deploying wavemaker project to phonegap

I created project inside wavemaker and deployed it to eclipse using phonegap.
I need to create SQLite database so I can storage data while there is no network connection on device,so I can sync it after with server database.
I'm unable to create SQLite db inside wavemaker due to communication problem with hibernate (dialect).
My question is am I able and how, to create SQLite db after I deploy project to eclipse?
I have found many topics on this but non of the solutions help.
Why you not use hipersonic db? it's similar to sqlite and it's java native (it's also come bundled with wavemaker, you can choose to store the data in memory or a file)
http://hsqldb.org/
http://dev.wavemaker.com/wiki/bin/Dev/HSQLDB

Birt Eclipse, connecting to a SQLite database through ODBC? Do I need a specific JDBC driver for Birt to use?

I have been working on this for a while now and, unfortunately have little previous exposure to Birt as well as JDBC / ODBC. I've been searching and searching but can't conclusively figure out what I need for Birt to be able to connect to an SQLite database through ODBC.
I have setup the SQLit db on my windows machine to use ODBC. From here, however, I can't figure out, in the Birt Report Designer-> New data source-> JDBC data source what I am supposed to put in in order to access the DB.
Do I need a specific driver for this that I need to install to use as the "Driver Class"
Is the path to my ODBC / SQLite db the "Driver URL" field?
I would greatly appreciate any advice on this.
There is a JDBC driver specifically for SQLite, so you don't have to use a bridge.
The URL should be:
jdbc:sqlite:/path/to/my.db
The class is org.sqlite.JDBC.
As the initial answer points out, you can download the SQLite JDBC driver. Once downloaded, you need to correctly deploy the JAR into BIRT so the driver will be available in the eclipse designer. Put the JAR in:
<BIRT Install>\eclipse\plugins\com.actuate.data.oda.jdbc.drivers_<BIRT VERSION>
Once the JAR is there, re-start Eclipse/BIRT and you should be able to create a SQLite data source pretty easily.
Good Luck!