JPEG2000: RasterFormatException 'data array too small'

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2009 11:44 AM
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:
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.
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.
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.
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2009 03:39 PM
I suspect it's either a missing mimetype map, or ImageMagick choking on the file format perhaps..?
If it's not personal or commercially sensitive, could you upload the image somewhere please? PM me the URL if you don't want it made public.
Thanks,
Mike
If it's not personal or commercially sensitive, could you upload the image somewhere please? PM me the URL if you don't want it made public.
Thanks,
Mike

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2009 09:55 AM
I'm just using the default pnms that come with jasper - the cats.pnm and water.pnm (linking to copies for your convenience).
I think it's not ImageMagick choking on the file format since the small list-view previews come up just fine. It's just the large previews that are having problems.
I'm currently getting no error-log errors whatsoever on uploading or attempting to view JPEG 2000s, though I'm still getting the "cannot load preview form server" error in Share. I'm going to look through the log4j.properties to see if I can crank up the logging on something. If you happen to know what I should turn up to see more errors, please let me know.
I think it's not ImageMagick choking on the file format since the small list-view previews come up just fine. It's just the large previews that are having problems.
I'm currently getting no error-log errors whatsoever on uploading or attempting to view JPEG 2000s, though I'm still getting the "cannot load preview form server" error in Share. I'm going to look through the log4j.properties to see if I can crank up the logging on something. If you happen to know what I should turn up to see more errors, please let me know.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2009 10:40 AM
Ok, I think the problem is that we're assuming Flex could display any image/* mimetype. Obviously this assumption is incorrect, so we would have to add a content transformation step to convert the pnm into png or jpeg in order for it to work in the previewer.
If this is important to you, please raise it as a bug in JIRA and we'll see if we can get it onto the development timeline.
Thanks,
Mike
If this is important to you, please raise it as a bug in JIRA and we'll see if we can get it onto the development timeline.
Thanks,
Mike

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2009 10:31 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2009 11:08 AM
Thanks
Mike
Mike
