derby

java derby restoreFrom does nothing

送分小仙女□ 提交于 2019-12-11 03:05:41
问题 I'm new to this forum (first post) but I used to surf on it a lot of times to find tricks and some useful examples and solutions on my problems. Before posting I have search all over the web about the "restoreFrom" derby database command and I read the derby administrator, the reference guide too. I succesfully use in my program the creation, backup and check intergrity derby procedures, connect, disconnect server and database etc... but no way to restore something with built-in procedure !!!

Turn off referential integrity in Derby? is it possible?

半城伤御伤魂 提交于 2019-12-11 02:07:41
问题 Is there a setting in derby, for example an sql query ala "SET DATABASE REFERENTIAL INTEGRITY FALSE" where i can turn on and off referential integrity? 回答1: According to this post on the mailing list (from 2006) it is not possible: http://www.mail-archive.com/derby-user@db.apache.org/msg05345.html I couldn't find anything in the manual either. And the list of jdbc parameters has nothing, too. 回答2: If you have a constraint that you don't wish to enforce, you can use DROP CONSTRAINT to drop it.

Does copy pasting Apache derby db files into another system make it work fine

一笑奈何 提交于 2019-12-11 01:54:13
问题 I have developed an application with derby db. I have created DB in my system. I need to deliver the application along with the db. I have deleted all the data from tables. Only the tables(structure with empty data) are remaining. So If I copy the db files (log,seg0,tmp,db.lck,service.properties all these in a single folder) to another system, will it work fine..? 回答1: Yes, it will work fine, although for the cleanest flow you should ensure that no application is accessing the database at the

fail to create embedded derby java

北战南征 提交于 2019-12-11 01:26:56
问题 I created a embedded derby in JDBC mode but when I try to access it in java class it gives me error: java.sql.SQLException: Failed to create database 'myDB', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source) at

Where is the derby.jar file within my Java 11 installation on Mac?

故事扮演 提交于 2019-12-11 01:08:43
问题 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/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home drwxr-xr-x 10 root wheel 320B 6 Okt 14:29 . drwxr-xr-x 5 root wheel 160B 6 Okt 14:29 .. -r--r--r-- 1 root wheel 160B 6 Okt 14:29 README.html drwxr-xr-x 34 root

How to Get Primary Key and Unique Constraint Columns in Derby

若如初见. 提交于 2019-12-11 00:28:29
问题 How does one do this? The SYSCOLUMNS system table only has columns for tables. SYSCHECKS has a REFERENCEDCOLUMNS object. Is there any way to get this. I'm aware of the JDBC getPrimaryKeys call, but that doesn't get unique constraint columns. 回答1: Derby - constraints It took some digging to find the above question; my question is a partially answered follow-up question to the one above. Taking the CONSTRAINTID against SYSKEYS gives a CONGLOMERATEID, which when taken against SYSCONGLOMERATES

Embedded Glassfish JPA Datasource connection fail

丶灬走出姿态 提交于 2019-12-11 00:01:23
问题 I develop some unit tests with trying to connect to the Derby internal database but get the following: WARNING: Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'SEQUENCE' does not exist. Error Code: 20000 Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ? bind => [2 parameters bound] Query:

Getting derby database connection from Java (in eclipse)

*爱你&永不变心* 提交于 2019-12-10 23:37:17
问题 I was following the following instructions: http://www.eclipse.org/articles/article.php?file=Article-EclipseDbWebapps/index.html in order to set-up a derby database server and everything works fine. I created the DB and could easily access it. however, these instructions use JSP to access my DB and I wand to change it so that I can access the DB through my custom Java classes but I cant create any connections to the DB. I simply tried: Connection con = DriverManager.getConnection ("jdbc:derby

Spring boot Embedded Derby not working in the latest version.

冷暖自知 提交于 2019-12-10 22:52:02
问题 I have used Embedded derby earlier in my spring boot projects. But now when i created the project through Spring Initializr with the derby dependency. I get the below error : Schema 'SA' does not exist followed by org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement When i tried running the earlier project that i had created, the Derby is working just fine. PFB the console for the earlier project : 2018-03-18 15:34:44.346 INFO 16560 --- [

Hibernate 4.0.1 to 4.3.5: Unable to make JDBC Connection

…衆ロ難τιáo~ 提交于 2019-12-10 22:48:14
问题 I have a project that uses Hibernate 4.0.1 to interact with a derby database. That works fine. Here is a sample program that simply connects to the database and doesn't do anything: import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class DbTestMain { public static void main(String... args){ Configuration derbyConfiguration = new Configuration().configure("hibernate-derby.cfg.xml"); SessionFactory derbySF = derbyConfiguration