apache-derby

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? Thanks in advanced. ...

Apache Derby - Check Database Already Created?

Hey, 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? Cheers, Pete ...

Getting rid of derby.log

I'm using the Apache Derby embedded database for unit testing in a Maven project. Unfortunately whenever I run the test I end up with the derby.log file in the root of the project. The database itself is created in the target directory (jdbc:derby:target/unittest-db;create=true) so that is not a problem. After consulting the reference gu...

Can an embedded Derby database be accessed for analysis from a program like MS Access/ExcelP

Hello 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? ...

derby.log (etc) control in a webapp

Derby has a series of configuration options that are controlled by system properties. It's quite painful to arrange system property settings in a webapp. Has anyone come up with a solution? In addition, I have been unable to make them work in a webapp. Here is the code of a servlet context listener. derby.log is still created in the cw...

Can Derby / JavaDB _really_ encrypt with Triple DES rather than (plain) DES?

It seems to be confusing Triple-DES (>128bit) with plain DES (64bit). I'm trying to encrypt a Derby database with Triple DES (or DESede) using Java 1.5 I found this discussion forum message about a problem with JDK 1.5 by chance and so checked to make sure that it really was using DESede and not plain DES. When I created the database wi...

constraint problems using apache derby and hbm2ddl

We are using Apache Derby 10.5.3.0_1 and hbm2ddl with Hibernate 3.3.x I get the following constraints error while pre-loading the SQL on an embedded derby database. If I remove the primary key(id) from the create table sql, it's able to create the table. Not sure what the problem is over here. create table user_flow (id integer not nul...

How to shutdown Derby In Memory Database Properly

I'm using derby as an embedded database. Furthermore, I'm using it's in memory database option for my unit tests. What I can't figure out is how to properly shut down (A quick look at the code) the derby database. I beleive I have it working for a standard database but I'm getting different exceptions when attempt similar code on a in-...

How to alter a column datatype for derby database?

Hi, I am trying to alter a datatype for a derby db column. The current price column is set as DECIMAL(5,0). I would like to alter it to DECIMAL(7,2). I did this : alter table item alter column price set data type DECIMAL(7,2); But it did not work, and showing the error: Error: Only columns of type VARCHAR may have their length alte...

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 same time you update row B table B and...

SQL aggregate query question

Hi, Can anyone help me with a SQL query in Apache Derby SQL to get a "simple" count. Given a table ABC that looks like this... id a b c 1 1 1 1 2 1 1 2 3 2 1 3 4 2 1 1 ** 5 2 1 2 ** ** 6 2 2 1 ** 7 3 1 2 8 3 1 3 9 3 1 1 How can I w...

apache derby database

i am building a swing application with apache derby database as back end in netbeans 6.8 with my friend.He is making the databse in derby while i am making the front end i.e. frames. now how do i use database created by him in my project in netbeans 6.8 my motive is to how we insert a already build databse(from my friend's netbeans) i...

Apache Derby: Create SQL Dump with data

Hello, 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. ...

Apache Derby Embedded Mode Deployment

I have a Java app that has an embedded Derby database (no hibernate though). The app is using the following properties: datasource.driverClassName = org.apache.derby.jdbc.EmbeddedDriver datasource.url = jdbc:derby:C:/derby/mydb; datasource.username = 1234 datasource.password = 1234 Everything is working fine and great. Now I need to p...

How table creates in MyEclipse Derby

where i can make the table when making sample program of Hibernate with MyEclipse Derby ...

org.apache.derby.client.am.SqlException

i am facing these exception: 1515 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: -1, SQLState: XJ040 1515 [main] ERROR org.hibernate.util.JDBCExceptionReporter - DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'myeclipse', see the next exception for details. java.sql.SQLException:...

How do I refer to another property in a jnlp?

<property name="netbeans.user" value="${user.home}/.foo"/> <property name="derby.system.home" value="netbeans.user"> I want derby.system.home property to be the same as the above one. How do I achieve that other than by expliciting the same CDATA (so by value)? I guess what I'm asking is: how can I let the value of an element ...

Is it possible to install apache derby eclipse plugin in myeclipse?

Ive got myeclipse ide, and want to install the ui plugin for derby so I can access ij from inside eclipse. The problem is when I drop the ui plugin components into the plugins folder the plugins dont seem to load. Is there anything whacky I need to do to tell myeclipse to load these plugins? I am following http://db.apache.org/derby/in...

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 have such a table. What is an alternative to mysql query: SELECT SCHEMA_NAME FROM INFORM...

How can I detect what version of JavaDB/Derby I'm using?

I use JavaDB (Derby) as an embedded database in my Java Swing application. I would like to detect and print the version of JavaDB I'm using. I have included derby.jar in my .jar-file for the application. How can I detect and print the version of my embedded JavaDB? ...