• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in scaling the image in linux server

 
Ramesh Rangaram
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In java web application when an image is uploaded, it will be scaled and stored in the database(Blob). when we are scaling image using Java api we are getting the NoClassDefFoundError for the XToolKit. we are getting this error occasionally.

the details of the application are:

OS: Red Hat Enterprise Linux
Java Version : 1.6.0_04
App Server: JBOSS- 4.2.2.GA
Platform: Liferay Portal Server 5.0.1
Database: Oracle 10G
Liferay Portal Server 5.0.1

The Exception trace is copied below.
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
java.awt.Toolkit$2.run(Toolkit.java:836)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:828)
java.awt.Image.getScaledInstance(Image.java:160)
com.liferay.portal.image.ImageProcessorImpl.scale(ImageProcessorImpl.java:216)
com.liferay.portal.kernel.image.ImageProcessorUtil.scale(ImageProcessorUtil.java:79)
com.liferay.portlet.imagegallery.service.impl.IGImageLocalServiceImpl.saveScaledImage(IGImageLocalServiceImpl.java:579)
com.liferay.portlet.imagegallery.service.impl.IGImageLocalServiceImpl.saveImages(IGImageLocalServiceImpl.java:553)
com.liferay.portlet.imagegallery.service.impl.IGImageLocalServiceImpl.addImage(IGImageLocalServiceImpl.java:173)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy1789.addImage(Unknown Source)
com.liferay.portlet.imagegallery.service.IGImageLocalServiceUtil.addImage(IGImageLocalServiceUtil.java:158)
com.liferay.portal.editor.fckeditor.ConnectorAction.execute(ConnectorAction.java:121)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:163)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:414)
com.liferay.portal.servlet.MainServlet.service(MainServlet.java:684)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
com.liferay.portal.servlet.filters.secure.SecureFilter.doFilter(SecureFilter.java:205)
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.doFilter(AutoLoginFilter.java:142)
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:203)
com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
com.liferay.portal.servlet.filters.sessionid.SessionIdFilter.doFilter(SessionIdFilter.java:81)
com.liferay.portal.servlet.filters.xss.CrossScriptingFilter.doFilter(CrossScriptingFilter.java:29)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


Please help us in resolving this issue.

Thanks in advance
-Ramesh




 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!