AnsweredAssumed Answered

JPEG2000: RasterFormatException 'data array too small'

Question asked by nadaoneal on Mar 16, 2009
Latest reply on Mar 24, 2009 by mikeh
Hi, I'm getting "The preview cannot be loaded form the server." (sic) when I try to view the large preview image of a PNM/JPEG2000 file in Share. The small preview in the list file shows up fine. Large previews of other objects, from PNGs to PDFs, are working fine. I'm running Labs version D on RedHat Linux with the Alfresco-included Tomcat 6, JRE 1.6. My JAVA_OPTS are "-Xms256m -Xmx512m -Xss96k -XX:MaxPermSize=128m -server".

I do have jasper installed. The large preview did work in Labs version C, but stopped working in Labs version D. I haven't tried it with version E.

The first time I got this error, looking at a pnm that I had uploaded with Labs version C, I saw this in the error log:
java.awt.image.RasterFormatException: Data array too small (should be 189125 )
   at sun.awt.image.ByteComponentRaster.verify(Unknown Source)
   at sun.awt.image.ByteComponentRaster.<init>(Unknown Source)
   at sun.awt.image.ByteInterleavedRaster.<init>(Unknown Source)
   at sun.awt.image.ByteInterleavedRaster.<init>(Unknown Source)
   at java.awt.image.Raster.createWritableRaster(Unknown Source)
   at com.sun.pdfview.PDFImage.parseData(PDFImage.java:190)
   at com.sun.pdfview.PDFImage.getImage(PDFImage.java:163)
   at com.sun.pdfview.PDFRenderer.drawImage(PDFRenderer.java:253)
   at com.sun.pdfview.PDFImageCmd.execute(PDFPage.java:650)
   at com.sun.pdfview.PDFRenderer.iterate(PDFRenderer.java:551)
   at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:88)
   at com.sun.pdfview.BaseWatchable.execute(BaseWatchable.java:250)
   at com.sun.pdfview.BaseWatchable.go(BaseWatchable.java:184)
   at com.sun.pdfview.PDFPage.getImage(PDFPage.java:236)
   at org.alfresco.repo.content.transform.PdfToImageContentTransformer.transformInternal(PdfToImageContentTransformer.java:103)
   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:216)
   at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:154)
   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:216)
   at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:505)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:131)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy31.transform(Unknown Source)
   at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:237)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy85.createThumbnail(Unknown Source)
   at org.alfresco.repo.thumbnail.CreateThumbnailActionExecuter.executeImpl(CreateThumbnailActionExecuter.java:115)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:592)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:529)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:369)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:378)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:381)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Since then, however, I've seen no errors in the error log post-processing. I haven't been able to get this error to come up again. I wonder if it has to do with being unable to load the preview cached with version C.

On uploading a new .pnm file, I got the following errors in the error log. I don't get these errors when uploading non-PNM files.

java.nio.channels.ClosedChannelException
   at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(Unknown Source)
   at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
   at org.alfresco.jlan.smb.server.nio.ChannelPacketHandler.writeBytes(ChannelPacketHandler.java:133)
   at org.alfresco.jlan.smb.server.nio.TcpipSMBChannelHandler.writePacket(TcpipSMBChannelHandler.java:167)
   at org.alfresco.jlan.smb.server.PacketHandler.writePacket(PacketHandler.java:219)
   at org.alfresco.jlan.smb.server.SMBSrvSession.sendResponseSMB(SMBSrvSession.java:1579)
   at org.alfresco.jlan.smb.server.SMBSrvSession.sendAsynchResponseSMB(SMBSrvSession.java:1750)
   at org.alfresco.jlan.smb.server.notify.NotifyChangeHandler.sendChangeNotification(NotifyChangeHandler.java:813)
   at org.alfresco.jlan.smb.server.notify.NotifyChangeHandler.run(NotifyChangeHandler.java:1038)
   at java.lang.Thread.run(Unknown Source)
java.nio.channels.ClosedChannelException
   at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(Unknown Source)
   at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
   at org.alfresco.jlan.smb.server.nio.ChannelPacketHandler.writeBytes(ChannelPacketHandler.java:133)
   at org.alfresco.jlan.smb.server.nio.TcpipSMBChannelHandler.writePacket(TcpipSMBChannelHandler.java:167)
   at org.alfresco.jlan.smb.server.PacketHandler.writePacket(PacketHandler.java:219)
   at org.alfresco.jlan.smb.server.SMBSrvSession.sendResponseSMB(SMBSrvSession.java:1579)
   at org.alfresco.jlan.smb.server.SMBSrvSession.sendAsynchResponseSMB(SMBSrvSession.java:1750)
   at org.alfresco.jlan.smb.server.notify.NotifyChangeHandler.sendChangeNotification(NotifyChangeHandler.java:813)
   at org.alfresco.jlan.smb.server.notify.NotifyChangeHandler.run(NotifyChangeHandler.java:1038)
   at java.lang.Thread.run(Unknown Source)

Let me know what you think… config problem, or software bug? If it's a bug, I'll try version E before I report it.

Outcomes