Bug 985934 - Jcr2vfs migration tool does not fail with error when mandatory parameters are missing
Summary: Jcr2vfs migration tool does not fail with error when mandatory parameters are...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER6
: 6.0.0
Assignee: Mark Proctor
QA Contact: Petr Široký
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-18 14:23 UTC by Petr Široký
Modified: 2014-08-06 20:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:19:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Široký 2013-07-18 14:23:50 UTC
Description of problem:
Jcr2vfs migration tool does not properly fail if some mandatory parameter is missing. For example when the "inputJcr" directory does not exist, it just displays message about it, but does not fail. Similar thing happens when the "outputVfs" dir already exists, so the migrator can't proceed.

I think if the migration could not be completed the migrator should display error message and return non-zero exit code. Also "Migration ended" should not be displayed in that case.

Example output: 
psiroky@psiroky-laptop bin]$ sh runMigration.sh 
2013-07-18 16:16:26,219 [main] WARN  WELD-001440 Scope type @javax.enterprise.context.SessionScoped() used on injection point [field] @SessionScoped @Inject private org.uberfire.backend.server.UserServicesImpl.identity
The outputVfsRepository (/home/psiroky/work/releases/brms-6.0.0-DR6/migration-tool/bin/outputVfs) already exists.
Migration ended
[psiroky@psiroky-laptop bin]$ sh runMigration.sh 
2013-07-18 16:16:51,578 [main] WARN  WELD-001440 Scope type @javax.enterprise.context.SessionScoped() used on injection point [field] @Inject @SessionScoped private org.uberfire.backend.server.UserServicesImpl.identity
The inputJcrRepository (/home/psiroky/work/releases/brms-6.0.0-DR6/migration-tool/bin/inputJcr) does not exist.
Migration ended


Version-Release number of selected component (if applicable):
6.0.0-DR6


Steps to Reproduce:
1. Get the migration tool and just run bin/runMigration.sh


Actual results:
Message about "missing inputJcr" dir is displayed, just before "Migration ended". Also exit code 0 is returned.


Expected results:
The tool should clearly state that the inputJcr dir does not exists and it can't proceed with migration, returning non-zero return code.

Comment 8 Petr Široký 2014-01-15 11:48:52 UTC
Verified fixed in 6.0.0-ER7.


Note You need to log in before you can comment on or make changes to this bug.