why granule = true is causing exception on page load? - sap-commerce-cloud

when granule = true,
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.StackOverflowError
java.lang.StackOverflowError
java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
if granule = false, working fine

increasing jvm stack memory solved the problem.

It is from a legacy code. They used it before and now it is not supported by its developers and hybris. For more reference: Hybris wiki

Related

WebSphere 9.0.5.3 and MyFaces 2.2 with CACHE_EL_EXPRESSIONS

When org.apache.myfaces.CACHE_EL_EXPRESSIONS with value alwaysRecompile is in web.xml, WAR starts but when trying to go to any JSF view, this exception is thrown:
java.lang.NoSuchMethodException: org.apache.myfaces.view.facelets.AbstractFaceletCache.setMemberFactories(javax.faces.view.facelets.FaceletCache$MemberFactory, javax.faces.view.facelets.FaceletCache$MemberFactory)
Any ideas? WebSphere 9 is using MyFaces 2.2. Are there some limitations as compared to "usual" MyFaces 2.2 implementation?
I tested on 9.0.5.6 and also encountered the same error.
java.lang.NoSuchMethodException: org.apache.myfaces.view.facelets.AbstractFaceletCache.setMemberFactories(javax.faces.view.facelets.FaceletCache$MemberFactory, javax.faces.view.facelets.FaceletCache$MemberFactory)
at java.lang.Class.newNoSuchMethodException(Class.java:567)
at java.lang.Class.throwExceptionOrReturnNull(Class.java:1222)
at java.lang.Class.getMethodHelper(Class.java:1308)
at java.lang.Class.getDeclaredMethod(Class.java:936)
at org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.<init>(DefaultFaceletFactory.java:166)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.createFaceletFactory(FaceletViewDeclarationLanguage.java:2233)
I see the code is trying to retrieve the setMemberFactories method with 2 args rather than 3 (as the exception indicates, too).
I'll create an issue and have this issue resolve in the next WAS 9 release cycle. Thanks for discovering this!

How to import a huge list of content in XML into Liferay?

I am new to Liferay. I am working on a task, in that I need to convert the list content in XML to liferay article. In short, I am converting huge list of content into Liferay article.
I have developed a portal, through that I am importing a content into liferay. During importing time,few minutes successfully import the content into liferay. After few minutes, I got below exception. I have tried many times to import, But I failed to import complete content into liferay.
importing:java.lang.ArrayIndexOutOfBoundsException
Aug 27, 2015 9:38:16 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
atcom.liferay.portal.service.permission.PortletPermissionImpl.contains(PortletPermissionImpl.java:305)
atcom.liferay.portal.service.permission.PortletPermissionImpl.contains(PortletPermissionImpl.java:226)
atcom.liferay.portal.service.permission.PortletPermissionImpl.contains(PortletPermissionImpl.java:211)
atcom.liferay.portal.service.permission.PortletPermissionImpl.hasAccessPermission(PortletPermissionImpl.java:436)
atcom.liferay.portal.service.permission.PortletPermissionUtil.hasAccessPermission(PortletPermissionUtil.java:278)
atcom.liferay.portlet.SecurityPortletContainerWrapper.hasAccessPermission(SecurityPortletContainerWrapper.java:344)
atcom.liferay.portlet.SecurityPortletContainerWrapper.check(SecurityPortletContainerWrapper.java:209)
atcom.liferay.portlet.SecurityPortletContainerWrapper.checkRender(SecurityPortletContainerWrapper.java:243)
atcom.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:139)
atcom.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)
atcom.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:156)
atcom.liferay.portal.layoutconfiguration.util.PortletRenderer._render(PortletRenderer.java:125)
atcom.liferay.portal.layoutconfiguration.util.PortletRenderer.access$4(PortletRenderer.java:107)
atcom.liferay.portal.layoutconfiguration.util.PortletRenderer$PortletRendererCallable.doCall(PortletRenderer.java:180)
atcom.liferay.portal.layoutconfiguration.util.PortletRenderer$PortletRendererCallable.doCall(PortletRenderer.java:1)
atcom.liferay.portal.kernel.executor.CopyThreadLocalCallable.call(CopyThreadLocalCallable.java:69)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
atcom.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
atcom.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
at java.lang.Thread.run(Thread.java:745)
09:38:16,735 ERROR [http-bio-9001-exec-134][status_jsp:753] javax.servlet.ServletException: java.util.concurrent.ExecutionException: com.liferay.portal.kernel.portlet.PortletContainerException: com.liferay.portal.kernel.portlet.PortletContainerException: java.lang.NullPointerException
As a workaround of this, you can consider increasing the max queue size:
index.search.writer.max.queue.size=9999999
Also, you can add the following which makes disk writes less often:
lucene.commit.batch.size=10000
lucene.commit.time.interval=300000
You can consider referring this defect notes for more information.
Cheers!
AJ
P.S. This is just a possible workaround or tuning thing, but I think there would be a better solution somewhere in case the above is not.

JNPL with ULC 7.0 on Ubuntu throws ZipException

Stacktrace follows below, but first my search results so far:
Somebody ran into a similar problem. Allegedly it was a problem with the ULCAppletPane in ULC 6.1. I am using ULC 7.0, so I guess I can safely forget those links.
Someone else had a similar ZipException with the very same readUTF() method of the InflaterInputStream. The proposed solution was to use readUTF() differently:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4529325
Is ULC using readUTF() wrong? In this similar InflaterInputStream.readUTF() issue on Stackoverflow, the proposed solution is to get the source code and debug the library with exception breakpoint.
java.util.zip.zipexception : unknown compression method
The search results on Stackoverflow (and also on Google) pretty much end there. The best idea I have now is to decompile the closed-source ULC library and debug it. Will I have to do that or can anybody help me with this issue?
[Client]
OS: Linux (3.0.0-32-generic, amd64)
Java: Sun Microsystems Inc. (1.6.0_26)
ULC: ULC Core (20206)
[Stacktrace]
com.ulcjava.base.client.ConnectorException: I/O exception has been thrown.
at com.ulcjava.container.servlet.client.ServletConnector.a(ServletConnector.java:81)
at com.ulcjava.container.servlet.client.ServletConnector.b(ServletConnector.java:41)
at com.ulcjava.container.servlet.client.ServletConnector.start(ServletConnector.java:88)
at com.ulcjava.base.client.UISession.startConnector(UISession.java:133)
at com.ulcjava.base.client.launcher.DefaultSessionStateListener.sessionStarted(DefaultSessionStateListener.java:13)
at com.ulcjava.base.client.UISession.a(UISession.java:114)
at com.ulcjava.base.client.UISession.access$16(UISession.java:92)
at com.ulcjava.base.client.UISession$0.run(UISession$0.java:6)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(FilteringEventQueue.java:55)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: com.ulcjava.container.servlet.client.IOConnectorCommandException: I/O exception has been thrown.
at com.ulcjava.container.servlet.client.ConnectorCommand.execute(ConnectorCommand.java:37)
at com.ulcjava.container.servlet.client.ServletConnector.executeCommand(ServletConnector.java:22)
at com.ulcjava.container.servlet.client.ServletConnector.a(ServletConnector.java:104)
... 22 more
Caused by: java.util.zip.ZipException: unknown compression method
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
at java.io.DataInputStream.readByte(DataInputStream.java:248)
at com.ulcjava.base.shared.internal.UlcDataInputStream.readByte(UlcDataInputStream.java:4)
at com.ulcjava.base.shared.internal.UlcObjectInputStream.a(UlcObjectInputStream.java:67)
at com.ulcjava.base.shared.internal.UlcObjectInputStream.readObject(UlcObjectInputStream.java:78)
at com.ulcjava.container.servlet.client.AbstractBasicAuthenticationCommand.handleResponse(AbstractBasicAuthenticationCommand.java:8)
at com.ulcjava.container.servlet.client.ConnectorCommand.execute(ConnectorCommand.java:53)
... 24 more

AsyncSupportListenerAdapter primefaces exception

I am new at jsf , and i am trying to do some examples usinf primefaces and when i try to run this one ,
http://www.primefaces.org/showcase-labs/push/chat.jsf
i am getting an exception like this.
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/primefaces] threw exception [org/atmosphere/cpr/AsyncSupportListenerAdapter] with root cause
java.lang.ClassNotFoundException: org.atmosphere.cpr.AsyncSupportListenerAdapter
I think i have to have an atmosphere jar file but i am not sure. Any suggestions woulde be very helpful.
This one helps me to solve my problem.
https://github.com/Atmosphere/atmosphere/wiki/Structure-of-an-Atmosphere%27s-Application

HeadlessException using docx4j xhtmlrenderer on RedHat server

I'm getting a java.awt.HeadlessException when using a Docx4jReplacedElementFactory on a RedHat server. Does anyone know of a workaround for this? (other than running Xvfb)
I've drilled in to the stack trace and the source of the problem is java.awt.GraphicsEnvironment.getDefaultScreenDevice(), which throws the exception when running in a headless environment. This is as documented: "throws: HeadlessException - if isHeadless() returns true" (see comment on java.awt.HeadlessException thrown from HeadlessGraphicsEnvironment.getDefaultScreenDevice).
Given getDefaultScreenDevice is working as specified, is there another approach when using docx4j that avoids going there?
Looking at the source of org.docx4j.org.xhtmlrenderer.util.ImageUtil.getGraphicsConfiguration, we see:
private static GraphicsConfiguration getGraphicsConfiguration() {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-> GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gs.getDefaultConfiguration();
return gc;
}
Stack trace:
Cause details:
java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:82)
at org.docx4j.org.xhtmlrenderer.util.ImageUtil.getGraphicsConfiguration(ImageUtil.java:119)
at org.docx4j.org.xhtmlrenderer.util.ImageUtil.makeCompatible(ImageUtil.java:70)
at org.docx4j.org.xhtmlrenderer.swing.AWTFSImage.createImage(AWTFSImage.java:38)
at org.docx4j.org.xhtmlrenderer.swing.NaiveUserAgent.createImageResource(NaiveUserAgent.java:197)
at org.docx4j.org.xhtmlrenderer.swing.NaiveUserAgent.getImageResource(NaiveUserAgent.java:167)
at org.docx4j.org.xhtmlrenderer.docx.Docx4jReplacedElementFactory.createReplacedElement(Docx4jReplacedElementFactory.java:57)
[snip]
You could apply this recent upstream patch

Resources