<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.h2.Driver" />
<property name="url" value="jdbc:h2:mem:test_db;INIT=CREATE SCHEMA
IF NOT EXISTS test_db\\;RUNSCRIPT FROM '~/sql/
populate.sql';DB_CLOSE_DELAY=-1" />
</bean>
I get the following error when I'm running:
SQL state [90046];error code [90046]; URL format error; must be
"jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:
[//]server[:port][,server2[:port]]/name }[;key=value...]"
but is "jdbc:h2:mem:test_db" [90046-160]; nested exception is
org.h2.jdbc
.JdbcSQLException: URL format error; must be "jdbc:h2:{ {.|mem:}[name]
| [file:]
fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }
[;key=value...]" b
ut is "jdbc:h2:mem:test_db" [90046-160]
How do I handle this ?, what's the problem here ?
Sorry to jump on an old thread, but I'm having a hard time finding any more recent information. I'm trying to run an h2 db, in memory, via spring/hibernate.URL: jdbc:h2:mem:test_db;INIT=create schema if not exists test_db\;runscript from '~\cpfdb_1_2_ddl.sql';DB_CLOSE_DELAY=-1;MODE=MYSQLDriver: org.h2.DriverWhen I run my unit test, I continue to receive the invalid url format error. However, when I simply run the jar, which opens a browser utility and enter in the url, it has no problems with it. So I'm completely stumped and hoping someone might be able to help.thanks -AMR
--To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/O9ZkKqIE3jMJ.
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Hi
You need to remove the backslash.
Regards Thomas
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/mEfnyp-cS48J.