Showing results for 
Search instead for 
Did you mean: 

Crystal Report Java API export to PDF error

0 Kudos

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?


Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

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.