FileNotFoundException: backup.sql

388 views
Skip to first unread message

scott....@digitalbarriers.com

unread,
Jun 8, 2016, 4:49:32 AM6/8/16
to H2 Database
Am trying to do execute a CreateCluster operation. I have two databases on different machines started by:

java -cp c:\h2\bin\h2-1.4.192.jar org.h2.tools.Server -tcp -tcpPort 9101 -tcpAllowOthers -baseDir c:\Users\scottvm9

java -cp c:\H2\bin\h2-1.4.192.jar org.h2.tools.Server -tcp -tcpPort 9101 -tcpAllowOthers -baseDir c:\users\scottvm10

The CreateCluster command is:

java -cp c:\h2\bin\h2-1.4.192.jar org.h2.tools.CreateCluster -urlSource "jdbc:h2:tcp://192.168.50.132:9101/~/server1/test" -urlTarget "jdbc:h2:tcp://192.168.50.128:9101/~/server1/test" -user <user> -password <password> -serverList 192.168.50.132:9101,192.168.50.128:9101


But I get the a FileNotFoundException on backup.sql:


Exception in thread "main" org.h2.message.DbException: IO Exception: "java.
io.FileNotFoundException: backup.sql (The system cannot find the file speci
fied)"; "backup.sql" [90031-192]
        at org.h2.message.DbException.get(DbException.java:168)
        at org.h2.message.DbException.convertIOException(DbException.java:3
30)
        at org.h2.tools.RunScript.process(RunScript.java:333)
        at org.h2.tools.CreateCluster.process(CreateCluster.java:158)
        at org.h2.tools.CreateCluster.runTool(CreateCluster.java:81)
        at org.h2.tools.CreateCluster.main(CreateCluster.java:48)
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoun
dException: backup.sql (The system cannot find the file specified)"; "backu
p.sql" [90031-192]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:
345)
        ... 6 more
Caused by: java.io.FileNotFoundException: backup.sql (The system cannot fin
d the file specified)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at org.h2.store.fs.FilePathDisk.newInputStream(FilePathDisk.java:32
1)
        at org.h2.store.fs.FileUtils.newInputStream(FileUtils.java:218)
        at org.h2.tools.RunScript.process(RunScript.java:185)
        at org.h2.tools.RunScript.process(RunScript.java:328)
        ... 3 more


Can anyone tell me about this file backup.sql. i.e. should it be created by the createcluster operation? if so, where should I expect to find it. The documentation is a bit light on this

Meni Hillel

unread,
Aug 28, 2016, 5:21:23 AM8/28/16
to H2 Database
Having the same issue...

Meni Hillel

unread,
Aug 28, 2016, 5:53:59 AM8/28/16
to H2 Google Group
Figured it out. Need to make sure the current directory must be where H2 jar file is located.

--
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/FW6PoRl9KcI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database+unsubscribe@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages