Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
chinh vu
java.awt.image.RasterFormatException: Incorrect scanline stride: 32
July 10, 2013 8:10 PM
Answer

chinh vu

Rank: New Member

Posts: 2

Join Date: May 29, 2013

Recent Posts

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
Huage Chen
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
July 11, 2013 2:54 AM
Answer

Huage Chen

LIFERAY STAFF

Rank: Junior Member

Posts: 28

Join Date: March 18, 2013

Recent Posts

I confirm that I have the same problem. Hope that somebody can help.

Huage
Amos Fong
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
July 11, 2013 5:19 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1898

Join Date: October 7, 2008

Recent Posts

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.
Adolfo Benedetti
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
July 12, 2013 3:08 AM
Answer

Adolfo Benedetti

Rank: Junior Member

Posts: 45

Join Date: June 3, 2009

Recent Posts

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)
James Falkner
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
July 29, 2013 7:13 AM
Answer

James Falkner

Community Moderator

Rank: Liferay Legend

Posts: 1406

Join Date: September 17, 2010

Recent Posts

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):

1
2./ROOT/html/themes/_unstyled/images/calendar/calendar_drop_shadow.png
3./ROOT/html/themes/classic/images/calendar/calendar_drop_shadow.png
4./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).
Matthieu Levesque
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
July 29, 2013 8:17 AM
Answer

Matthieu Levesque

Rank: Junior Member

Posts: 62

Join Date: February 13, 2009

Recent Posts

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.

 1
 2<?xml version="1.0"?>
 3<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.1.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd">
 4
 5<look-and-feel>
 6        <compatibility>
 7                <version>6.1.10+</version>
 8        </compatibility>
 9        <theme id="<THEME ID>" name="<THEME NAME>" >
10        </theme>
11</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?
Sandeep Singh
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
August 6, 2013 2:16 PM
Answer

Sandeep Singh

Rank: New Member

Posts: 4

Join Date: December 2, 2011

Recent Posts

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
Adam C
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
September 24, 2013 6:14 AM
Answer

Adam C

Rank: Junior Member

Posts: 70

Join Date: June 13, 2007

Recent Posts

Matthieu Levesque:


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

 1
 2<?xml version="1.0"?>
 3<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.1.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd">
 4
 5<look-and-feel>
 6        <compatibility>
 7                <version>6.1.10+</version>
 8        </compatibility>
 9        <theme id="<THEME ID>" name="<THEME NAME>" >
10        </theme>
11</look-and-feel>



This solution worked for me and seems like a better workaround compared having to remove the PNG files. Thanks!
Rolf R
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
October 30, 2013 12:36 AM
Answer

Rolf R

Rank: New Member

Posts: 1

Join Date: October 13, 2010

Recent Posts

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
RE: java.awt.image.RasterFormatException: Incorrect scanline stride: 32
February 12, 2016 1:50 PM
Answer

Yuvraj Singh

Rank: New Member

Posts: 1

Join Date: April 1, 2015

Recent Posts

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.

 1
 2<?xml version="1.0"?>
 3<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.1.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd">
 4
 5<look-and-feel>
 6        <compatibility>
 7                <version>6.1.10+</version>
 8        </compatibility>
 9        <theme id="<THEME ID>" name="<THEME NAME>" >
10        </theme>
11</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!