derby

user table with javaDB and Hibernate from within grails

let's see if I can ask this in an understandable way... I started with grails and created a domain class called user. As far as I understand, Hibernate is used to map this domain class to the database. This works pretty fine with hsqldb. Now I tried to switch to javaDB and get an error message because the table is called "user" (which ...

Derby/JavaDB vs SQLiteJDBC

I found a lot of comparisions here, but not this one; So, what is best in each one? ...

JavaDB/Derby Error 08006

In the article Using Java DB in Desktop Applications the Address Book demo have a method disconnect which have a try-catch block that catch and ignores the exception. If you add a printStackTrace you can see that the exception always occur. What's wrong here? The JavaDB should not throw this exception, or they should fix something in th...

JavaDB SQL command reduntant?

Correct me if I am wrong, but this SQL command: create table MYTABLE (ID INTEGER NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1)) does not need the NOT NULL part, as a primary key is suppose, by default, to be not null. Isn't this reduntant? (I'm not secure to just test it and agree in the result, pr...

How do I set up derby in eclipse on Ubuntu?

The question basically says it all. I'm trying setup up JavaDB on my virtualbox running Ubuntu 9.10. I have the package downloaded and installed through the package manager, which I believe is the right to go about it. I have also installed the Eclipse's Data Platform Tools. I've been following this tutorial here: http://www.vogella.de/...

what does mean "SQL Error: 30000, SQLState: XSAI3" ?

I'm using javadb/derbydb 10.5.3.0 with hibernate 3.5-Final I get this error at the end of EM initialisation : 4427 [SwingWorker-pool-1-thread-1] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 30000, SQLState: XSAI3 4427 [SwingWorker-pool-1-thread-1] ERROR org.hibernate.util.JDBCExceptionReporter - Feature not implemented. ...

VARCHAR does not work as expected in Apache Derby

I'm having this same problem: How can I truncate a VARCHAR to the table field length AUTOMATICALLY in Derby using SQL? To be specific: CREATE TABLE A ( B VARCHAR(2) ); INSERT INTO A B VALUES ('1234'); would throw a SQLException: A truncation error was encountered trying to shrink VARCHAR '123' to length 2. ...

Use different version of derby.jar then the one included with WebSphere?

I’m trying to use an imbedded Derby database from within a war file deployed on WebSphere for Z/OS. When I use code like the following to create a database I wind up creating a derby version 10.3 database using the derby.jar included with WebSphere server 7.0 instead of the version 10.5 derby.jar I include in my WEB-INF/lib directory. C...

If there is a necessary data base

I have a desktop program which uses an embedded data base mechanism. For the first time a user will execute a program, it must create a database. So that, next time there is a database and there is no need to create it. How do I check if there is database and create it if necessary? ...

Distributing a Derby DB with a Java application

I have a table in a application, which loads in data from a Derby DB with a Client/Server driver. Everything works in NetBeans, even with the NetBeans DB service disconnected, but not when running the standalone distributive app. I have included the derbyclient.jar in the classpath. I have the startNetworkServer.bat in the distributable ...

using ansi sql syntax for formatting Numeric

Hi I am using two different databases for my project, Oracle and Apache Derby, and am trying as much as possible to use the ANSI SQL syntax supported by both of the databases. I have a table with a column amount_paid NUMERIC(26,2). My old code, which was using Oracle db, needed to retrieve value in this format SELECT LTRIM(TO...

derby + hibernate ConstraintViolationException using manytomany relationships

Hi, 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(name="TAGS") public class Tags ...

Automatically create table structure in an membory based derby database (netbeans)

I have a simple program I am working on, right now I am working in netbeans and using the derby database, in memory, and have it set to create the database if it doesn't exist. Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/memory:APP;create=true", "APP", "APP"); My question is... while it creates the datab...

SQL syntax error with Derby and Circumflex ORM

I'm trying to use Circumflex ORM (as suggested on StackOverflow - here, here and here) to connect to a local (embedded) Apache Derby database over JDBC from a Scala project (built with simple build tool). I've followed the instructions carefully, but am having some interesting problems. Here's the driver and URL components of the cx.pro...

Problems with escaping table and field names in Derby and Hsqldb

I'm having a problem with my ORMLite package ( http://ormlite.sourceforge.net/ ). When I generate the schema for a table, I thought it would be a good practice to escape all entity names. This would protect some Java class or field name from being a SQL reserved word: CREATE TABLE "footable" ("stuff" VARCHAR(255)) I'm now adding "ra...

Am I crazy? Switching an established product from HSQLDB to Apache Derby.

I have an established software product that uses HSQLDB as its internal settings database. Customer projects are stored in this database. Over the years, HSQLDB has served us reasonably well, but it has some stability/corruption issues that we've had to code circles around, and even then, we can't seem to protect ourselves from them comp...

Spring disconnecting from Derby

I'm using Apache Derby with the Spring JdbcTemplate inside a web app running on Tomcat. Spring is managing the data source. I've noticed that if I update the .war file and Tomcat undeploys/redeploys the app, I get this error: java.sql.SQLException: Another instance of Derby may have already booted the database /tmp/manager_db/manager....

Best Design for Passing Filter Set into Database Class for SQL use

I'm developing a FlashCard App. Part of this is giving the user the option to filter results on difficulty level and category (more options in the future probably). See the image for a quick mockup of the user screen. The data for the flash cards are stored in a Derby DB in a single table. One column for Level. A column for each catego...

Embedded Derby Db in a Spring app on Tomcat

I'm trying to get an embedded Derby db running on a Tomcat/Spring application. <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" /> <property name="url" value="jdbc:derby:pepper" /> <property name="initialSize" value="5" /> ...

JavaDB ( derby ) path to database?

Using the embedded driver I can connect to my derby database using the JDBC url: jdbc:derby:mydbname But, I usually put the full path for the db like: jdbc:derby:/Users/oreyes/dbs/mydbname Is there a way I can just specify the db name and have something like a "db_path" or something like that? ...