Questions tagged [derby]
1010 questions
1
votes
1
answer
118
Views
Where is the derby.jar file within my Java 11 installation on Mac?
I just read here, that the Java DB (respectively Derby) is shipped with the JDK.
Where is the derby.jar within the Java installation on my Mac?
The terminal command
/usr/libexec/java_home
prints
/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
and
ls -halt /Library/Java/JavaVirtualMach...
1
votes
2
answer
40
Views
Is it possible to insert row into the child table of FOREIGN KEY?
I have three tables in my database:
COMPANY(ID, NAME)
COUPON(ID, TITLE)
COMPANY_COUPON(COMPANY_ID, COUPON_ID)
Company can create coupons, so when it creates coupon, coupon's ID and ID of the company will be added into COMPANY_COUPON table. When company deletes coupon it also will be deleted fr...
1
votes
1
answer
306
Views
How to resolve NoClassDefFoundError for AutoloadedDriver40? [duplicate]
This question already has an answer here:
Why am I getting a NoClassDefFoundError in Java?
21 answers
I am new to Hadoop and Hive as well. I am trying to connect to Hive from Java by creating Java project and by adding all below required libraries
$HIVE_HOME/lib/*.jar
$HADOOP_HOME/share/hadoop/mapr...
1
votes
0
answer
88
Views
Run ScadaLTS with derby
Is it possible to run ScadaLTS with derby instead mysql?
I tried to change to env.properties file but Scada doesn't srtart.
Thanks.
1
votes
1
answer
117
Views
loading the right dependencies for sbt console in multi project setup causing derby security exception
I have a SBT multi project setup outlined https://github.com/geoHeil/sf-sbt-multiproject-dependency-problem and want to be able to execute sbt console in the root project.
When executing:
import org.apache.spark.sql.SparkSession
val spark = SparkSession.builder().master('local[*]').enableHiveSupport...
1
votes
0
answer
26
Views
How to improve Derby database insert time?
I have a table with schema and indexes as follows:
create table stop_times
(
stop_times_id integer primary key generated by default as identity (start with 1, increment by 1),
feed_id integer not null,
trip_id varchar(256) not null,
arrival_time char(8) not null,
departure_time char(8) not null,
sto...
1
votes
0
answer
21
Views
Spring mvc: eclipse link: An attempt was made to get a data value of type 'VARBINARY' from a data value of type 'DATE'
I'm trying to store, amongst other things, launches in a Derby DB.
A launch has a date and whenever I try to insert a launch in the database I get this error
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.persistence.RollbackException: Exce...
1
votes
0
answer
22
Views
Freezing or Using Derby backup procedures For Backup
Taking derby backup without shutting down the database can be done in two ways :
1. Freezing the database using SYSCS_UTIL.SYSCS_FREEZE_DATABASE() , making copy derby directory structure using OS commands and then unfreezing the derby database.
Using derby backup procedures.
SYSCS_UTIL.SYSCS_BACKUP_...
1
votes
0
answer
386
Views
Artifactory issue (maybe Derby related)
A few days back I noticed that my artifactory instance was not running anymore. Now I am not able to start it again. In the localhost logs in /opt/jfrog/artifactory/tomcat/logs I found a long stack trace, but I am not sure whether that is the actual problem because It seems to appear already at a ti...
1
votes
1
answer
27
Views
Trigger only when updated column has a different value
I have a table, PERSON, that has a column LAST_VISIT (among others). I'm trying to create a trigger so that when PERSON is updated and only if LAST_VISIT is changed from the previous value, I insert a row into a different table. Is this possible? What I've tried:
CREATE TRIGGER on_last_visit_changed...
1
votes
1
answer
263
Views
NetBeans Create Database connection refused
Thu Aug 16 15:55:47 CDT 2018 : Apache Derby Network Server - 10.11.1.2 - (1629631) started and ready to accept connections on port 1888
Good! That's where I want it. I have it on port 1888 because port 1527 is already in use.
The problem is that NetBeans IDE 8.2 doesn't make obvious how to select po...
1
votes
0
answer
398
Views
Visual Studio Code JDBC Acess to Derby Database
I am trying to run a java program (demo program included in the Apache Derby installation folder called SimpleApp) that connects to a Derby database using JDBC, in Visual Studio Code (with an integrated terminal), but I keep getting the same error message:
>java SimpleApp
SimpleApp starting in embed...
1
votes
0
answer
9
Views
select is truncating column names in ij
the derby doc's say:
To start ij with a maximumDisplayWidth of 1000:
java -Dij.maximumDisplayWidth=1000 -jar derbyrun.jar
I tried the following:
java -Dij.maximumDisplayWidth=1000 -jar 'C:\Program Files (x86)\BlueJ\Derby\db-derby-10.14.2.0-bin\lib\derbyrun.jar'
and got:
Usage:
java -jar derbyrun.jar...
1
votes
0
answer
125
Views
Cannot establish database connection with selected Hibernate Configuration file. Please verify the database connection details in hibernate.cfg.xml
My hibernate.cfg is as follow
org.apache.derby.jdbc.EmbeddedDriver
jdbc:derby:/home/swapnil/.netbeans-derby/cpos
cpos
cpos
org.hibernate.dialect.DerbyDialect
What else I'm missing?
I'm using Derby Embedded.
With class file I can establish and access database but it does not working with Hibernate...
1
votes
0
answer
39
Views
How to Get Tablename, constraints, foreign key and references from derby database with java?
So I have an open source piece of software written with java and the database is using Derby and it is written using hibernate.
The problem is when you go to build the latest build, there is no upgrade or migrate function to use your existing data from your current derby database into the new one.
S...
1
votes
1
answer
62
Views
Java derby embedded DB error: The syntax of the string representation of a date/time value is incorrect
I have the following problem using derby embedded DB in my application:
I changed a program that works with Mysql data base to use a Derby embedded data base because the client want it like this due to internet problems, everything works fine, but when i want to make a search using a range of dates...
1
votes
1
answer
32
Views
How to loop a prepared statement to a derby database from spreadsheet line items
Is there a way to enter recurring data into a set database fields while using the prepared statement (pst)? I’m using the Derby DB.
I have an Excel spreadsheet that I get data from. Each line has 5 entry fields: Line item description, cost, quantity, extended cost, and price. I want to enter that...
1
votes
0
answer
28
Views
Why can't I change column properties of derby db using dbeaver?
I am trying to customize the Floreant POS to meet local regulations.
I need to change the check numeration and make it start at 0200000001.
I found the ID column in the TICKET table, and in the properties it says that it starts from 0.
I tried changing it using dbeaver but there is no option to mod...
1
votes
1
answer
16
Views
Describe table to get the primary key for a table in Apache Derby
I am using Apache Derby 10.14.2. I need to know the primary key for a table. When I perform the Describe for the table, I only got the following instruction.
derby system tables for the column of primary key info do not have an answer.
ij> create table id ( id int primary key, name varchar(10));
i...
1
votes
0
answer
22
Views
Strange behavior with jComboBox
We have build a project with Netbeans 8.2 in java for a School project and we have created a form where it has a JcomboBox that it's populated from a derby database.
The application on it's first run downloads a movie list from an web api in json and stores it in derby together with movie genres. Th...
1
votes
0
answer
24
Views
Unable to start Hive with derby on Windows 10
I am trying to configure Hive on top of Hadoop-2.7.3 in Windows 10. My Hadoop is running perfectly. But I'm facing the following error when I start the Hive on command line:
Not a valid JAR:
E:\hadoop-2.7.3\hive\bin\org.apache.hive.beeline.cli.HiveCli
Whenever I type hive on the cmd after going to t...
1
votes
0
answer
40
Views
Insert data to Java DB fails with error because column of type integer cannot accept character data
im trying to set Dtat in my embedded Java DB and i dont know where my fault is. I tried so many things types of code to insert the data but nothing works ? With mysql it works but this is the first embedded db im working with
try {
int rows = jTableA.getRowCount();
Class.forName('org.apache.derby.j...
1
votes
1
answer
37
Views
Cannot connect with a backup of a derby database using Netbeans or ij
I back up regularly a derby database, that is on another server, simply by copying the location of the Derby database. So I have many backups depending on the date.
Now I am trying to connect to one of those backups from my computer, after installing Netbeans and Java 1.6 (becuase the app runs on th...
1
votes
0
answer
9
Views
How does Apache Derby deal with empty list in WHERE IN () clause
Hi this sql statement excutes as expected
select * from table where id in(1,2,3);
But there is posibility of IN() clause to be empty like below
select * from table where id in();
Apache Derby complains with
syntax error : encountered ')' at line n
Mysql knows how to deal with such a situation and...
1
votes
1
answer
1.7k
Views
Java Adding Image to BLOB datafield
For this university assignment that I have been assigned.
I have to develop an application for use on a PDA which is running J2ME and Apache Derby in embedded mode.
I would like to both import/export an image to the database. How would I do this? Also would storing the image as a blob be suitable?
1
votes
1
answer
226
Views
SQL query to insert the available slots into a table (avail) from booked slots table
I want a sql query to insert the available slots into a table (avail) from booked slots table.
I have two tables .I have a book table with bookstarttime and bookendtime columns .these are timestamp objects.I have another table with availstarttime and availendtime.these are also timestamp columns.I h...
1
votes
1
answer
362
Views
delete derby tables when program ends
I'm using in-memory derby db for my java application. I would like to delete all the tables/databases it created once the application ends. So when it starts back up, I want it to start fresh.
1
votes
1
answer
1.2k
Views
Can an embedded Derby database be accessed for analysis from a program like MS Access/ExcelP
I would like to access data stored in an embedded Derby database by my Java application from a program like MS Access/Excel, Open Office, etc?
Is there a way of doing this? I guess the only way this could be achieved is if Apache Derby came with an ODBC driver right?
1
votes
1
answer
197
Views
Can a java application manage triggers and UDFs in Derby database?
Can we manage UDFs, and triggers in Derby database from our own Java Application ?
By managing I mean :
checking if it exists;
adding;
removing.
1
votes
1
answer
1.8k
Views
How to create a database deadlock using jdbc and JUNIT
I am trying to create a database deadlock and I am using JUnit. I have two concurrent tests running which are both updating the same row in a table over and over again in a loop.
My idea is that you update say row A in Table A and then row B in Table B over and over again in one test. Then at the...
1
votes
1
answer
1.7k
Views
derby + hibernate ConstraintViolationException using manytomany relationships
I'm new to Hibernate+Derby... I've seen this issue mentioned throughout the google, but have not seen a proper resolution.
This following code works fine with mysql, but when I try this on derby i get exceptions:
( each Tag has two sets of files and vise-versa - manytomany)
Tags.java
@Entity
@Table(...
1
votes
2
answer
4.4k
Views
MySQL dump .sql script and import to an apache derby
So presumably mysqldump can export to ansi compatible format so that you can import to other vendors' databases.
However trying to import to an apache derby I face all this syntax errors.
Thought I try some regex and fix things but it seems that there are more than a couple.
Is there something I'm m...
1
votes
2
answer
1.9k
Views
Why does using a prepared statement fail with nulls and succed with GStrings?
The problem in a nutshell:
This is what happens when trying to insert a row with a few null columns using a prepared statement and groovy.sql.Sql:
groovy:000> val
===> [123123123, 2, null, 0, 0, , null, , 1213020112511801, 1283425009158952, 1, 2, null, 0, 0, , null, , 1213020112511801, 1283425009158...
1
votes
4
answer
111
Views
Could you rewrite this for me? Left join a table and a subquery
CREATE TABLE TR(STUDENT_ID int, SUBJECT_ID int, grade int);
INSERT INTO tr SELECT * FROM results where results.STUDENT_ID=3;
SELECT * FROM subjects LEFT JOIN tr ON subjects.SUBJECT_ID=tr.SUBJECT_ID;
DROP TABLE TR;
Is it possible to rewrite the above as one query? I've searched all over the net and s...
1
votes
2
answer
2.5k
Views
How to run sql scripts in order to update a Derby schema from java code?
The derby database installations of our customer sides have different schema versions. E.g. Customer1 has db schema version 4.1.5.0240, Customer2 has version 4.0.1.0330.
The idea is to update theses schemas to actual version when a new software is installed. There exists several sql scripts in order...
1
votes
1
answer
1.6k
Views
SQL Query in Apache Derby
I'm working on a side project with a Apache Derby database and I'm having trouble with a query. I have the following two tables:
create table Employee(
ID VARCHAR(7) not null,
lname VARCHAR(30) NOT NULL,
fname VARCHAR(30) NOT NULL,
avgPieces int,
PRIMARY KEY(ID));
create table Record(
emp_id VARC...
1
votes
2
answer
623
Views
Derby server connection already exist
In my application I need to check whether the Derby server is already running, and if not start the server. Can anybody tell me how to check that?
1
votes
2
answer
8.2k
Views
Connecting to an Apache Derby/JavaDB database using Oracle SQL Developer [duplicate]
This question already has an answer here:
How to use SQLDeveloper to connect to embedded Derby database
3 answers
I've been trying to connect to an Apache Derby/JavaDB embedded database using Oracle SQL Developer but without much success.
I've tried to create a new connection using the following JD...
1
votes
2
answer
3.6k
Views
How to access a java Derby database? I could really do with a few helpful pointers
I am new to using Derby and databses in eclipse, and I have become a tad lost and in need to a bit of help. I have established a database connection, created a new database, and a new schema, within which I have some tables containing some test data. I don't have any problem with the sql queries to...
1
votes
1
answer
864
Views
JDO cannot map java.lang.Boolean for Apache Derby
This is my first time to use Eclipse and JDO. I have a problem when using Schema Tool in Eclipse to generate DDL.
One of the fields in a Java class looks like following:
@Persistent
@Column(name = 'Enabled', jdbcType = 'BOOLEAN')
private boolean enabled = true;
I have enhanced the class with Enhance...