JAI issue

Hello,

I am currently using Aspose.Slides with Coldfusion 8 and have had much success with it. Having developed an application using the Java version on my local machine I moved the code to our testing server. The application now breaks when calling slide.getThumbnail with the following error:



<tr>
	<td class="cell3BlueSides">
		28341
	</td>
	<td class="cellRightAndBottomBlueSide">
			at com.aspose.slides.PPImage.do(SourceFile:343)
	</td>
</tr>

<tr>
	<td class="cell3BlueSides">
		28342
	</td>
	<td class="cellRightAndBottomBlueSide">
			at com.aspose.slides.PPImage.getRenderedImage(SourceFile:304)
	</td>
</tr>

<tr>
	<td class="cell3BlueSides">
		28343
	</td>
	<td class="cellRightAndBottomBlueSide">
			at com.aspose.slides.PictureFrame.do(SourceFile:198)
	</td>
</tr>

<tr>
	<td class="cell3BlueSides">
		28344
	</td>
	<td class="cellRightAndBottomBlueSide">
			at com.aspose.slides.Slide.getThumbnail(SourceFile:1421)
	</td></tr></tbody></table><br>Our testing server has the same setup as my local machine. Both use the same version of Aspose.slides, JRE, Coldfusion server, JAI and JAI IO jars are identical.<br><br>I set up a test page on both machines and called com/sun/media/jai/codec/ByteArraySeekableStream directly with a simple piece of code. This worked successfully on both machines. The result from the test server was:<br><br><table class="cfdump_object"><tbody><tr><th class="object" colspan="3" onclick="cfdump_toggleTable(this);" style="cursor: pointer;" title="click to collapse">object of com.sun.media.jai.codec.ByteArraySeekableStream<br>
			
			</th></tr>
			
					<tr>
						<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">Class Name</td>
						<td style="vertical-align: top;"><br></td><td>com.sun.media.jai.codec.ByteArraySeekableStream</td>
					</tr>
				
						<tr>
							<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">Methods</td>
							<td style="vertical-align: top;"><br></td><td>
							<table class="cfdump_object">
								<tbody><tr><th class="object" onclick="cfdump_toggleTable(this);" style="cursor: pointer;" title="click to collapse">Method
									</th>
									<th class="object" onclick="cfdump_toggleTable(this);" style="cursor: pointer;" title="click to collapse">Return Type
									</th>
								</tr>
					
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer; font-style: normal;" title="click to collapse">available()</td>
									<td style="">int</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">canSeekBackwards()</td>
									<td>boolean</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">close()</td>
									<td>void</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">getFilePointer()</td>
									<td>long</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">length()</td>
									<td>long</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">read(byte[], int, int)</td>
									<td>int</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">read()</td>
									<td>int</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">seek(long)</td>
									<td>void</td>
								</tr>
							
								<tr>
									<td class="object" onclick="cfdump_toggleRow(this);" style="cursor: pointer;" title="click to collapse">skipBytes(int)</td>
									<td>int</td>
								</tr>
							</tbody></table></td></tr> 
									</tbody></table><br>We have checked for duplicate JAI jar files on the testing server and there is only one location that contains these. This location is properly set in the class path for the Coldfusion JRE.<br><br>Any help with this issue would be greatly appreciated.<br><br>-David Armstrong<br><br>
8340

java.lang.NoClassDefFoundError: com/sun/media/jai/codec/ByteArraySeekableStream

Hello,

It seems to be a JRE issue? I have requested the technical team to help you in this regard.

Hello David,

NoClassDefFoundError exception can be only thrown if class is not found in the classpath. If I’m not mistaken there are no other sources of the problem. So please check classpath definition again and try to find why it’s not visible to the application. Another possible solution is copy all JAI and JAI-IO jars to JRE/lib/ext/ folder and restart Coldfusion.