NoClassDefFound error with aspose-pdf-23.1-jdk17 though classpath has entry

Hi,
With the above jar mentioed, I get a NoClassDefFoundError for java.lang.NoClassDefFoundError: com/aspose/pdf/BaseParagraph

Please note that classPath has entry for pdf jar.

@sushma1509,

It looks like your post is incomplete.



Can you please provide the document, code snippet you are experiencing the issue with?

Hi @carlos.molina
This is not specific to any document as such. The moment invocation to a class which imports aspose pdf , we are facing this issue. Though compilation is successful, run time execution is giving the error

@sushma1509,

I am asking because many people is using that library and not getting that error, including me.

It must be something local from your project.
Can you create a new project, install the reference and see if it works?

This are my dependencies using maven:

<dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-words</artifactId>
        <version>23.1</version>
        <classifier>jdk17</classifier>
    </dependency>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-words</artifactId>
        <version>23.1</version>
        <classifier>shaping-harfbuzz-plugin</classifier>
    </dependency>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-pdf</artifactId>
        <version>23.1</version>
    </dependency>
</dependencies>

We are not using a maven based one. It is ant based .

Hi
Can I know if there is any update ? I am facing this issue only with pdf jars. words and imaging works well. Is there any other package needed for BasePargraph class alone ?

I am using jdk8. Does jdk17 work with that?

@sushma1509,

I am not an expert java developer, but this seems like a local configuration issue or anyone else would be having this exception. I suggest you create a new environment and test it out. But that goes beyond the purpose this forum is made of.

I am guessing you download the DLLs and you are using them directly. Just to figure out things, create a dummy project with maven and check if it works. That will give you a clue about what maybe be wrong with your main project.

To know what is the current version you can use this link as a reference: nuget,

To know how to use aspose with plugins you can use this page as a reference: Plugins