derby

“SecurityException: sealing violation” when starting Derby connection

大兔子大兔子 提交于 2019-11-27 15:37:41
问题 I need do start the derby server from my java application using " org.apache.derby.drda.NetworkServerControl " class. When I try to start the server it throws an exception. Code: NetworkServerControl server = null; server=new NetworkServerControl(InetAddress.getLocalHost(),1527,"user","123") server.start(new PrintWriter(System.out)); Error: Caused by: java.lang.SecurityException: sealing violation: package org.apache.derby.impl.store.raw.xact is sealed Can anybody tell me the reason for this

@GeneratedValue(strategy = GenerationType.AUTO) not working as thought

戏子无情 提交于 2019-11-27 13:43:22
问题 I'm trying to persist an object to a database. Keep getting 'Column ID cannot accept null value error'. My object looks like this: @Entity public class TestTable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id = 0; @Column(nullable=false, length=256) private String data = ""; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getData() { return data; } public void setData(String data) { this.data = data; } } My persist

Java standalone app with JPA + Hibernate (or similar) and Apache Derby embedded DB

和自甴很熟 提交于 2019-11-27 11:00:23
问题 I want to create a Java standalone Java application that will use the Apache Derby Embedded DB. I want to use JPA since I'm quite familiar with it and probably over Hibernate ( but others are welcome if it is to get easier). Is there any example that uses JPA over Hibernate over a Derby embedded db? I was searching around but I can't find any useful example code. I would like something like a tutorial that will tell which libs I need to add in my classpath, which are the essential files and

Hive installation issues: Hive metastore database is not initialized

折月煮酒 提交于 2019-11-27 10:37:01
I tried to install hive on a raspberry pi 2. I installed Hive by uncompress zipped Hive package and configure $HADOOP_HOME and $HIVE_HOME manually under hduser user-group I created. When running hive, I got the following error message: hive ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to

ResultSet is not updatable [duplicate]

坚强是说给别人听的谎言 提交于 2019-11-27 08:33:02
问题 This question already has an answer here: updateLong not allowed in ResultSet 3 answers I have read all of the "updatable" post on stackoverflow (and elsewhere on the web) but to no avail. My code was working fine then it stopped say the resultset was not updatable. This is across the 4 data files I use in the JDBC derby database. The files all have keys. I don't know where else to look. I wrote the test code below to demonstrate the problem. private void jButton1MouseClicked(java.awt.event

Sequence's current value advances to next 100 upon reconnection in derby

最后都变了- 提交于 2019-11-27 08:22:33
问题 I am having an issue with derby sequences with embedded database. When I first connect to the data base it gives me the correct sequence next value with the following statement. VALUES (NEXT VALUE FOR :seqNm) But when restart my desktop application, there by reconnecting to the database, the next value gives me the next hundredth value. It seems like derby uses some caching for preallocating the sequence numbers. e.g. if my sequence starts with 100, First connection to the data base gives me

Setting up an embedded Derby database in a standalone Java application

我的未来我决定 提交于 2019-11-27 05:42:27
问题 I'm trying to setup an embedded Derby database for a standalone Java application, but after pouring through all sorts of documentation, I just can't seem to find any simple explanations or examples. I'm using Eclipse with the Derby plugin and have enabled Derby nature for my project. I found an example of using an embedded Derby database in a standalone address book as well as an overview of using Derby in Eclipse (that doesn't seem to cover the embedded deployment), but I still feel like I'm

querying embedded database in netbeans using derby

折月煮酒 提交于 2019-11-27 05:31:09
I have created an embedded database using netbeans and added data to it. so now i want to query the database, the code runs smoothly but doesn't display data. Here is my code: import java.sql.*; public class EmbeddedDB { public static void main(String[] args) { Connection con = null; Statement st = null; ResultSet rs = null; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); con = DriverManager.getConnection("jdbc:derby:CustDB;create=true", "app", "app"); System.out.println("connected"); st = con.createStatement(); System.out.println("statement created"); rs = st.executeQuery("select

how to create table if it doesn't exist using Derby Db

两盒软妹~` 提交于 2019-11-27 05:14:24
I am new to apache derby and I cant seem to make work CREATE TABLE IF NOT EXISTS table1 ... as can be achieved in MySql etc. I am getting a 'Syntax error: Encountered "NOT" at line 1, column 17.' , when I try to run this SQL statement in my Java program. I checked in the documentation page for Derby Db Create Statements , but couldn't find such an alternative. Create the table, catch the SQLException and check SQL status code. The full list of error codes can be found here but I couldn't find Table <value> already exists ; it's probably X0Y68 . The code you need is X0Y32 . Just run the code

Where did the Apache Derby Eclipse plug-in go?

做~自己de王妃 提交于 2019-11-27 05:11:52
Edit : According to the Derby community the Eclipse plug-in won't be maintained nor built automatically along the Derby project. But is there anybody still using this plug-in? Because if so, is there a place he/she publishes the actual builds - which (hopefully) would run under Eclipse Juno? Or, if this is a real dead end, what are the alternatives? The original problem Using jdk1.7.0_03 Eclipse IDE for Java EE Developers (Win32) version Juno (build from 2012/06/14) derby-core-plugin 10.8.2 and -ui-plugin 1.1.3 (as there is no eclipse plugin for the latest version 10.9.1.0) Problem When trying