Skip to Content

Crystal Report Java API export to PDF error

Hello All,

I wrote a simple app that render a crystal report to pdf in java. This works correctly inside my Eclipse and if I export the jar and run it manually on my machine, if I move to another machine it doesn't work retunrning this error: could not be instantiated

With the below stack:

-[JRCCommunicationAdapter]- detected an exception: javax.imageio.spi.ImageReaderSpi: Provider could not be instantiated
at Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$ Source)
at java.util.ServiceLoader$ Source)
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at javax.imageio.ImageIO.<clinit>(Unknown Source)
at com.crystaldecisions.reports.common.image.ImageUtils.a(SourceFile:888)
at com.crystaldecisions.reports.common.image.ImageUtils.if(SourceFile:873)
at com.crystaldecisions.reports.common.CrystalImage.createImage(SourceFile:50)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.FormattedBlobFieldObject.if(SourceFile:103)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.FormattedBlobFieldObject.<init>(SourceFile:57)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.FormattedReportObject.a(SourceFile:155)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.w.for(SourceFile:105)

Does someone had the same issue and have a workaround please?


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on May 27 at 10:27 AM

    Hello *

    I found the solution by myself.

    The issue is generated by

    vendorName == null exception visible in the error stack

    To resolve the issue edit the manifest file generated by eclipse and add these lines:

    Main-Class: com.pacorini.crystal.Starter
    Implementation-Vendor: Sun Microsystems, Inc
    Implementation-Title: Java Runtime Environment


    Correct the java version accordingly.

    Hope it helps someone else.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.