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
9
votes
1 answer

How to use in-memory Derby database for testing with Hive (Scala)

I'm using spark-hive 2.3.0 with Scala 2.11 and setting up a unit test framework. spark-hive comes with TestHiveContext and TestHiveSparkSession which conveniently allow invoking Hive from unit tests without having Hadoop, Spark, or a cluster…
Uncle Long Hair
  • 2,719
  • 3
  • 23
  • 33
9
votes
2 answers

Do I have to set both sides for a bidirectional relationship?

@Entity public class A { @GeneratedValue @Id private long id; public long getId() { return id; } public void setId(final long id) { this.id = id; } @OneToMany(mappedBy = "a") List bs; …
kerner1000
  • 3,382
  • 1
  • 37
  • 57
9
votes
5 answers

SBT test does not work for spark test

I have a simple spark function to test DF windowing: import org.apache.spark.sql.{DataFrame, SparkSession} object ScratchPad { def main(args: Array[String]): Unit = { val spark =…
user1113782
  • 177
  • 1
  • 8
9
votes
2 answers

How to get Apache Derby and Hibernate to print english exception messages in a Java EE application?

I'm running a Java EE application which uses Hibernate 5.2.10.Final with an Apache Derby storage backend on Payara 4.1.1.172. I'm seeing error messages like Caused by: java.sql.SQLDataException: A truncation error was encountered trying to shrink…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
9
votes
1 answer

Hibernate5 HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections

I have not actually written any code yet and I'm just trying to run mvn hibernate5-ddl:gen-ddl to convert an existing class to DDL. What could cause the warning ConnectionProviderInitiator - HHH000181: No appropriate connection provider encountered,…
Alex R
  • 11,364
  • 15
  • 100
  • 180
9
votes
3 answers

Resultset not open. Verify Autocommit is OFF. Apache Debry

I am using apache derby for my database. I am able to perform inserts into the database. The following is the excerpt from the code that attempts to display the contents of my only table 'MAINTAB'. The instance of java.sql.Connection is 'dbconn'. …
Sundeep
  • 1,536
  • 5
  • 23
  • 35
9
votes
0 answers

Apache Derby startup error java.lang.SecurityException: sealing violation: package org.apache.derby.impl.services.timer is sealed

I am using Ubuntu 14.04 and have installed Derby 10.12.1.1. I have followed installation instructions from Apache website. My CLASSPATH has been set…
Maz
  • 193
  • 2
  • 10
9
votes
4 answers

Derby: Another instance of Derby may have already booted the database

I would like to use Derby in a Network Server Mode and followed the instructions on their website. Starting derby: /opt/glassfish/4.0/javadb/bin/NetworkServerControl start -noSecurityManager Sun Apr 13 23:47:57 CEST 2014 : Apache Derby Network…
user3111560
9
votes
1 answer

Java standalone app with JPA + Hibernate (or similar) and Apache Derby embedded DB

I want to create a Java standalone Java application that will use the Apache Derby Embedded DB. I want to use JPA since I'm quite familiar with it and probably over Hibernate ( but others are welcome if it is to get easier). Is there any example…
Panos
  • 7,227
  • 13
  • 60
  • 95
8
votes
1 answer

Apache Derby INSERTS are slow

I am using Apache Derby to store a large number of rows in the order of 10s of Millions. Each time I initiate a batch insert, I will be inserting upto 2 Millions more rows into the table. The table has a UUID as its primary key and a single…
Andy Tudor
  • 81
  • 1
  • 2
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
3 answers

Apache Derby - Check Database Already Created?

Using Apache Derby with Java (J2ME, but I don't think that makes a difference) is there any way of checking if a database already exists and contains a table?
Peter
8
votes
2 answers

Apache Derby gives strange names to indices I created with meaningful names

I'm creating a simple demo table in derby using this ddl: CREATE TABLE MY_TABLE ( SESSION_ID CHAR(36), ATTRIBUTE_NAME VARCHAR(200), CONSTRAINT MY_TABLE_PK PRIMARY KEY (SESSION_ID, ATTRIBUTE_NAME), ); CREATE INDEX MY_TABLE_IX1 ON MY_TABLE…
danf
  • 2,629
  • 21
  • 28
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
3 answers

Derby gives ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver while using Maven

I have seen following topics, but they doesn't post solution to my question: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver JDBC Derby driver not found SQLException: No suitable driver found for…