Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1055269

Summary: jcr2vfs: can not migrate asset with space in the name
Product: [Retired] JBoss BRMS Platform 6 Reporter: Petr Široký <psiroky>
Component: Migration ToolAssignee: Neus Miras <nmirasch>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Široký <psiroky>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: rrajasek
Target Milestone: ---Keywords: Regression, TestBlocker
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Migrating JCR asset with space in the name. Consequence: Jcr2vfs migration tool fails to migrate JCR assets with space in the name. IllegalArgumentException is thrown. Fix: Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:18:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
JCR repo that will reproduce the issue. none

Description Petr Široký 2014-01-19 22:37:01 UTC
Description of problem:
When migrating asset with space in the name (e.g. "Credit approval.drl") the migration tool throws following exception and ends (thus the other assets are not migrated).


Stacktrace:
java.lang.IllegalArgumentException
	at java.net.URI.create(URI.java:841)
	at org.uberfire.backend.server.util.Paths.convert(Paths.java:52)
	at org.drools.workbench.jcr2vfsmigration.migrater.asset.AttachementAssetMigrater.migrate(AttachementAssetMigrater.java:40)
	at org.drools.workbench.jcr2vfsmigration.migrater.asset.AttachementAssetMigrater$Proxy$_$$_WeldClientProxy.migrate(AttachementAssetMigrater$Proxy$_$$_WeldClientProxy.java)
	at org.drools.workbench.jcr2vfsmigration.migrater.AssetMigrater.migrate(AssetMigrater.java:229)
	at org.drools.workbench.jcr2vfsmigration.migrater.AssetMigrater.migrateAll(AssetMigrater.java:156)
	at org.drools.workbench.jcr2vfsmigration.migrater.AssetMigrater$Proxy$_$$_WeldClientProxy.migrateAll(AssetMigrater$Proxy$_$$_WeldClientProxy.java)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater.migrateAll(Jcr2VfsMigrater.java:91)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.migrateAll(Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.java)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.migrate(Jcr2VfsMigrationApp.java:64)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.run(Jcr2VfsMigrationApp.java:52)
	at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.main(Jcr2VfsMigrationApp.java:37)
Caused by: java.net.URISyntaxException: Illegal character in path at index 95: default://master@guvnor-jcr2vfs-migration/defaultpackage/src/main/resources/defaultpackage/Some custom file.txt
	at java.net.URI$Parser.fail(URI.java:2810)
	at java.net.URI$Parser.checkChars(URI.java:2983)
	at java.net.URI$Parser.parseHierarchical(URI.java:3067)
	at java.net.URI$Parser.parse(URI.java:3015)
	at java.net.URI.<init>(URI.java:577)
	at java.net.URI.create(URI.java:839)


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

How reproducible:
Always

Steps to Reproduce:
1. Download and unzip attached jcr repo.
2. Run the migration tool with the attached repo.

Actual results:
Exception thrown when migrating assets with space in the name.

Expected results:
No exception thrown, migration successfully completed.

Comment 1 Petr Široký 2014-01-19 22:38:33 UTC
Created attachment 852524 [details]
JCR repo that will reproduce the issue.

Comment 2 Petr Široký 2014-01-20 17:46:17 UTC
I am not sure, but the issue could be related to this commit: https://github.com/droolsjbpm/uberfire/commit/7ef4fd308d7f3e6a08dcd8d3b10f677303baae59 it removes encoding of the path at some places.

Comment 3 Petr Široký 2014-01-20 18:07:04 UTC
Its the other way around. Just looked into the code and tested with community snapshot and the above mentioned bug actually _fixes_ this issue (and not causes it)..

Comment 4 Neus Miras 2014-01-24 15:45:51 UTC
It was fixed by porcelli at uberfire module.
at the commit commented

Comment 5 Petr Široký 2014-01-27 17:06:48 UTC
Although this issue is not ON_QA, it has been already fixed. Verified in 6.0.0-CR2.

Comment 6 Lukáš Petrovický 2014-02-07 16:15:31 UTC
This BZ has been part of the 6.0.0 stream.