derby

apache derby hangs up executing query

别说谁变了你拦得住时间么 提交于 2019-12-11 07:18:43
问题 i'd really appreciate some help here. I've got this derby database from my customer, and their application based on Hibernate. I can't make it work because Hibernate generates query that hangs up the whole database: select houses0_.STREET_ID as STREET5_1_, houses0_.ID as ID1_, houses0_.ID as ID42_0_, houses0_.NAME as NAME42_0_, houses0_.SHORT_NAME as SHORT3_42_0_, houses0_.INDEX as INDEX42_0_ from SRG.HOUSE_REFERENCE houses0_ where houses0_.STREET_ID in (select streets0_.ID from SRG.STREET

How to export table from Netbeans, Java DB (Derby) Database

北城余情 提交于 2019-12-11 07:03:51
问题 I need to export the structure of some tables so I can easily recreate them on a different database. I tried to use the Grab Structure but this seems to work only if I try to create a new table within Netbeans. Any ideas on how to do this? 回答1: Export a table structure In Netbeans right click a table to export -> Grab Structure Save the file right click a table to recreate -> Recreate Table open the file just created choose Edit table script do a Ctrl-a and Ctrl-c . To mark all and copy to

derby system tables for the column of primary key info

无人久伴 提交于 2019-12-11 06:26:41
问题 I'm trying to retrieve the columns for PK from system tables and looking through the documentation I cannot see how I can get that information. SYS.SYSCONSTRAINTS does not contain column information. I want to know which column belong to for the primary key. I find the tables in sys schema then I can get all the primary key info. The SQL is: select t.tablename, conglomeratename backIdxName, cst.constraintname, cst.type from sys.systables t, sys.sysconstraints cst, sys.sysconglomerates cgl,

User-defined types in Apache Derby as ENUM replacements

半腔热情 提交于 2019-12-11 06:16:58
问题 I'm using Apache Derby as an in-memory mock database for unit testing some code that works with MySQL using jOOQ. The production database uses enums for certain fields (this is a given and out of scope of this question - I know enums are bad but I can't change this part now), so jOOQ generates code to handle the enums. Unfortunately, Derby does not support enums and when I try to create the database in Derby (from jOOQ SQL generator), I get errors. My solution was to user-defined types that

How to convert the time difference to hours(with 2 decimal place) in derby?

有些话、适合烂在心里 提交于 2019-12-11 04:46:41
问题 I am using timestampdiff in derby db to retrieve the time difference between 2 time: startdate, and enddate. e.g. startdate = 2010-02-23 02:59:52.045 enddate = 2010-02-23 03:45:39.898 select {fn timestampdiff(SQL_TSI_HOUR, startdate, enddate)} as diff I would like to know how can I get the time diff in hours, e.g. 0.25, etc? Thank you. 回答1: select {fn timestampdiff(SQL_TSI_MINUTE, startdate, enddate)}/60 as diff and I would call the variables startdatetime and enddatetime. 回答2: Specifically

Why am I getting these errors from Apache Derby?

五迷三道 提交于 2019-12-11 04:46:38
问题 I run my program, the database is connected to and then it gives me two errors. One saying 'Schema "ROOT" does not exist' and another saying 'Lexical error at line 1, column 8. Encountered: "@"(64), after:"". Here is the code from the two SQL statements: private void UpdateJTable() { String sql ="select idhonscores AS RowNo , Name, Characters, Kills, Deaths, Assists, XPM, CK from honscores"; try { st = conn.prepareStatement(sql); rs = st.executeQuery(); table.setModel(DbUtils

InvocationTargetException: javax/persistence/Persistence

不问归期 提交于 2019-12-11 04:29:45
问题 Im trying to follow the example in chapter 2 of the book Beginning Java EE 6 Platform with GlassFish 3. I am using EclipseLink, Derby and Maven from cmd in Windows. I really can't figure this out and would be grateful for some help! This line EntityManagerFactory emf = Persistence.createEntityManagerFactory("chapter02PU"); in my Main.java class generates the following error: [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ---------------------------------

Suitable database for swing application which does not need server dependancy

心已入冬 提交于 2019-12-11 04:07:06
问题 Which database is suitable for swing desktop application from the followings :? SQLite Apache Derby HyperSQL DB I want to store my data locally instead of using web service and store for temporary from the above which is lighten local database ? 回答1: To add to the embedded SQL answer, you can also run the noSQL Neo4J in memory without the need for disk access. If I remember your previous question, you want to actually ship the data inside the jar, correct? Then you need to ship the data as

When and how is the Java DB updated and synced with Apache Derby?

为君一笑 提交于 2019-12-11 03:56:41
问题 Oracle ships the JDK with "JavaDB" which is more or less a rebranded version of Apache Derby. Is Java DB updated and synced continually with each update release of the JDK ("_uXX") or only for major releases like Java 7? 回答1: The Getting Started with Java DB guide addresses this in the note on the relationship between the two products: Relationship between Java DB and Apache Derby Java DB is a relational database management system that is based on the Java programming language and SQL. Java

Protocol issue connecting Derby by db2 ODBC

被刻印的时光 ゝ 提交于 2019-12-11 03:51:01
问题 This is a problem when I tried to connect Derby Database by DB2 ODBC I started the Derby Network Server and created a database named "mydb" but,after I did as the steps described in an article on IBM's site,I countered a problem on the server side. Step 1->db2 catalog tcpip node MYDERBY remote localhost server 1527 Step 2->db2 catalog db mydb at node MYDERBY authentication server Step 3->db2 connect to mydb user abc using abc Problem: Execution failed because of a Distributed Protocol error