h2

View content of embedded H2 database started by Spring

无人久伴 提交于 2019-11-27 00:01:54
问题 I would like to view in a web browser the content of the H2 database started by Spring thanks to the following configuration: <jdbc:embedded-database id="dataSource" type="H2" /> <jdbc:initialize-database data-source="dataSource"> <jdbc:script location="classpath:db/populateDB.sql"/> </jdbc:initialize-database> I searched for the JDBC URL in the logs: DEBUG o.s.j.d.SimpleDriverDataSource - Creating new JDBC Driver Connection to [jdbc:h2:mem:dataSource;DB_CLOSE_DELAY=-1] So that I could fill

Frontend tool to manage H2 database [closed]

时光怂恿深爱的人放手 提交于 2019-11-26 21:45:48
How to use H2 database 's integrated managment frontend? For operations such as create table, alter table, add column, and so on. I like SQuirreL SQL Client , and NetBeans is very useful ; but more often, I just fire up the built-in org.h2.tools.Server and browse port 8082: $ java -cp /opt/h2/bin/h2.jar org.h2.tools.Server -help Starts the H2 Console (web-) server, TCP, and PG server. Usage: java org.h2.tools.Server When running without options, -tcp, -web, -browser and -pg are started. Options are case sensitive. Supported options are: [-help] or [-?] Print the list of options [-web] Start

Where does H2's Embedded Databases Store the data?

半腔热情 提交于 2019-11-26 19:11:43
问题 So I just recently started learning about how databases work, how to use SQL ect. and decided to start implementing an embedded database into my Java application (specifically the H2 database) and seemed to work fairly well on the computer I was coding on. When I moved over to a different computer to continue my coding I noticed that even if I ported the embedded database file (h2-*.jar) All of the prepared tables I created in the first computer don't exist on the second one. I somehow had

View content of H2 or HSQLDB in-memory database

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 18:49:22
问题 Is there a way to browse the content of an H2 or an HSQLDB in-memory database for viewing? For example, during a debugging session with Hibernate in order to check when the flush is executed; or to make sure the script that instantiates the DB gives the expected result. Does it exist an addon or a library that you can embed with your code in order to allow this? Please, mention which one you're talking about (H2 or HSQLDB) in case you have an answer specific to one of them. 回答1: You can run

How in H2DB get sql dump like in MySql?

拈花ヽ惹草 提交于 2019-11-26 17:59:58
问题 I have some questions about H2DB. I have H2DB database which stores data in files, I have 3 files test.18.log.db, test.data.db, test.index.db. I want get sql dump file like when I use mysqldump. Is it possible? 回答1: Yes, there are multiple solutions. One is to run the SCRIPT SQL statement: SCRIPT TO 'fileName' Another is to use the Script tool: java org.h2.tools.Script -url <url> -user <user> -password <password> Then, there are also the RUNSCRIPT statement and RunScript tool. By the way, you

Spring configuration for embedded H2 database for tests

*爱你&永不变心* 提交于 2019-11-26 17:57:48
问题 What does your Spring configuration for integration tests look like using an embedded h2 datasource and, optionally, JUnit? My first try with a SingleConnectionDataSource basically worked, but failed on more complicated tests where you need several connections at the same time or suspended transactions. I think h2 in tcp based server mode might work as well, but this is probably not the fastest communication mode for a temporary embedded database in memory. What are the possibilities and

Timeout error trying to lock table in h2

老子叫甜甜 提交于 2019-11-26 17:37:01
问题 I get the following error under a certain scenario When a different thread is populating a lot of users via the bulk upload operation and I was trying to view the list of all users on a different web page. The list query, throws the following timeout error. Is there a way to set this timeout so that I can avoid this timeout error. Env: h2 (latest), Hibernate 3.3.x Caused by: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "USER"; SQL statement: [50200-144] at org.h2.message

Tomcat doesn't stop. How can I debug this?

核能气质少年 提交于 2019-11-26 16:57:52
问题 I have a Tomcat 7 running in Linux that I start via $CATALINA_HOME/bin/startup.sh and shutdown via $CATALINA_HOME/bin/shutdown.sh from /etc/init.d All is ok except 1 problem. Sometimes tomcat does not stop. Although I stop it and I see in catalina.out logs that is going down, if I do ps -ef I can still see the process running. What could be the problem? How can I debug this? My feeling is, that this is related to threads. So the parts that are suspicious are the following: 1) I use Log4j's

h2 (embedded mode ) database files problem

我只是一个虾纸丫 提交于 2019-11-26 16:52:11
问题 There is a h2-database file in my src directory (Java, Eclipse): h2test.db The problem: starting the h2.jar from the command line (and thus the h2 browser interface on port 8082), I have created 2 tables, 'test1' and 'test2' in h2test.db and I have put some data in them; when trying to access them from java code (JDBC), it throws me "table not found exception". A "show tables" from the java code shows a resultset with 0 rows. Also, when creating a new table ('newtest') from the java code

H5之VIDEO 标签 视频播放不了MP4视频的问题

淺唱寂寞╮ 提交于 2019-11-26 16:21:27
h5的video标签目前支持三种视视频封装格式,有"video/mp4", "video/ogg", "video/mov" 1.检查MP4视频的编码格式,mp4格式要求h264/aac 特别是格式工厂转换出来的,一般默认的不是 h264/acc,需要自己手动修改 2.http点播时MIME TYPE即设置为"video/mp4"格式, 注意正常的tomcat、nginx等服务器会自动匹配,但如果使用oss的话,需要自己设置或者验证一下是否正确 来源: oschina 链接: https://my.oschina.net/u/817581/blog/2253433