Questions tagged [derby]

Use this tag for questions about Apache Derby, an Apache DB subproject. Derby is an open source relational database implemented entirely in Java and available under the Apache License, Version 2.0.

Apache Derby, an Apache DB subproject, is an open source relational database implemented entirely in Java and available under the Apache License, Version 2.0.

Some key advantages include:

  • a small footprint
  • Java, JDBC, and SQL standards
  • embedded Java-based solutions in addition to traditional client/server support
  • and easy of installation and deployment.

From Java 6 onward a version of Derby is included in the JDK.

Useful Links

2643 questions
6
votes
2 answers

What are the pitfalls of an embedded connection to Derby over a network?

We have a Java desktop application that accesses a Derby database located on a network shared drive rather than locally. While multiple instances of the application share the database, only one instance ever has a live connection. This has been…
Marcos Vandel
  • 103
  • 1
  • 6
6
votes
5 answers

Java: generate CREATE TABLE code from an existing table

is there a way to generate the CREATE TABLE code from an existing table in a Derby database? Or a simple way to gather the necessary table information?
Alberto
  • 1,569
  • 1
  • 22
  • 41
6
votes
3 answers

How to setup a JTA data source in EclipseLink/JPA 2.0 in an Java EE 6 application for derby embedded database?

I am not able to find ecbDB JTA data source in the unit test. For RESOURCE_LOCAL the same persistence.xml works. Only within an EJB container it fails to locate a JTA data source. I get the following exception when the unit test is…
user237673
6
votes
6 answers

JUnit + Derby + Spring: drop in-memory db after every test

In my unit tests I autowired some DataSources, which use URLs like jdbc:derby:memory:mydb;create=true to create an in-memory DBs. To drop an in-memory Derby db you have to connect with: jdbc:derby:memory:mydb;drop=true I would like this to happen…
Puce
  • 37,247
  • 13
  • 80
  • 152
6
votes
3 answers

Error connecting to server localhost on port 1527 with message Connection refused

i am create a java project and i want to use derby data base and and i am configured database and create database with the name of /home/user/TestDB and create a table user and insert 3 to 4 values into it and write a code to get the data from…
Robert Justin
  • 73
  • 1
  • 1
  • 4
6
votes
2 answers

Java DB / Apache Derby with Android

Can I integrate Java DB or Apache Derby in my Android application? Or any inline or embedded database. Can anyone suggest code for it? I need some code because i have to make examples, not in theory. Anyone knows if this databases is supported or…
djk
  • 3,671
  • 9
  • 31
  • 40
6
votes
0 answers

H2 vs HSQLDB vs Derby | In-memory RDBMS for a Reporting APP

I'm designing a Data REST API for the purpose of dynamic reporting. Basically, you pass in the data to it (along with the functions to manipulate the data) and it returns you a HTML with the functions applied on the data. Typically, these functions…
user1189332
  • 1,773
  • 4
  • 26
  • 46
6
votes
2 answers

Configuring embedded Derby in Spring Boot app

Could you please help me set up connection to the embedded Derby database in Spring Boot application? I searched the web but can only find solutions for server-type Derby, not for embedded Derby. spring.jpa.database = ? spring.jpa.hibernate.ddl-auto…
Jakub Janiš
  • 131
  • 1
  • 2
  • 8
6
votes
3 answers

How should I use UUID with JavaDB/Derby and JDBC?

I currently use INT as type for primary key in JavaDB (Apache Derby), but since I'm implementing an distributed system I would like to change the type to java.util.UUID. A few questions about this: What datatype in JavaDB/Derby should I use for…
Jonas
  • 121,568
  • 97
  • 310
  • 388
6
votes
3 answers

How to check if a database exists in Hsqldb/Derby?

I am looking for information how to check if a database exists -- from Java code -- in hsqldb and in Apache derby. In Mysql it is quite easy, because I can query a system table -- INFORMATION_SCHEMA.SCHEMATA -- but these two databases seem not to…
Skarab
  • 6,981
  • 13
  • 48
  • 86
6
votes
5 answers

How do you start derby in network server mode and still get an embedded connection?

I just want to know how I can start derby in network server mode and still be able to get an embedded connection? Thank you.
Kojo Nsiah
6
votes
4 answers

How do I retrieve only the ID instead of the Entity of an association?

I have a class that looks something like this: @Entity public class EdgeInnovation { @Id public long id; @ManyToOne public NodeInnovation destination; @ManyToOne public NodeInnovation origin; } and another one that looks…
jørgen k. s.
  • 135
  • 1
  • 2
  • 8
6
votes
2 answers

JavaDB - Checking if a database exists

We created a java application which uses the JavaDB database in Netbeans IDE. We want the program to check every time it starts if the database's tables have already been created, and otherwise create them. How do we do that? thanx
smash
  • 61
  • 1
  • 2
6
votes
3 answers

Apache Derby: Create SQL Dump with data

is there any easy way to create a complete SQL Dump from an apache Derby DB? Using the dblook tool, I managed to dump the database schema to a sql file, however there seems to be no way to get the data included.
Matthias
  • 61
  • 1
  • 1
  • 2
6
votes
2 answers

how can change derby to READ/WRITE mode

I have a Derby database that is giving me a read-only error. The database was working fine, up until last week when disk ran out of space: Caused by: java.io.IOException: No space left on device at java.io.RandomAccessFile.writeBytes0(Native…
Gary
  • 4,495
  • 13
  • 36
  • 49