简体   繁体   中英

JBoss Drools Guvnor to Workbench migration issue

We have recently attempted to migrate our rules knowledge base from Guvnor to Workbench. We are using the drools-wb-jcr2vfs-distribution-6.4.0.Final migration tool to perform the migration. We have been able to work through enough of the issues to get the first part of the migration to complete which is the export of the jcr, but we are now receiving an error on the import into vfs. The log files show the following stack trace:

15:14:20.910 [main] INFO  o.d.w.jcr2vfsmigration.VfsImporter - VFS import started. Reading from import directory C:\drools-wb-jcr2vfs-distribution-6.4.0.Final\bin\tmp-jcr2vfs.
15:14:20.972 [main] INFO  o.d.w.j.v.ModuleAssetImporter -   Module import started
15:14:20.988 [main] INFO  o.d.w.j.v.ModuleAssetImporter -     Importing module [ProductProcessing] (UUID=e6dfb921-bc91-4bbe-93eb-db1627f86e03)
15:14:22.316 [main] ERROR o.d.w.j.v.ModuleAssetImporter - Exception while importing assets for module 'ProductProcessing'.
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
    at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanCDATASection(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) ~[na:1.8.0_77]
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[na:1.8.0_77]
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) ~[na:1.8.0_77]
    at org.drools.workbench.jcr2vfsmigration.vfsImport.ModuleAssetImporter.importAssets(ModuleAssetImporter.java:224) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.vfsImport.ModuleAssetImporter.importModule(ModuleAssetImporter.java:179) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.vfsImport.ModuleAssetImporter.importAll(ModuleAssetImporter.java:137) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.vfsImport.ModuleAssetImporter$Proxy$_$$_WeldClientProxy.importAll(ModuleAssetImporter$Proxy$_$$_WeldClientProxy.java) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.VfsImporter.importAll(VfsImporter.java:65) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.VfsImporter$Proxy$_$$_WeldClientProxy.importAll(VfsImporter$Proxy$_$$_WeldClientProxy.java) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.VfsImporterLauncher.launchImport(VfsImporterLauncher.java:56) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.VfsImporterLauncher.run(VfsImporterLauncher.java:48) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
    at org.drools.workbench.jcr2vfsmigration.VfsImporterLauncher.main(VfsImporterLauncher.java:33) [drools-wb-jcr2vfs-import-6.4.0.Final.jar:6.4.0.Final]
15:14:22.347 [main] INFO  o.d.w.j.v.ModuleAssetImporter -     Importing module [defaultPackage] (UUID=1eefd28f-6222-4747-a695-7f22c6d23535)
15:14:22.800 [main] INFO  o.d.w.j.v.ModuleAssetImporter -     Importing module [globalArea] (UUID=c08ab4cc-4c4a-4d55-99eb-771e9553f302)
15:14:23.253 [main] INFO  o.d.w.j.v.ModuleAssetImporter -   Module import ended

The error seems to indicate that there is an encoding issue in the modules.xml that was created by the export. Any suggestions on how to resolve would be greatly appreciated.

@laune Thanks for your help. You are correct it was assuming UTF-8. When I placed

<?xml version="1.0" encoding="ISO-8859-1"?>

into each of the XML files that the import job was processing it started working. I believe it was a Windowsy issue not anticipated by the migration tool. Thanks again for the help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM