Error Coming when Setting License in Aspose Words

Error :-

java.lang.AbstractMethodError: Receiver class oracle.xml.parser.v2.XMLElement does not define or inherit an implementation of the resolved method abstract getTextContent()Ljava/lang/String; of interface org.w3c.dom.Node.
	at com.aspose.words.zzZJ5.zzT(Unknown Source) ~[words-20.6-jdk17.jar:20.6]
	at com.aspose.words.zzZJ5.zzZ(Unknown Source) ~[words-20.6-jdk17.jar:20.6]
	at com.aspose.words.zzZJ5.zzY(Unknown Source) ~[words-20.6-jdk17.jar:20.6]
	at com.aspose.words.zzZJ5.zzU(Unknown Source) ~[words-20.6-jdk17.jar:20.6]
	at com.aspose.words.zzZJ5.zzV(Unknown Source) ~[words-20.6-jdk17.jar:20.6]

code block :-

InputStream licenseStream = null;
try
{
    licenseStream = this.getClass().getClassLoader().getResourceAsStream("aspose.total.java.lic");
    if (licenseStream != null)
    {
        License license = new License();
        license.setLicense(licenseStream);
    }

i have correct depedency for above error

<dependency>
	<groupId>com.oracle</groupId>
	<artifactId>xmlparserv2</artifactId>
	<version>9.2</version>
</dependency>

<dependency>
	<groupId>oracle</groupId>
	<artifactId>xsu12</artifactId>
	<version>11.2.0.3</version>
</dependency>

<dependency>
	<groupId>xerces</groupId>
	<artifactId>xercesImpl</artifactId>
	<version>2.12.2</version>
</dependency>

@dharanibhoi The above dependencies are not required for Aspose.Words. It is enough to add dependency to Aspose.Words like this:

<dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-words</artifactId>
	<version>23.12</version>
	<classifier>jdk17</classifier>
</dependency>

Have you tried applying the license from the file? Does the same exception occur is this case? If possible, please create a simple console application that will allow us to reproduce the problem (The license file can be excluded, we will use our license for testing). We will check the issue and provide you more information.

This got resolved after updating the version. Thanks for your help

1 Like