我正在尝试使用 Sharpen Tool 将lucenetransform代码从 java 移植到 c#。我在PaulDB.getWords()使用了锐化设置信息
当我运行转换过程时,出现以下错误
!会话 2012-12-15 14:55:21.773 -------------------------------------------------- --------- eclipse.buildId=I20120608-1200 java.version=1.6.0_38 java.vendor=Sun Microsystems Inc. BootLoader 常量:OS=win32, ARCH=x86_64, WS=win32, NL=en_IN Framework参数:-application sharpen.core.application -header C:\adt-bundle-windows\workspace\lucenetransform\header.txt 锐化/src -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\junit\junit -3.8.2.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\junit_4\junit-4.5.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\copylibs\org -netbeans-modules-java-j2seproject-copylibstask.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\lucene-core-3.3.0.jar @sharpen-all-options 命令行参数:-数据 C:\adt-bundle-windows\workspace\lucenetransform\sharpen -application sharpen.core.application -header C:\adt-bundle-windows\workspace\lucenetransform\header.txt 锐化/src -cp C:\adt-bundle-windows \workspace\lucenetransform\lib\junit\junit-3.8.2.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\junit_4\junit-4.5.jar -cp C:\adt-bundle-windows \workspace\lucenetransform\lib\copylibs\org-netbeans-modules-java-j2seproject-copylibstask.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\lucene-core-3.3.0.jar @sharpen -所有选项\adt-bundle-windows\workspace\lucenetransform\lib\copylibs\org-netbeans-modules-java-j2seproject-copylibstask.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\lucene-core-3.3 .0.jar @sharpen-all-options\adt-bundle-windows\workspace\lucenetransform\lib\copylibs\org-netbeans-modules-java-j2seproject-copylibstask.jar -cp C:\adt-bundle-windows\workspace\lucenetransform\lib\lucene-core-3.3 .0.jar @sharpen-all-options
!ENTRY org.eclipse.osgi 4 0 2012-12-15 14:55:28.110 !MESSAGE 应用程序错误!STACK 1 java.lang.IllegalStateException at sharpen.core.CSharpBuilder.pushExpression(CSharpBuilder.java:3364) at sharpen.core .CSharpBuilder.visit(CSharpBuilder.java:2171) 在 org.eclipse.jdt.core.dom.StringLiteral.accept0(StringLiteral.java:136) 在 org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java :2514) 在 org.eclipse.jdt.core.dom.AssertStatement.accept0(AssertStatement.java:167) 的 org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)。 jdt.core.dom.ASTNode.accept(ASTNode.java:2514) 在 org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585) 在 org.eclipse.jdt.core.dom.Block。在 org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514) 上的 accept0(Block.java:136) 在sharpen.core。CSharpBuilder.visitBlock(CSharpBuilder.java:1865) 在sharpen.core.CSharpBuilder.processBlock(CSharpBuilder.java:1826) 在sharpen.core.CSharpBuilder.visitBodyDeclarationBlock(CSharpBuilder.java:1793) 在sharpen.core.CSharpBuilder.mapMethodParts(CSharpBuilder .java:1540) 在 org.eclipse.jdt.core.dom.MethodDeclaration.accept0( MethodDeclaration.java:489) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514) atsharpen.core.CSharpBuilder.visit(CSharpBuilder.java:3384) atsharpen.core.CSharpBuilder.mapMembers (CSharpBuilder.java:760) 在sharpen.core.CSharpBuilder.processTypeDeclaration(CSharpBuilder.java:373) 在sharpen.core.CSharpBuilder$2.run(CSharpBuilder.java:284) at sharpen.core.framework.DynamicVariable.using(DynamicVariable.java:46) at sharpen.core.CSharpBuilder.visit(CSharpBuilder.java:279) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0 (TypeDeclaration.java:467) 在 org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514) 在 org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585) 在org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:219) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514) at sharpen.core.CSharpBuilder.run( CSharpBuilder.java:134) 在sharpen.core.SharpenConversion$2.run(SharpenConversion.java:121) 在sharpen.core.framework.DynamicVariable.using(DynamicVariable.java:46) 在sharpen.core.framework.Environments.runWith( Environments.java:23) 在sharpen.core.SharpenConversion。convert(SharpenConversion.java:119) at sharpen.core.SharpenConversion.run(SharpenConversion.java:105) 在 sharpen.core.SharpenConversionBatch.convertCompilationUnit(SharpenConversionBatch.java:72) 在 sharpen.core.framework.ConversionBatch.convertPair(ConversionBatch .java:79) 在sharpen.core.framework.ConversionBatch.run(ConversionBatch.java:71) 在sharpen.core.SharpenApplication.convertTo(SharpenApplication.java:96) 在sharpen.core.SharpenApplication.convert(SharpenApplication.java: 83) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java) 上的 sharpen.core.SharpenApplication.safeRun(SharpenApplication.java:71) :196) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher。在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java: 353) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629 ) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1438) 在 org.eclipse.equinox。org.eclipse.core.launcher.Main.main(Main.java:34) 上的 launcher.Main.main(Main.java:1414)
eclipse控制台显示如下信息
NamespaceAndIdentifiers [exec] 本机类型系统模式打开。[exec] 组织使用模式开启。[exec] 头文件:C:\adt-bundle-windows\workspace\lucenetransform\header.txt [exec] AbstractPipedTransformer.java [exec] AbstractTransformedIndexOutput.java [exec] /sharpened/src/org/apache/lucene/store/ transform/AbstractTransformedIndexOutput.java(227):未解析的 cref 目标 [exec] ByteIndexInput.java [exec] CompressedIndexDirectory.java [exec] DataDecryptor.java [exec] DataEncryptor.java [exec] DataTransformer.java [exec] DecompressionChunkCache.java [exec ] DeflateDataTransformer.java [exec] InflateDataTransformer.java [exec] LRUChunkCache.java [exec] NullTransformer.java [exec] ReadDataTransformer。java [exec] /sharpened/src/org/apache/lucene/store/transform/SequentialTransformedIndexOutput.java(63):找不到参数“pLevel”。[exec] /sharpened/src/org/apache/lucene/store/transform/SequentialTransformedIndexOutput.java(64):找不到参数“deflateCount”。[exec] ReadPipeTransformer.java [exec] SequentialTransformedIndexOutput.java [exec] SharedBufferCache.java [exec] StoreDataTransformer.java [exec] StorePipeTransformer.java [exec] StreamIndexOutput.java [exec] TransformedDirectory.java [exec] TransformedIndexInput.java [exec ] 错误:null [exec] java.lang.IllegalStateException [exec] at sharpen.core.CSharpBuilder.pushExpression(CSharpBuilder.java:3364) [exec] at sharpen.core.CSharpBuilder.visit(CSharpBuilder.java: core.CSharpBuilder.visitBodyDeclarationBlock(CSharpBuilder.java:1793) [exec] 转换在 4468 毫秒内完成。[exec] 在 sharpen.core.CSharpBuilder.mapMethodParts(CSharpBuilder.java:1540) [exec] 在 sharpen.core.CSharpBuilder.processMethodDeclaration(CSharpBuilder.java:1495) [exec] 在 sharpen.core.CSharpBuilder.visit(CSharpBuilder. java:1346) [exec] 在 org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:489) [exec] 在 org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java: 2514)[exec]在sharpen.core.CSharpBuilder.visit(CSharpBuilder.java:3384)[exec]在sharpen.core.CSharpBuilder.mapMembers(CSharpBuilder.java:760)[exec]在sharpen.core.CSharpBuilder.processTypeDeclaration( CSharpBuilder.java:373) [exec] at sharpen.core.CSharpBuilder$2。invoke(DelegatingMethodAccessorImpl.java:25) [exec] at java.lang.reflect.Method.invoke(Method.java:597) [exec] at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) [exec] 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) [exec] 在 org.eclipse.equinox.launcher.Main.run(Main.java:1438) [exec] 在 org. eclipse.equinox.launcher.Main.main(Main.java:1414) [exec] at org.eclipse.core.launcher.Main.main(Main.java:34) [exec] 发生错误。查看日志文件 [exec] C:\adt-bundle-windows\workspace\lucenetransform\sharpen.metadata.log。launcher.Main.basicRun(Main.java:584) [exec] at org.eclipse.equinox.launcher.Main.run(Main.java:1438) [exec] at org.eclipse.equinox.launcher.Main.main( Main.java:1414) [exec] at org.eclipse.core.launcher.Main.main(Main.java:34) [exec] 发生错误。查看日志文件 [exec] C:\adt-bundle-windows\workspace\lucenetransform\sharpen.metadata.log。launcher.Main.basicRun(Main.java:584) [exec] at org.eclipse.equinox.launcher.Main.run(Main.java:1438) [exec] at org.eclipse.equinox.launcher.Main.main( Main.java:1414) [exec] at org.eclipse.core.launcher.Main.main(Main.java:34) [exec] 发生错误。查看日志文件 [exec] C:\adt-bundle-windows\workspace\lucenetransform\sharpen.metadata.log。
BUILD FAILED C:\adt-bundle-windows\workspace\lucenetransform\run-sharpen.xml:59:执行此行时出现以下错误:C:\adt-bundle-windows\workspace\lucenetransform\run-sharpen.xml :20:执行返回:13
总时间:10秒
似乎无法从 Google 找到有关此问题的任何帮助。任何帮助将不胜感激。