We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

RTF to HTML throws EmptyStackException using Java

I am getting an EmptyStackException while trying to convert an RTF document to HTML. I will attach the document. Using Aspose.Words version 20.4.

Here is the stack trace:

java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:102)
	at com.aspose.words.zzZGL.zzZ3M(Unknown Source)
	at com.aspose.words.zzZRD.zzZic(Unknown Source)
	at com.aspose.words.zzZGL.zzZ3N(Unknown Source)
	at com.aspose.words.zzZGR.visitCellEnd(Unknown Source)
	at com.aspose.words.Cell.zzY(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Cell.accept(Unknown Source)
	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Row.accept(Unknown Source)
	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Table.accept(Unknown Source)
	at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
	at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
	at com.aspose.words.Body.accept(Unknown Source)
	at com.aspose.words.zzZVD.zzYH(Unknown Source)
	at com.aspose.words.zzZVD.zzZ(Unknown Source)
	at com.aspose.words.zzZVD.zzY(Unknown Source)
	at com.aspose.words.zzZVD.zzZm2(Unknown Source)
	at com.aspose.words.zzZVD.zzZBQ(Unknown Source)
	at com.aspose.words.zzZVD.zzZmq(Unknown Source)
	at com.aspose.words.zzZQG.zzZ(Unknown Source)
	at com.aspose.words.zzZEI.zzZ(Unknown Source)
	at com.aspose.words.Document.zzZ(Unknown Source)
	at com.aspose.words.Document.zzZ(Unknown Source)
	at com.aspose.words.Document.zzZ(Unknown Source)
	at com.aspose.words.Document.save(Unknown Source)
	at com.idexx.nlp.parsers.RTFConvertToHtml.convert(RTFConvertToHtml.java:49)
	at com.idexx.nlp.parsers.DefaultParser.parseRTF(DefaultParser.java:46)
	at com.idexx.nlp.parsers.DefaultParser.parseInputStream(DefaultParser.java:97)
	at com.idexx.nlp.parsers.DefaultParser.parseDocument(DefaultParser.java:32)
	at com.idexx.nlp.pipelines.MedicalNoteParsingPipelineDebugger.run(MedicalNoteParsingPipelineDebugger.java:53)
	at com.idexx.nlp.parsers.MedicalNoteParsingPipelineTests.testPipeline(MedicalNoteParsingPipelineTests.java:19)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:744)
	at org.testng.TestRunner.run(TestRunner.java:602)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
	at org.testng.TestNG.runSuites(TestNG.java:1144)
	at org.testng.TestNG.run(TestNG.java:1115)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:110)

202326:1:342900:PD:2019-04-17 08:47:12.000000.zip (55.8 KB)

@dtkincaid

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-20518 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-20518) have been fixed in this Aspose.Words for .NET 20.7 update and this Aspose.Words for Java 20.7 update.