Question

I am trying to deploy my theme which is developed on liferay-plugins-sdk-6.1.0-ce to liferay-portal-6.1.2-ga3-ce.

My liferay is running on jre 1.7 update 51

The following errors are observed in the console..

Listener:89] Registering themes for xyz-theme

java.awt.image.RasterFormatException: Incorrect scanline stride: 4
        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.PlanarImage.copyData(PlanarImage.java:2343)
        at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299)
        at javax.media.jai.RenderedImageAdapter.copyData(RenderedImageAdapter.java:163)
        at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525)
        at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546)
        at com.liferay.portal.image.ImageToolImpl.getBufferedImage(ImageToolImpl.java:152)

        at com.liferay.portal.image.ImageToolImpl.encodeGIF(ImageToolImpl.java:85)
        at sun.reflect.GeneratedMethodAccessor229.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandl
er.java:88)
        at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler
.java:56)
        at com.sun.proxy.$Proxy35.encodeGIF(Unknown Source)
        at com.liferay.portal.kernel.image.ImageToolUtil.encodeGIF(ImageToolUtil.java:40)
        at com.liferay.portal.image.SpriteProcessorImpl.generate(SpriteProcessorImpl.java:
224)
        at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandl
er.java:88)
        at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler
.java:56)
        at com.sun.proxy.$Proxy36.generate(Unknown Source)
        at com.liferay.portal.kernel.image.SpriteProcessorUtil.generate(SpriteProcessorUti
l.java:39)
        at com.liferay.portal.service.impl.ThemeLocalServiceImpl._setSpriteImages(ThemeLoc
alServiceImpl.java:785)
        at com.liferay.portal.service.impl.ThemeLocalServiceImpl._readThemes(ThemeLocalSer
viceImpl.java:728)
        at com.liferay.portal.service.impl.ThemeLocalServiceImpl.init(ThemeLocalServiceImp
l.java:268)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMe
thodInvocation.java:117)
        at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(Defaul
tTransactionExecutor.java:62)
        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(Transaction
Interceptor.java:52)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMe
thodInvocation.java:113)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvic
e.java:56)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMe
thodInvocation.java:113)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvic
e.java:56)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMe
thodInvocation.java:113)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvic
e.java:56)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMe
thodInvocation.java:113)
        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvic
e.java:56)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMe
thodInvocation.java:113)
        at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.ja
va:218)
        at com.liferay.portal.security.pacl.PACLInvocationHandler.doInvoke(PACLInvocationH
andler.java:62)
        at com.liferay.portal.security.pacl.PACLInvocationHandler.invoke(PACLInvocationHan
dler.java:51)
        at com.sun.proxy.$Proxy188.init(Unknown Source)
        at com.liferay.portal.service.ThemeLocalServiceUtil.init(ThemeLocalServiceUtil.jav
a:114)
        at com.liferay.portal.deploy.hot.ThemeHotDeployListener.doInvokeDeploy(ThemeHotDep
loyListener.java:92)
        at com.liferay.portal.deploy.hot.ThemeHotDeployListener.invokeDeploy(ThemeHotDeplo
yListener.java:46)
        at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.jav
a:195)
        at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:
97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandl
er.java:88)
        at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler
.java:56)
        at com.sun.proxy.$Proxy30.fireDeployEvent(Unknown Source)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUti
l.java:27)
        at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginC
ontextListener.java:164)
        at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginCont
extListener.java:154)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecyc
le.java:44)
        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(Base
PortalLifecycle.java:54)
        at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(Plug
inContextListener.java:116)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:488
7)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:538
1)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3926)
        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1271)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1440)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.j
ava:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90
)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:137
4)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChil
dren(ContainerBase.java:1530)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChil
dren(ContainerBase.java:1540)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Contain
erBase.java:1519)
        at java.lang.Thread.run(Thread.java:744)
08:55:09,733 INFO  [ContainerBackgroundProcessor[StandardEngine[Catalina]]][ThemeHotDeploy
[ThemeHotDeployListener:107] 0 themes for xyz-theme are available for use

The liferay-version information is properly updated in liferay-look-and-feel.xml and liferay-plugin-package.properties files(I have set it to 6.1.2)

This might be due to the jre version because, my theme was deployed successfully on liferay running on jre 1.6 update 26

My requirement is I have to deploy my theme on liferay that is running on jre 1.7 update 51

can any one please help me out in resolving this issue!!

Was it helpful?

Solution

You seem to be running into https://support.liferay.com/browse/LPS-37433 - that one is supposed to be fixed in the version you're running, but look at the related issues: There's one called "Final Fix":

Some JDK update has changed the way PNG files are processed and Liferay has an offending png image (you might add your own ones). The easiest way to fix this is to understand the issue and change the relevant PNGs manually to some that can be processed by java.

Unfortunately hunting down the png is a bit harder than necessary. As you're developing your theme, you might want to run Liferay in a debugger and configure a breakpoint on any trigger of the exception you see. Then you'll find the relevant filename if you move up the stack and inspect parameter names in the debugger. Or, try the calendar-dropshadow image that's mentioned in the linked ticket first.

OTHER TIPS

I don't know what is fail of your theme, but here is my liferay-look-and-feel.xml

<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.0.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_0_0.dtd">

<look-and-feel>
    <compatibility>
        <version>6.1.1+</version>
    </compatibility>
    <theme id="MyTheme" name="MyTheme">
    </theme>
</look-and-feel>

and here the liferay-plugin-package.properties

name=MyTheme
module-group-id=liferay
module-incremental-version=1
tags=
short-description=
change-log=
page-url=http://mydomain
author=Ani
licenses=open
# 6.1.1 is 6.1.1 CE GA2 | 6.1.20+ is 6.1.2 EE GA2
liferay-versions=6.1.1,6.1.20+
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top