Foren

java.awt.image.RasterFormatException: Incorrect scanline stride: 32

chinh vu, geändert vor 10 Jahren.

java.awt.image.RasterFormatException: Incorrect scanline stride: 32

New Member Beiträge: 2 Beitrittsdatum: 29.05.13 Neueste Beiträge
Hi,

Would you please let me know if you ever encounter this exception yet? I've tried to use "Zoe Health care" template in window7 and it works fine. However, I can't deployed this template to "Ubuntu Server v12 or v13", here is the exception i got:
java.awt.image.RasterFormatException: Incorrect scanline stride: 32
at sun.awt.image.ByteComponentRaster.verify(ByteComponentRaster.java:894)
at sun.awt.image.ByteComponentRaster.<init>(ByteComponentRaster.java:201)
at sun.awt.image.ByteInterleavedRaster.<init>(ByteInterleavedRaster.java:191)
at sun.awt.image.ByteInterleavedRaster.<init>(ByteInterleavedRaster.java:113)
at java.awt.image.Raster.createWritableRaster(Raster.java:980)
at javax.media.jai.RecyclingTileFactory.createTile(RecyclingTileFactory.java:392)
at javax.media.jai.PlanarImage.createWritableRaster(PlanarImage.java:1982)
at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:771)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:962)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
at com.sun.imageio.plugins.gif.GIFImageWriter.writeRasterData(GIFImageWriter.java:916)
at com.sun.imageio.plugins.gif.GIFImageWriter.writeImage(GIFImageWriter.java:813)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:721)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:511)
at javax.imageio.ImageWriter.write(ImageWriter.java:615)
at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
at javax.imageio.ImageIO.write(ImageIO.java:1578)
at com.liferay.portal.image.ImageToolImpl.encodeGIF(ImageToolImpl.java:78)
at com.liferay.portal.kernel.image.ImageToolUtil.encodeGIF(ImageToolUtil.java:40)
at com.liferay.portal.image.SpriteProcessorImpl.generate(SpriteProcessorImpl.java:221)
at com.liferay.portal.kernel.image.SpriteProcessorUtil.generate(SpriteProcessorUtil.java:39)
at com.liferay.portal.service.impl.ThemeLocalServiceImpl._setSpriteImages(ThemeLocalServiceImpl.java:774)
at com.liferay.portal.service.impl.ThemeLocalServiceImpl._setSpriteImages(ThemeLocalServiceImpl.java:743)
at com.liferay.portal.service.impl.ThemeLocalServiceImpl._readThemes(ThemeLocalServiceImpl.java:717)
at com.liferay.portal.service.impl.ThemeLocalServiceImpl.init(ThemeLocalServiceImpl.java:259)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
at com.sun.proxy.$Proxy96.init(Unknown Source)
at com.liferay.portal.service.ThemeLocalServiceUtil.init(ThemeLocalServiceUtil.java:114)
at com.liferay.portal.deploy.hot.ThemeHotDeployListener.doInvokeDeploy(ThemeHotDeployListener.java:90)
at com.liferay.portal.deploy.hot.ThemeHotDeployListener.invokeDeploy(ThemeHotDeployListener.java:45)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:216)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

Even it said "20:42:35,190 INFO [pool-2-thread-1][ThemeHotDeployListener:105] 0 themes for zoe-healthcare-theme are available for use", but when I checked on the the site pages the "Zoe Health Care" theme never show up

thanks in advance for your help,

Chinh
thumbnail
Huage Chen, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

Junior Member Beiträge: 33 Beitrittsdatum: 18.03.13 Neueste Beiträge
I confirm that I have the same problem. Hope that somebody can help.

Huage
thumbnail
Amos Fong, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
Sounds like it's this issue here:
http://issues.liferay.com/browse/LPS-37433

Which java version are you using? Try java 6 if you're on 7.
thumbnail
Adolfo Benedetti, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

Junior Member Beiträge: 45 Beitrittsdatum: 04.06.09 Neueste Beiträge
this should be a blocking issue, with java 6 as well;
How can we deploy themes without a consistent gif encoder?

java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-456-11M4508)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-456, mixed mode)
thumbnail
James Falkner, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

Liferay Legend Beiträge: 1399 Beitrittsdatum: 17.09.10 Neueste Beiträge
Adolfo Benedetti:
this should be a blocking issue, with java 6 as well;
How can we deploy themes without a consistent gif encoder?

java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-456-11M4508)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-456, mixed mode)


After looking at this for a while, we've concluded that a recent JDK/JRE update (Java 6 build 51 and later, and Java 7 as well, though I'm not sure which update) has changed the way in which the JRE libraries process images, which code in Liferay was not prepared to deal with. Certain types of PNGs wreak havoc with some code in Liferay. In other words, it's a bug emoticon

The workaround is to remove or replace the following files (ideally before you start up Liferay for the first time):


./ROOT/html/themes/_unstyled/images/calendar/calendar_drop_shadow.png
./ROOT/html/themes/classic/images/calendar/calendar_drop_shadow.png
./welcome-theme/images/calendar/calendar_drop_shadow.png


If you remove them, of course, your calendar would likely be missing a shadow effect. If you elect to replace them, you can just open the file with your favorite image editor and re-save it using the RGBA color space (as opposed to the "gray+alpha" color space, which is what is screwing up some calculations in Liferay code).
thumbnail
Matthieu Levesque, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

Junior Member Beiträge: 64 Beitrittsdatum: 13.02.09 Neueste Beiträge
I think I found a solution for this bug in the SDK.

I started a brand new theme this morning and I had the error. i couldn't deploy the new, currently empty theme at all. Our environement was using Java 1.6.0_51 with Liferay 6.1.20 GA2.

I simply tried to add a liferay-look-and-feel.xml in the WEB-INF directory like the old SDK did.


<!--?xml version="1.0"?-->


<look-and-feel>
        <compatibility>
                <version>6.1.10+</version>
        </compatibility>
        <theme id="<THEME ID>" name="<THEME NAME>">
        </theme>
</look-and-feel>


Deployed the theme and Liferay installed it without the Incorrect scanline stride: 32 error.

Hope this can help others, this bug can be quite frustrating. emoticon

Can someone confirm this workaround/bug?
Adam C, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

Junior Member Beiträge: 70 Beitrittsdatum: 13.06.07 Neueste Beiträge
Matthieu Levesque:


I simply tried to add a liferay-look-and-feel.xml in the WEB-INF directory like the old SDK did.


<!--?xml version="1.0"?-->


<look-and-feel>
        <compatibility>
                <version>6.1.10+</version>
        </compatibility>
        <theme id="<THEME ID>" name="<THEME NAME>">
        </theme>
</look-and-feel>



This solution worked for me and seems like a better workaround compared having to remove the PNG files. Thanks!
thumbnail
rolli <%%>, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

New Member Beitrag: 1 Beitrittsdatum: 13.10.10 Neueste Beiträge
Hi,

When I look to the web-inf folder there is still a liferay-look-and-feel.xlm existing with the correct content. Unfortunately I still geht the same error. The only difference is the compatibility version but this shouldn't caus an error, should it?

Best Regards

Rolf
Yuvraj Singh, geändert vor 8 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

New Member Beiträge: 10 Beitrittsdatum: 01.04.15 Neueste Beiträge
Matthieu Levesque:
I think I found a solution for this bug in the SDK.

I started a brand new theme this morning and I had the error. i couldn't deploy the new, currently empty theme at all. Our environement was using Java 1.6.0_51 with Liferay 6.1.20 GA2.

I simply tried to add a liferay-look-and-feel.xml in the WEB-INF directory like the old SDK did.


<!--?xml version="1.0"?-->


<look-and-feel>
        <compatibility>
                <version>6.1.10+</version>
        </compatibility>
        <theme id="<THEME ID>" name="<THEME NAME>">
        </theme>
</look-and-feel>


Deployed the theme and Liferay installed it without the Incorrect scanline stride: 32 error.

Hope this can help others, this bug can be quite frustrating. emoticon

Can someone confirm this workaround/bug?


This solution worked for me. I am currently using liferay-portal-6.1.1-ce-ga2

Had to remove "<" and ">" from "<THEME ID>" and <THEME NAME> though.

Thanks for this quick fix!
Sandeep Singh, geändert vor 10 Jahren.

RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32

New Member Beiträge: 4 Beitrittsdatum: 02.12.11 Neueste Beiträge
Hi James

Thanks .... it worked for me ..........no errors at startup

After removing the following files:
"
./ROOT/html/themes/_unstyled/images/calendar/calendar_drop_shadow.png
./ROOT/html/themes/classic/images/calendar/calendar_drop_shadow.png
./welcome-theme/images/calendar/calendar_drop_shadow.png
"
Thanks
Sandeep