h2 Questions
9
How can I explicitly set the time zone H2 should use? Now it gets the timezone to use from the underlying OS. I would assume there existed an extra parameter I would add to the connection string al...
Archaize asked 1/11, 2012 at 11:39
28
Solved
I've got a H2 database with URL "jdbc:h2:test". I created a table with the following code
CREATE TABLE PERSON (
ID INT PRIMARY KEY,
FIRSTNAME VARCHAR(64),
LASTNAME VARCHAR(64)
);
I ...
17
I am trying to use H2 to connect to a database in Java (using Eclipse as the IDE). The sample does (below) throws a ClassNotFoundException. The thing is, I did add the h2 jar file to the syst...
Merci asked 24/10, 2010 at 11:31
4
Solved
I recently upgraded h2 version from 1.4.200 to 2.0.206. Some of the queries that used to work in the older version are not working properly after the upgrade.
CREATE TABLE SOMETABLE (
ID INT(11) N...
2
Solved
Background
I'm using Oralce as database and H2 Embedded in-memory database for integration tests.
I've created some tables in H2 and was able to get some inserted data. However, I could not retri...
Abstergent asked 22/4, 2020 at 6:44
6
I'm trying to create a Spring Boot project with H2 database, which would be accessible by other programs.
application.properties
spring.datasource.url = jdbc:h2:tcp://localhost:8084/~/./db/tech
spr...
Intranuclear asked 16/10, 2020 at 14:24
6
I have some problems with using a schema.sql file to create my sql schema when executing a junit test while this schema contains mysql specific expression. I have to add the mode=mysql to the H2 ur...
Bakehouse asked 21/2, 2017 at 10:36
7
I have an H2 column of type Boolean but Hibernate query it using a 1/0 instead of TRUE/FALSE values, which leads to the Values of types "BOOLEAN" and "INTEGER" are not comparabl...
1
I have a java application which uses Liquibase for migration and till now was using MySQL for running test cases.
I want to run the test cases with the h2 database. For that, I made required change...
Perfect asked 13/8, 2020 at 22:46
10
Solved
I have a spring boot application and I trying to initialize some data on application startup.
This is my application properties:
#Database connection
spring.datasource.url=jdbc:h2:mem:test_db
spr...
Serrulate asked 30/5, 2017 at 16:16
19
Solved
The Spring Boot guide says I can get the H2 console but it's not working for me.
http://localhost:8080/h2/ Whitelabel Error Page
This application has no explicit mapping for /error, so you are ...
Wrote asked 26/10, 2016 at 11:37
5
Solved
I keep getting the following error message whenever my application boots up:
Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.SERMON_SESSION(I...
6
Solved
MySQL dialect:
CREATE TABLE My_Table ( my_column enum ('first', 'second', ... 'last'));
H2 dialect:
CREATE TABLE My_Table ( my_column ? ('first', 'second', ... 'last'));
What type is equivale...
6
Solved
Is there a way to have an auto_incrementing BIGINT ID for a table.
It can be defined like so
id bigint auto_increment
but that has no effect (it does not increment automatically).
I would like t...
Splash asked 19/2, 2012 at 20:58
2
Solved
My production uses MySQL 5.7 and I run h2 (MODE=MySQL) for tests. My connection string is like:
jdbc:h2:mem:ci_main;IGNORECASE=TRUE;MODE=MySQL;
I used Hibernate 5.6.3 with MySQL57InnoDBDialect.
It...
Bioscopy asked 19/1, 2022 at 9:6
12
I am using the H2 database in a Spring boot application. But unable to open it in the browser at http://localhost:8080/console. My pom.xml is as below:
<dependency>
<groupId>com.h2da...
Imprecise asked 10/11, 2017 at 11:17
33
In Springboot 2.3.0.RELEASE
I am getting the the following error while connecting to h2 database in the console
Database "mem:testdb" not found, either pre-create it or allow remote
database cr...
Prowl asked 18/5, 2020 at 8:12
4
Solved
I'm testing a Dao with an In-Memory DB with H2. I'm passing an int to the query with a map to execute it. This query is working OK on Oracle SQL, but is not succeding in H2.
DAO
@Override
public...
Aforetime asked 17/8, 2018 at 9:26
3
Solved
I am using H2 for database management, and this is what I would like to do:
I would like to allow multiple users to access a database at the same time. I've read a bit about "MULTI_THREADED=TRUE",...
8
Solved
I'm using the H2-Database and Spring Security, but I'm unable to open it in the browser at http://localhost:8080/h2-console
Here my pom.xml (only the H2 entry)
<dependency>
<groupId>co...
Riflery asked 4/12, 2022 at 19:36
2
Solved
I have two simple beans--FatKid and Hamburgers. I need to be able to not only look up all of the hamburgers someone ate, but also who ate which particular hamburger.
FatKid.java
import java.util.Li...
Atlas asked 23/10, 2011 at 21:45
1
I have a production database in mysql and do some Junit tests in H2.
I am struggling to find a syntax that would both work in tests and production to delete records in 2 tables.
SQL queries are sen...
7
Solved
(I've already seen the H2 database In memory - Init schema via Spring/Hibernate question; it is not applicable here.)
I'd like to know if there's a setting in H2 that will allow me to auto-create ...
6
Upon running this SQL statement:
select TimeInterval,
((((Timer*60)/1.0)*100)/((10.0*60)/60.0)) as 'Throughput-run_1_8_11'
from StatExternalData, StatisticDefinition
where StatisticDefinition....
13
Solved
I have created a spring boot application to connect h2 database with it. While doing so, it throws an error showing Database not found. Please help me with the solution which I can implement and re...
Cygnet asked 9/10, 2019 at 6:39
© 2022 - 2024 — McMap. All rights reserved.