h2db

Default url and credentials for H2DB?

跟風遠走 提交于 2019-12-19 10:35:08
问题 I have added H2DB in my springBoot application for unit testing purpose. In application-test.properties I just added: spring.datasource.name = h2db spring.h2.console.enabled = true Its working fine, saving the values. But how it is working and how can I browse this DB? 回答1: Default properties for H2 in Spring Boot application are: spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.jpa

h2 doesn't start programmatically

无人久伴 提交于 2019-12-13 05:22:30
问题 I have wrote following code: private static void startH2(){ Server server = null; try { server = Server.createTcpServer("-tcpAllowOthers").start(); Class.forName("org.h2.Driver"); Connection conn = DriverManager. getConnection("jdbc:h2:tcp://localhost/~/test;MODE=PostgreSQL", "sa", ""); } catch (Exception e) { LOG.error("Error while initialize", e); } System.out.println("finish"); } public static void main(String [] args){ startH2(); } I run my main method and see following situation: Looks

Unable to get results from H2 db

假如想象 提交于 2019-12-10 03:14:59
问题 I'm trying to get values from h2 db, but always getting this error org.h2.jdbc.JdbcSQLException: No data is available [2000-171] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) at org.h2.message.DbException.get(DbException.java:169) at org.h2.message.DbException.get(DbException.java:146) at org.h2.message.DbException.get(DbException.java:135) at org.h2.jdbc.JdbcResultSet.checkOnValidRow(JdbcResultSet.java:2956) at org.h2.jdbc.JdbcResultSet.get(JdbcResultSet.java:2962)

How to show content of local h2 database(web console)?

泄露秘密 提交于 2019-12-09 05:09:07
问题 Recently I joined a new team and here guys use h2 for stub service. I was wondering whether I can show the content of this database using web interface. At work it is available by going to localhost:5080 I have a project where I use h2 database, but I cannot see the h2 web console when I hit localhost:5080 I tried also localhost:8082 - it also doesn't work. My project configuration (works successfully): <bean id="wrappedDataSource" class="net.bull.javamelody.SpringDataSourceFactoryBean">

H2 jdbc Connection refused: connect 90067-147

天涯浪子 提交于 2019-12-08 19:25:35
I got a project to upgrade and it is using h2 DB with jdbc driver. During the build I have a systematic error on connection: Exception in thread "main" org.h2.jdbc.JdbcSQLException: Connection is broken: "Connection refused: connect" [90067-147] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:156) at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:380) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:271) at org.h2.engine.SessionRemote.createSession(SessionRemote.java:265) at org.h2

H2 jdbc Connection refused: connect 90067-147

随声附和 提交于 2019-12-08 07:32:58
问题 I got a project to upgrade and it is using h2 DB with jdbc driver. During the build I have a systematic error on connection: Exception in thread "main" org.h2.jdbc.JdbcSQLException: Connection is broken: "Connection refused: connect" [90067-147] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:156) at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:380) at org.h2.engine.SessionRemote.connectEmbeddedOrServer

Unable to get results from H2 db

两盒软妹~` 提交于 2019-12-05 02:51:51
I'm trying to get values from h2 db, but always getting this error org.h2.jdbc.JdbcSQLException: No data is available [2000-171] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) at org.h2.message.DbException.get(DbException.java:169) at org.h2.message.DbException.get(DbException.java:146) at org.h2.message.DbException.get(DbException.java:135) at org.h2.jdbc.JdbcResultSet.checkOnValidRow(JdbcResultSet.java:2956) at org.h2.jdbc.JdbcResultSet.get(JdbcResultSet.java:2962) at org.h2.jdbc.JdbcResultSet.getInt(JdbcResultSet.java:306) I googled for an answer Make sure to call

Buffer overflow issue when rows in vault is more than 200

佐手、 提交于 2019-12-01 14:38:52
We have developed an app, which creates obligations in vault in a table. If the row size of the table is less than 200, the application works fine. However, if the rows are more than 200 then during the execution it gives the following error - Please specify a PageSpecification as there are more results [201] than the default page size [200] After increasing the pagination to 400 from the default 200, I am getting java heap out of memory error. I tired to increase the heap size of node from 512m (default) to 1024m. But, still this issue is not resolved and I am getting the error in H2 DB-

Buffer overflow issue when rows in vault is more than 200

半腔热情 提交于 2019-12-01 12:42:32
问题 We have developed an app, which creates obligations in vault in a table. If the row size of the table is less than 200, the application works fine. However, if the rows are more than 200 then during the execution it gives the following error - Please specify a PageSpecification as there are more results [201] than the default page size [200] After increasing the pagination to 400 from the default 200, I am getting java heap out of memory error. I tired to increase the heap size of node from