Questions tagged [javadb]

Java DB is Sun's supported distribution of the open source Apache Derby 100% Java technology database. It is fully transactional, secure, easy-to-use, standards-based SQL, JDBC API, and Java EE yet small, only 2.6 MB.

Java DB is Oracle's supported distribution of the Apache Derby open source database. It is fully transactional, secure, easy-to-use, standards-based SQL, JDBC API, and Java EE yet small, only 2.6 MB.

380 questions
31
votes
7 answers

Create autoincrement key in Java DB using NetBeans IDE

I'm coming from MySQL world, please help. Is it possible to create autoincrement key from NetBeans IDE in JavaDB? Do you use some more advanced db clients, which? Thanks.
umpirsky
  • 9,902
  • 13
  • 71
  • 96
28
votes
5 answers

Setting up an embedded Derby database in a standalone Java application

I'm trying to setup an embedded Derby database for a standalone Java application, but after pouring through all sorts of documentation, I just can't seem to find any simple explanations or examples. I'm using Eclipse with the Derby plugin and have…
Clark Minor
  • 281
  • 1
  • 3
  • 5
16
votes
1 answer

Derby: CONCAT equivalent

Good day! What is the equivalent function of Derby/Java DB to the CONCAT function of MySQL? I tried using CONCAT to Derby but it commits an error.
Ace Eusebio
  • 403
  • 1
  • 7
  • 17
15
votes
2 answers

Derby/JavaDB vs SQLiteJDBC

I found a lot of comparisions here, but not this one; So, what is best in each one?
The Student
  • 27,520
  • 68
  • 161
  • 264
13
votes
4 answers

Automatically start JavaDB (Derby) on GlassFish

I am planning to deploy GlassFish v3 open source edition to a production environment. It comes with JavaDB (Apache Derby) which is just what I need. The only problem is that JavaDB is not started by default when GlassFish starts. I would have to…
del.ave
  • 1,888
  • 5
  • 17
  • 23
12
votes
3 answers

Retrieve id of record just inserted into a Java DB (Derby) database

I am connecting to a Java DB database with JDBC and want to retrieve the id (which is on auto increment) of the last record inserted. I see this is a common question, but I see solutions using for example MS SQL Server, what is the equivalent for…
Kryptic
  • 1,922
  • 2
  • 21
  • 29
9
votes
2 answers

In-memory Java DB

Are there any DBs for Java that can be run in an embedded mode with some tables being stored in-memory while loading others from disk? H2 and JavaDB seem to be the two leaders for Java DBs and I know they both have an in-memory mode, but do they…
Ben McCann
  • 18,548
  • 25
  • 83
  • 101
9
votes
1 answer

Class [org.apache.derby.jdbc.ClientDriver] not found. When trying to connect to db

I have set up a project in Netbeans, created a script, made a new database with javadb. I can connect to it by gui - display the tables contents etc, but when i run an application with: EntityManager em =…
Bartlomiej Lewandowski
  • 10,771
  • 14
  • 44
  • 75
8
votes
3 answers

calling derby (java db) 'show tables' from jdbc

I need to enumerate the tables in a Derby (aka Java DB) database using JDBC in a Java program. All I am aware of for doing this is the SHOW TABLES command. I first tried with something similar to this... String strConnectionURL =…
John Fitzpatrick
  • 4,207
  • 7
  • 48
  • 71
8
votes
4 answers

Is Derby/Java DB included in Java 6?

I've read in a couple of places that Derby/Java DB is included in Java SE 6, e.g. http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/beta2.html but I can't find anyone who has used it without installing it, including it on the…
Whatsit
  • 10,227
  • 11
  • 42
  • 41
8
votes
5 answers

How can I identify columns when SELECTing from multiple tables with JDBC?

I have two tables that I join on the id-column, they look like: +-------+ | users | +----+--+---+ | id | name | +----+------+ +-------+ | posts | +-------+------+---------+ | id | user_id | message | +----+---------+---------+ And now I want to…
Jonas
  • 121,568
  • 97
  • 310
  • 388
7
votes
1 answer

Programmatically setting derby.system.home

Need to move the database and log files of JavaDB (derby) db files into deployment directories. The database is working in the application startup directory as JavaDB creates a folder with the name of the database (in my case mydb), but I want to…
pn1 dude
  • 4,286
  • 5
  • 30
  • 26
7
votes
2 answers

How should I store an Java Enum in JavaDB?

How should I store an Java Enum in JavaDB? Should I try to map the enums to SMALLINT and keep the values in source code only? The embedded database is only used by a single application. Or should I just store the values as DECIMAL? None of these…
Jonas
  • 121,568
  • 97
  • 310
  • 388
7
votes
3 answers

How to catch java.sql.SQLIntegrityConstraintViolationException?

My application uses JPA+JavaDB and when I try to persist an object that violates a constraint I get SQLIntegrityConstraintViolationException on console. That is OK but I can't catch that exception, why? This is a sample of my code where I would…
ceklock
  • 6,143
  • 10
  • 56
  • 78
6
votes
3 answers

java.sql.SQLException: Schema 'ROOT' does not exist

i am using hibernate with embeded derby, and i want hibernate to create the database and the tables, so i tried the following configuration, but i am getting the error: java.sql.SQLException: Schema 'ROOT' does not exist here/s my configuration: …
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
1
2 3
25 26