derby

loading the right dependencies for sbt console in multi project setup causing derby security exception

眉间皱痕 提交于 2019-12-21 23:21:58
问题 I have a SBT multi project setup outlined https://github.com/geoHeil/sf-sbt-multiproject-dependency-problem and want to be able to execute sbt console in the root project. When executing: import org.apache.spark.sql.SparkSession val spark = SparkSession.builder().master("local[*]").enableHiveSupport.getOrCreate spark.sql("CREATE database foo") in the root console the error is: java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.jdbc.EmbeddedDriver Strangely, it works

How to alter column from PRIMARY KEY to IDENTITY for Derby

吃可爱长大的小学妹 提交于 2019-12-21 21:39:14
问题 The SQL for the creation of the table is: CREATE TABLE myTable(id INTEGER NOT NULL PRIMARY KEY, ...) Instead I need it to be: CREATE TABLE myTable(id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), ...) as described in the Derby documentation. So my question is what would be the alter statement I would need to create AFTER the initial create statement? In other words: CREATE TABLE myTable(id INTEGER NOT NULL PRIMARY KEY, ...) ALTER TABLE myTable ... Thank you

Derby Sequence Loop in junit test

吃可爱长大的小学妹 提交于 2019-12-21 17:29:39
问题 I'm in trouble when using Derby with embedded driver (derby-10.9.1.0) and in-memory db in my JUNIT with Hibernate (hibernate-core-3.6.8.Final) environment. I'm using annotations and using hbm2ddl to create my in-memory db. Everything is working except when I try to use an sequence. The sequence is created (it appears in the log), but when I try to add one entity (hibernate) with PK related to that sequence my code starts a infinite loop writing in each line: Hibernate: values next value for

Resultset not open. Verify Autocommit is OFF. Apache Debry

徘徊边缘 提交于 2019-12-21 09:13:55
问题 I am using apache derby for my database. I am able to perform inserts into the database. The following is the excerpt from the code that attempts to display the contents of my only table 'MAINTAB'. The instance of java.sql.Connection is 'dbconn'. ResultSet word; Statement query; String getData="SELECT THEWORD FROM MAINTAB"; try{ System.out.println(dbconn.getAutoCommit()); query = dbconn.createStatement(); word = query.executeQuery(getData); query.close(); dbconn.setAutoCommit(false); System

Programmatically setting derby.system.home

不打扰是莪最后的温柔 提交于 2019-12-20 14:21:05
问题 Need to move the database and log files of JavaDB (derby) db files into deployment directories. The database is working in the application startup directory as JavaDB creates a folder with the name of the database (in my case mydb), but I want to move that dir into a subdir called data/ creating data/mydb. I can do this with the connect call: DriverManager.getConnection("jdbc:derby:data/mydb;create=false"); and this works. But I'd like to programmatically explicitly set the value of derby

JavaFX + Hibernate(JPA) persistence + Derby DB

痞子三分冷 提交于 2019-12-20 10:57:37
问题 I'm developing a Java desktop application and was really interested in use JavaFX. I'm planning to use an MVC architecture because I have had some experience with Java EE and the MVC model. I want to store data in a embedded derby database and use Hibernate as persistence layer but I can't find a great tutorial about implementing MVC with hibernate and JavaFX. I have created the persistence file but I am not sure how to make it work with JavaFX. In Java EE I inject EJB services or DAOs but

java.sql.sqlnontransientconnectionexception: java.net.connectException : error connecting to server localhost on port

你。 提交于 2019-12-20 06:48:47
问题 I've being working on a java project using Derbyclient (database locally hosted). I'm done with everything except that when I'm trying the desktop app while I'm not manually connected to the database (from Netbeans), the error in the title pops up and I can't seem to solve it. Thank you for taking the time to read this and help me. 回答1: Derby can be run in two modes embedded or server-based. Server-based allows multiple programs to access the same database. Embedded allows your application to

java.sql.SQLSyntaxErrorException: Table/View 'x' does not exist

▼魔方 西西 提交于 2019-12-20 04:38:05
问题 I am trying to run a web application called AddressBook (JSF with Facelets) in the NetBeans 8.0.2 IDE with GlassFish 4.1 that accesses a relational database via the following code in the managed bean: @Resource( name="jdbc/addressbook" ) DataSource dataSource; When I run the application I get the following error in the browser: java.sql.SQLSyntaxErrorException: Table/View 'ADDRESSES' does not exist at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org

Where to see the stored data in derby database in j2me

删除回忆录丶 提交于 2019-12-20 04:09:25
问题 I created MIDlet class which contains name and number and i used RecordStore to store the data in apache derby database.The program is executing successfully.Now i want to see my entered data in derby database.Please help me where i can see.I am using netbeans IDE. 回答1: The database data is stored in files in the filesystem. The exact location of those files is controlled by the JDBC connection URL that you specified when you opened the database. Generally this URL describes a filesystem path

Unable to initialize hive with Derby from Brew install

心不动则不痛 提交于 2019-12-19 11:39:28
问题 It had been my understanding that Derby creates file(s) in the current directory. But there are none there. So I had tried to do the hive initialization using Derby : but .. it seems there is a derby database already. schematool --verbose -initSchema -dbType derby Starting metastore schema initialization to 2.1.0 Initialization script hive-schema-2.1.0.derby.sql Connecting to jdbc:derby:;databaseName=metastore_db;create=true Connected to: Apache Derby (version 10.10.2.0 - (1582446)) Driver: