derby

porting tigase from derby to hsqldb ... how to call stored Java procedure and throw away (ignore) the result?

Trying to configure tigase to use hsqldb (hsqldb-1.8.0.9-1jpp.2) instead of derby (don't ask why, that's not the point) and everything works fine, except for setting some properties in the end. In Derby I had CREATE procedure TigAddUserPlainPw(userId varchar(2049), userPw varchar(255)) PARAMETER STYLE JAVA LANGUAGE JAVA MOD...

hibernate problem

I am new to hibernate , am getting the following error [INFO ][main][2010-07-16 17:36:13] HibernateUtil.java (l.66) : connection url = jdbc:derby:MATOSO_DB;create=true [ERROR][main][2010-07-16 17:36:14] SchemaExport.java (l.274) : schema export uns uccessful java.sql.SQLException: No suitable driver at java.sql.DriverManager.g...

SQL Derby: GROUP BY not selected id

I am using Derby. I have a table with two columns X and Y. I want to select column X but group by column Y. This means I want to show only ONE X value for each row with the first Y value to it. How can I do this? CREATE TABLE test ( x INTEGER NOT NULL , y INTEGER NOT NULL ) INSERT INTO test VALUES (1,1) ,(1,2) ,(1,3) ,(2 ...

Netbeans + derby + hibernate

I'm following http://netbeans.org/kb/docs/java/hibernate-java-se.html tute to setup hibernate with derby in netbeans IDE. Netbeans fails to create hibernate.reveng.xml with error : "Cannot establish database connection with selected Hibernate Configuration file. Please verify the database connection details in hibernate.cfg.xml" My hib...

Which Hibernate compatible database to use for Java Swing application?

I will be implementing a java swing app. At first, I wanted to use apache derby db, because I needed embeded db. But it turned out that it does not plays nice with hibernate (https://forum.hibernate.org/viewtopic.php?f=6&t=1003258&p=2433546#p2433546, http://stackoverflow.com/questions/3322575/netbeans-derby-hibernate). Hiberna...

Invalid Cursor State on every query JDBC, Spring, Derby. Configuration problem?

Hello! I am just getting started with Spring (MVC,Webflow etc etc) and I am trying to write my own small web application. As a database I am using Apache Derby which I set up though the Eclipse Database Developer plug-ins. Now my problem: Everytime I fire queries through the JDBCTemplate I get an "Invalid cursor state" exception at ru...

JPA 2.0 Criteria and grouping of Predicates

I encounter problem with Hibernate EntityManager 3.5.3-Final when it comes to composite predicates. Example (not actual code snippet, but the idea should be clear): CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); Predicate predicate1 = criteriaBuilder.conjunction(); Predicate predicate2 = criteriaBuilder.conjuncti...

Does Derby support table and column comments?

Does Derby support table and column comments? ...

JavaDB - Checking if a database exists

hello, We created a java application which uses the JavaDB database in Netbeans IDE. We want the program to check every time it starts if the database's tables have already been created, and otherwise create them. How do we do that? thanx ...

What's the equivalent for PostgresSQL 'localtimestamp' in JavaDB - Derby?

Is there something simiar? I have this definition create table xyz ( fecha_alta timestamp NOT NULL DEFAULT localtimestamp, .... ) I tried to execute the same in Derby, but it complains with: Error: Syntax error: Encountered "localtimestamp" at line 3, column 41. What's the equivalent? ...

Using Rob Camick's ListTableModel, but JTable doesnt show up

I'm Using Camick's ListTableModel and RowTableModel from here http://tips4java.wordpress.com/2009/03/12/table-from-database/ However, the JTable is not showing up. Does anyone know why? I'm not getting any errors. import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; public class AddressBook { JLabe...

'ALTER TABLE' cannot be performed because table does not exist.

I'm using JPA 2 with Eclipselink 2 and a Derby in memory db for my tests. When I start my little test programm I get the following exception: [EL Warning]: 2010-08-12 17:17:44.943--ServerSession(948252856)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.Database...

How can I get the top x% of values in a database table.

How can I get the top x% of values in a database table. For example, I have a log file that I loaded into a db table. I would like to throw out the longest running 1% of requests as they skew the data. Any simple way to do this? BTW I am using derby database. Thanks ...

Derby database don't save entity after application running

I'm using Embedded Derby DB with hibernate. I'm saving some entities to database. After shutting down the application there is no entities in DB. Why it could be so? Below my Hibernate configuration <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "h...

How table creates in MyEclipse Derby

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

Derby INSERT SELECT null pointer exception

I'm writing a Java application that's working with Apache Derby via JDBC. I'm having problems with the code in the following snippet: byte md5[] = md5sum(file); PreparedStatement s = con.prepareStatement("INSERT INTO input_files (job_ID, hash) SELECT job_id, ? FROM job WHERE job_name = ?"); s.setBytes(1, md5); s.setString(2, jobName); ...

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 want I need. The only problem is that JavaDB is not started by default when GlassFish starts. I would have to go to the command line and enter: asadmin start-database Is there away to make the datab...

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:...

Maven and the " is not a known entity type" error

Hi everybody, I generated a maven project with the quickstart archetype. So I obtained the following project structure: |-- src | |-- main | | |-- java | | |-- resources | |-- test | | |-- java | | |-- resources |-- pom.xml I modified the "pom.xml" file : <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:...

Sql select query help

Hi all, I have a database table with data as shown below: Primary key | Column1 | Column2 | col3 | col4 |col5 --------------------------------------------------------------------- 1 | Chicago Bulls | Michael Jordan | 6'6 | aaaa | cccc 2 | Chicago Bulls | Scottie Pippen | 6'8 | zzzz | ...