我们最近尝试将我们的规则知识库从Guvnor迁移到Workbench。我们使用drools-wb-jcr2vfs-distribution-6.4.0.Final迁移工具来执行迁移。我们已经能够解决足够的问题以完成迁移的第一部分,这是jcr的导出,但是我们现在收到导入到vfs的错误。日志文件显示以下堆栈跟踪:
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
该错误似乎表明导出创建的modules.xml中存在编码问题。任何关于如何解决的建议将不胜感激。
答案 0 :(得分:0)
@laune感谢您的帮助。你是正确的它假设UTF-8。当我放置
<?xml version="1.0" encoding="ISO-8859-1"?>
导入作业处理的每个XML文件开始工作。我认为这是移植工具未预料到的Windowsy问题。再次感谢您的帮助。