View Issue Details

IDProjectCategoryView StatusLast Update
0001756SymmetricDSBugpublic2015-01-06 17:28
ReporterhrkAssigned Toelong 
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Product Version3.5.22 
Target VersionFixed in Version3.7.0 
Summary0001756: dbimport doesn't handle relative pathnames
DescriptionLaunching bin/dbimport with a relative path to the sql file (as per official quick start guide) fails due to "file not found". This happens both on Windows and on Linux.
Additional InformationFAIL:
luca@E0557546:~/Downloads/SymmetricDS$ bin/dbimport -e caricatori-master-000 engines/caricatori-config.sql
Log output will be written to ../logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={caricatori-master-000}
-------------------------------------------------------------------------------
An exception occurred. Please see the following for details:
-------------------------------------------------------------------------------
java.lang.RuntimeException: Cannot find file engines/caricatori-config.sql
        at org.jumpmind.symmetric.DbImportCommand.executeWithOptions(DbImportCommand.java:183)
        at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:130)
        at org.jumpmind.symmetric.DbImportCommand.main(DbImportCommand.java:72)
-------------------------------------------------------------------------------

Adding $(pwd)/ leads to SUCCESS:
luca@E0557546:~/Downloads/SymmetricDS$ bin/dbimport -e caricatori-master-000 $(pwd)/engines/caricatori-config.sql
Log output will be written to ../logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={caricatori-master-000}
luca@E0557546:~/Downloads/SymmetricDS$
TagsNo tags attached.

Activities

hrk

2014-06-11 04:44

reporter   ~0000533

Bug still exists in 3.6.0-SNAPSHOT of 2014-06-11.

hrk

2014-06-11 08:54

reporter   ~0000535

It appears that Java is setting user.dir (and cwd) to "./bin", instead of "./" I'm not sure how to treat this. Unless I'm (very) wrong, cwd is supposed to be "./"

elong

2014-06-11 09:19

developer   ~0000536

The sym command launches the server and it needs the directory to be "bin" because of the use of relative paths in the config files, but the environment script is affecting all the command line utils. Should be easy to fix this by leaving the working directory alone except for launching the server.

Related Changesets

SymmetricDS: master 33dd1eaf

2014-11-26 20:21:23

erilong

Details Diff
0001756: dbimport doesn't handle relative pathnames
0001756
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/AbstractCommandLauncher.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/SymmetricAdmin.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/util/SnapshotUtil.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/util/TypedPropertiesFactory.java Diff File
mod - symmetric-client/src/main/resources/symmetric-ext-points.xml Diff File
mod - symmetric-core/src/main/resources/symmetric-default.properties Diff File
mod - symmetric-server/src/main/deploy/bin/setenv Diff File
mod - symmetric-server/src/main/deploy/bin/setenv.bat Diff File
mod - symmetric-server/src/main/deploy/bin/sym Diff File
mod - symmetric-server/src/main/deploy/bin/sym.bat Diff File
mod - symmetric-server/src/main/deploy/bin/sym_service.bat Diff File
mod - symmetric-server/src/main/deploy/conf/ftp-extensions.xml Diff File
mod - symmetric-server/src/main/deploy/conf/log4j-debug.xml Diff File
mod - symmetric-server/src/main/deploy/conf/log4j.xml Diff File
mod - symmetric-server/src/main/deploy/conf/sym_service.conf Diff File
mod - symmetric-server/src/main/deploy/conf/symmetric-extensions.xml Diff File
mod - symmetric-server/src/main/deploy/web/WEB-INF/web.xml Diff File
mod - symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java Diff File
mod - symmetric-wrapper/src/main/java/org/jumpmind/symmetric/wrapper/WrapperConfig.java Diff File
mod - symmetric-wrapper/src/main/java/org/jumpmind/symmetric/wrapper/WrapperService.java Diff File

SymmetricDS: master 8e93e05f

2014-11-26 20:21:43

erilong

Details Diff
0001756: dbimport doesn't handle relative pathnames
0001756
mod - symmetric-util/src/main/java/org/jumpmind/util/AppUtils.java Diff File

Issue History

Date Modified Username Field Change
2014-06-11 04:20 hrk New Issue
2014-06-11 04:44 hrk Note Added: 0000533
2014-06-11 08:54 hrk Note Added: 0000535
2014-06-11 09:19 elong Note Added: 0000536
2014-06-11 09:19 elong Assigned To => elong
2014-06-11 09:19 elong Status new => assigned
2014-11-26 21:00 Changeset attached => SymmetricDS trunk r8966
2014-11-26 21:00 Changeset attached => SymmetricDS trunk r8967
2014-11-27 08:05 elong Status assigned => resolved
2014-11-27 08:05 elong Fixed in Version => 3.7.0
2014-11-27 08:05 elong Resolution open => fixed
2015-01-06 17:28 chenson Status resolved => closed
2015-07-30 21:49 Changeset attached => SymmetricDS master 8e93e05f
2015-07-30 21:49 Changeset attached => SymmetricDS master 33dd1eaf