when I connect to DB, I cannot DB on h2 console and application Can I open DB file directly?
H2 Database URLsEmbedded The URL jdbc:h2:~/test means the database is stored in the user home directory in files starting with 'test'. Absolute locations like jdbc:h2:/data/db/test are supported. In embedded mode, the database runs in the same process as the application. Only one process may access a database at any time. Databases are automatically created if they don't exist. *Warning*: if no path is used (for example jdbc:h2:test), then the database is stored in the current working directory (the directory where the application was started). URLs of the form jdbc:h2:data/test are relative to the current working directory. It is recommended to use locations relative to ~ or absolute locations. Remote (client/server) The URL jdbc:h2:tcp://localhost/~/test means connect over TCP/IP to the H2 TCP server running on this computer, and open a database called test in the user home directory. The server must be started first. Any number of clients can connect to the same database. The same location rules as for embedded databases apply. In-Memory The URL jdbc:h2:mem:test means open an in-memory database named 'test'. Data is not persisted, and lost when the last connection to the database is closed. Multiple threads can access the same database, but data is only visible within the same process. For more information, see Database URL Overview <http://www.h2database.com/html/features.html#database_url>. Unique index or primary key violation: "PRIMARY KEY ON """".T123" [23505-195] <http://192.168.25.2:8082/login.do?jsessionid=114338271a78220d5871aa138f2b0bb1#> 23505/23505 (Help) <http://h2database.com/javadoc/org/h2/api/ErrorCode.html#c23505> org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY KEY ON """".T123" [23505-195] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345 <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=345&build=195>) at org.h2.message.DbException.get(DbException.java:179 <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=179&build=195>) at org.h2.message.DbException.get(DbException.java:155 <http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=155&build=195>) at org.h2.index.PageDataIndex.getNewDuplicateKeyException(PageDataIndex.java:164 <http://h2database.com/html/source.html?file=org/h2/index/PageDataIndex.java&line=164&build=195>) at org.h2.index.PageDataIndex.add(PageDataIndex.java:142 <http://h2database.com/html/source.html?file=org/h2/index/PageDataIndex.java&line=142&build=195>) at org.h2.table.RegularTable.addRow(RegularTable.java:121 <http://h2database.com/html/source.html?file=org/h2/table/RegularTable.java&line=121&build=195>) at org.h2.store.PageStore.redo(PageStore.java:1579 <http://h2database.com/html/source.html?file=org/h2/store/PageStore.java&line=1579&build=195>) at org.h2.store.PageLog.recover(PageLog.java:328 <http://h2database.com/html/source.html?file=org/h2/store/PageLog.java&line=328&build=195>) at org.h2.store.PageStore.recover(PageStore.java:1407 <http://h2database.com/html/source.html?file=org/h2/store/PageStore.java&line=1407&build=195>) at org.h2.store.PageStore.openExisting(PageStore.java:368 <http://h2database.com/html/source.html?file=org/h2/store/PageStore.java&line=368&build=195>) at org.h2.store.PageStore.open(PageStore.java:289 <http://h2database.com/html/source.html?file=org/h2/store/PageStore.java&line=289&build=195>) at org.h2.engine.Database.getPageStore(Database.java:2490 <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=2490&build=195>) at org.h2.engine.Database.open(Database.java:697 <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=697&build=195>) at org.h2.engine.Database.openDatabase(Database.java:276 <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=276&build=195>) at org.h2.engine.Database.<init>(Database.java:270 <http://h2database.com/html/source.html?file=org/h2/engine/Database.java&line=270&build=195>) at org.h2.engine.Engine.openSession(Engine.java:64 <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=64&build=195>) at org.h2.engine.Engine.openSession(Engine.java:176 <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=176&build=195>) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154 <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=154&build=195>) at org.h2.engine.Engine.createSession(Engine.java:137 <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=137&build=195>) at org.h2.engine.Engine.createSession(Engine.java:27 <http://h2database.com/html/source.html?file=org/h2/engine/Engine.java&line=27&build=195>) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354 <http://h2database.com/html/source.html?file=org/h2/engine/SessionRemote.java&line=354&build=195>) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:116 <http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=116&build=195>) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:100 <http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcConnection.java&line=100&build=195>) at org.h2.Driver.connect(Driver.java:69 <http://h2database.com/html/source.html?file=org/h2/Driver.java&line=69&build=195>) at org.h2.server.web.WebServer.getConnection(WebServer.java:735 <http://h2database.com/html/source.html?file=org/h2/server/web/WebServer.java&line=735&build=195>) at org.h2.server.web.WebApp.login(WebApp.java:947 <http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=947&build=195>) at org.h2.server.web.WebApp.process(WebApp.java:210 <http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=210&build=195>) at org.h2.server.web.WebApp.processRequest(WebApp.java:169 <http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=169&build=195>) at org.h2.server.web.WebThread.process(WebThread.java:133 <http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=133&build=195>) at org.h2.server.web.WebThread.run(WebThread.java:89 <http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=89&build=195>) at java.lang.Thread.run(Unknown Source) -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
