Jboss AS 7.1.1 ejb 3 : EJB pool error - linux

We have an application running on Jboss AS 7.1.1 and uses EJB 3. We are intermittently seeing the following errors
javax.ejb.EJBException: JBAS014516: Failed
to acquire a permit within 5 MINUTES
at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:109)
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:8
0)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java
:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)
at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
Below is the configuration for the EJB subsystem in the standalone.xml
<subsystem xmlns="urn:jboss:domain:ejb3:1.2">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
<stateful default-access-timeout="5000" cache-ref="simple"/>
<singleton default-access-timeout="5000"/>
</session-bean>
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="40" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
<strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
<caches>
<cache name="simple" aliases="NoPassivationCache"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
</caches>
<passivation-stores>
<file-passivation-store name="file"/>
</passivation-stores>
<async thread-pool-name="default"/>
<timer-service thread-pool-name="default">
<data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
</timer-service>
<remote connector-ref="remoting-connector" thread-pool-name="default"/>
<thread-pools>
<thread-pool name="default">
<max-threads count="10"/>
<keepalive-time time="100" unit="milliseconds"/>
</thread-pool>
</thread-pools>
</subsystem>
<subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
<cache-container name="hibernate" default-cache="local-query">
<local-cache name="entity">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="local-query">
<transaction mode="NONE"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="timestamps">
<transaction mode="NONE"/>
<eviction strategy="NONE"/>
</local-cache>
</cache-container>
</subsystem>
We are trying to troubleshoot what may be causing this issue and a fix for it.

This happens, when the configured EJB pool is exhausted - means that all EJBs are currently "in use" (=processing). Look for long running invocations within your EJBs. It seems that the invocations take longer than 5 minutes in your case.

Related

MaxHeaderCountExceededException: Illegal attempt to exceed the configured maximum number of headers: 100

I'm required to force HTTPS in my web application so I did the following 2 thing in my web.xml configuration:
<security-constraint>
<web-resource-collection>
<web-resource-name>*</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<session-config>
<session-timeout>10</session-timeout>
<cookie-config>
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
When I deploy the webapp on glassfish 5 (which is the container where the webapp should run) I get a series of errors as if the application has entered into a loop during the servlet filters chain.
The exceptions I can identify are:
UPDATE the stack is the following
[glassfish 5.0] [SEVERE] [] [org.glassfish.grizzly.http2.Http2ServerFilter] [tid: _ThreadID=45 _ThreadName=http-listener-2(2)] [timeMillis: 1519314445367] [levelValue: 1000] [[
Unable to push resource identified by path [/demat/svz]]]
[glassfish 5.0] [SEVERE] [] [org.glassfish.grizzly.http2.Http2ServerFilter] [tid: _ThreadID=48 _ThreadName=http-listener-2(5)] [timeMillis: 1519314445367] [levelValue: 1000] [[
Unable to push resource identified by path [/demat/javax.faces.resource/core.js.jsf?ln=primefaces&v=6.1.2.NLC]]]
[glassfish 5.0] [SEVERE] [] [org.glassfish.grizzly.http2.Http2ServerFilter] [tid: _ThreadID=45 _ThreadName=http-listener-2(2)] [timeMillis: 1519314445367] [levelValue: 1000] [[
[glassfish 5.0] [SEVERE] [] [org.glassfish.grizzly.http2.Http2ServerFilter] [tid: _ThreadID=46 _ThreadName=http-listener-2(2)] [timeMillis: 1519144903315] [levelValue: 1000] [[
org.glassfish.grizzly.http2.Http2StreamException streamId=4474 errorCode=REFUSED_STREAM
at org.glassfish.grizzly.http2.Http2Session.openStream(Http2Session.java:1116)
at org.glassfish.grizzly.http2.Http2ServerFilter.doPush(Http2ServerFilter.java:994)
at org.glassfish.grizzly.http2.Http2ServerFilter.handleEvent(Http2ServerFilter.java:626)
at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:952)
at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:934)
at org.apache.catalina.core.ApplicationPushBuilder.push(ApplicationPushBuilder.java:367)
at com.sun.faces.context.ExternalContextImpl.pushIfPossibleAndNecessary(ExternalContextImpl.java:704)
at com.sun.faces.context.ExternalContextImpl.encodeResourceURL(ExternalContextImpl.java:662)
at javax.faces.context.ExternalContextWrapper.encodeResourceURL(ExternalContextWrapper.java:164)
at com.sun.faces.renderkit.html_basic.ScriptStyleBaseRenderer.encodeEnd(ScriptStyleBaseRenderer.java:246)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912)
at com.sun.faces.renderkit.RenderKitUtils.renderJsfJsIfNecessary(RenderKitUtils.java:1203)
at com.sun.faces.renderkit.html_basic.CommandLinkRenderer.encodeBegin(CommandLinkRenderer.java:117)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1903)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:309)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:309)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908)
org.glassfish.grizzly.http.util.MimeHeaders$MaxHeaderCountExceededException: Illegal attempt to exceed the configured maximum number of headers: 100
at org.glassfish.grizzly.http.util.MimeHeaders.createHeader(MimeHeaders.java:466) ~[nucleus-grizzly-all.jar:?]
at org.glassfish.grizzly.http.util.MimeHeaders.addValue(MimeHeaders.java:507) ~[nucleus-grizzly-all.jar:?]
at org.apache.catalina.core.ApplicationPushBuilder.<init>(ApplicationPushBuilder.java:222) ~[web-core.jar:?]
at org.apache.catalina.connector.Request.newPushBuilder(Request.java:2609) ~[web-core.jar:?]
at org.apache.catalina.connector.RequestFacade.newPushBuilder(RequestFacade.java:1167) ~[web-core.jar:?]
at com.sun.faces.context.ExternalContextImpl.getPushBuilder(ExternalContextImpl.java:728) ~[javax.faces.jar:2.3.2]
at com.sun.faces.context.ExternalContextImpl.pushIfPossibleAndNecessary(ExternalContextImpl.java:701) ~[javax.faces.jar:2.3.2]
at com.sun.faces.context.ExternalContextImpl.encodeResourceURL(ExternalContextImpl.java:662) ~[javax.faces.jar:2.3.2]
at com.sun.faces.el.ResourceELResolver.getValue(ResourceELResolver.java:143) ~[javax.faces.jar:2.3.2]
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:180) ~[javax.faces.jar:2.3.2]
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:208) ~[javax.faces.jar:2.3.2]
at com.sun.el.parser.AstValue.getValue(AstValue.java:139) ~[javax.el.jar:3.0.1-b08]
at com.sun.el.parser.AstValue.getValue(AstValue.java:203) ~[javax.el.jar:3.0.1-b08]
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) ~[javax.el.jar:3.0.1-b08]
at org.jboss.weld.module.web.el.WeldValueExpression.getValue(WeldValueExpression.java:50) ~[weld-osgi-bundle.jar:3.0.0.Final]
at com.sun.faces.application.resource.ResourceHelper$ELEvaluatingInputStream.evaluateExpressionIntoBuffer(ResourceHelper.java:832) ~[javax.faces.jar:2.3.2]
at com.sun.faces.application.resource.ResourceHelper$ELEvaluatingInputStream.readExpressionIntoBufferAndEvaluateIntoBuffer(ResourceHelper.java:755) ~[javax.faces.jar:2.3.2]
at com.sun.faces.application.resource.ResourceHelper$ELEvaluatingInputStream.read(ResourceHelper.java:719) ~[javax.faces.jar:2.3.2]
at java.io.InputStream.read(InputStream.java:179) ~[?:1.8.0_121]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[?:1.8.0_121]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) ~[?:1.8.0_121]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345) ~[?:1.8.0_121]
at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:385) ~[?:1.8.0_121]
at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:345) ~[javax.faces.jar:2.3.2]
at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:178) ~[javax.faces.jar:2.3.2]
at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87) ~[primefaces-6.1.2.SIA.jar:?]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:667) ~[javax.faces.jar:2.3.2]
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580) ~[web-core.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:338) ~[web-core.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[web-core.jar:?]
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100) ~[primefaces-6.1.2.SIA.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250) ~[web-core.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[web-core.jar:?]
Since JSF 2.3, CSS/JS resources will automatically be pushed to server when both server and client support HTTP/2 protocol and connection goes over SSL (HTTPS). You can clearly see this back in class and method names of this part of the stack trace:
at com.sun.faces.context.ExternalContextImpl.pushIfPossibleAndNecessary(ExternalContextImpl.java:704)
at com.sun.faces.context.ExternalContextImpl.encodeResourceURL(ExternalContextImpl.java:662)
at javax.faces.context.ExternalContextWrapper.encodeResourceURL(ExternalContextWrapper.java:164)
at com.sun.faces.renderkit.html_basic.ScriptStyleBaseRenderer.encodeEnd(ScriptStyleBaseRenderer.java:246)
However, in your specific case, the JSF page in question apparently has so many CSS/JS resources that it exceeds the server-configured limit of 100 response header entries.
org.glassfish.grizzly.http.util.MimeHeaders$MaxHeaderCountExceededException: Illegal attempt to exceed the configured maximum number of headers: 100
Given these facts, there are several solutions:
Decrease the amount of CSS/JS resources. Frankly, ~100 CSS/JS resources is insane. Consider combining them, if necessary with help of OmniFaces CombinedResourceHandler.
Configure GlassFish to allow more than 100 headers. This can be done via asadmin in commandline. Below is an example which increases it to 200 and assumes that the name of the HTTP listener being used is http-listener-1 (you can also find it in Admin console app).
set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.max-response-headers=200
Explicitly disable pushing CSS/JS resources by the below Mojarra-specific trick.
#FacesConfig
#ApplicationScoped
public class Config {
#Inject
private FacesContext context;
public void viewInitialized(#Observes #Initialized(ViewScoped.class) UIViewRoot view) {
context.getAttributes().put("com.sun.faces.ExternalContextImpl.PUSH_SUPPORTED", false);
}
}
This is indeed somewhat hacky, but that's because there's no explicit support for disabling this via e.g. a web.xml context parameter. Note that #FacesConfig is necessary in order to be able to #Inject the FacesContext, and that it suffices to have only one annotation of it application-wide. Otherwise you can still grab FacesContext#getCurrentInstance().
I solved it by disabling HTTP/2. For some reason, the number of resources pushed to the browser doesn't matter but for so long as I kept HTTP/2 enabled it was creating the above mentioned errors (those mentioned in the question).
To disable HTTP/2 execute the following command in asadmin:
> asadmin set server.network-config.protocols.protocol.http-listener-2.http.http2-enabled=false
Or in your domain.xml
<protocol name="http-listener-2" security-enabled="true">
<http http2-enabled="false" max-connections="250" compression="on" default-virtual-server="server">
<file-cache></file-cache>
</http>
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
</protocol>

SLF4J and JUL(java.util.logging) is not working on IBM Domino

I am trying to get SLF4J and JUL working on domino for logging. I have created a custom handler called 'DominoGraphHandler' to write logs to the database. When the code is invoked through Xpages, it throws an exception. SLF4J and log4J combination also did not work. Is there a way to get the SLF4J working on domino. Following is the sample code and the exception details.
public void testJUL()
{
java.util.logging.Logger jLogger = java.util.logging.Logger.getLogger("com.app.log");
jLogger.setLevel(Level.WARNING);
jLogger.addHandler(new DominoGraphHandler());
jLogger.warning("warning message");
}
Xpages Error Message:
Error 500
HTTP Web Server: Command Not Handled Exception
domino/workspace/logs/error-log-0.xml
<CommonBaseEvent creationTime="2017-11-15T17:41:18.338+05:30" globalInstanceId="ELc0a80aa500015fbf94954000000006" msg="CLFAD0246E: Exception occurred servicing request for: /logging.nsf/log.xsp - HTTP Code: 500" severity="50" version="1.0.1">
<extendedDataElements name="CommonBaseEventLogRecord:level" type="noValue">
<children name="CommonBaseEventLogRecord:name" type="string">
<values>SEVERE</values>
</children>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceClassName" type="string">
<values>com.ibm.domino.xsp.bridge.http.engine.XspCmdManager</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:sourceMethodName" type="string">
<values>service</values>
</extendedDataElements>
<extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string">
<values>java.lang.RuntimeException: com.ibm.xsp.FacesExceptionEx: java.lang.NoClassDefFoundError: com.sun.faces.config.ConfigureListener (initialization failure)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.initModule(ComponentModule.java:461)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.initModule(NSFComponentModule.java:498)
at com.ibm.domino.xsp.module.nsf.NSFService.createNSFModule(NSFService.java:752)
at com.ibm.domino.xsp.module.nsf.NSFService.loadModule(NSFService.java:735)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:588)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: </values>
<values>com.ibm.xsp.FacesExceptionEx: java.lang.NoClassDefFoundError: com.sun.faces.config.ConfigureListener (initialization failure)
at com.ibm.xsp.config.CLBootStrap.initContext(CLBootStrap.java:89)
at com.ibm.xsp.config.BootStrap.init(BootStrap.java:82)
at com.ibm.xsp.config.ConfigureCoreListener.contextInitialized(ConfigureCoreListener.java:39)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.initModule(ComponentModule.java:453)
... 8 more
Caused by: java.lang.NoClassDefFoundError: com.sun.faces.config.ConfigureListener (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:182)
at com.ibm.xsp.util.Delegation.newInstance(Delegation.java:80)
at com.ibm.xsp.util.Delegation.getImplementation(Delegation.java:68)
at com.ibm.xsp.config.CLBootStrap.getListener(CLBootStrap.java:150)
at co</values>
<values>m.ibm.xsp.config.CLBootStrap.initContext(CLBootStrap.java:81)
... 11 more
</values>
</extendedDataElements>
<sourceComponentId component="Expeditor 6.2" componentIdType="ProductName" instanceId="" location="pilotdev5" locationType="Hostname" subComponent="" threadId="0" componentType="http://www.w3.org/2001/XMLSchema-instance"/>
<situation categoryName="ReportSituation">
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
</situation>
</CommonBaseEvent>

Spring webflow & PrimeFaces expression language - bean method is interpreted as a property in websphere but not tomcat

I have a WebFlow with an input:
<input name="allocationConfig" required="true"/>
which is then used to get the correct controller when searching for a list of stores in a PrimeFaces autocomplete input:
<p:autoComplete completeMethod="#{controllerLookup.get(allocationConfig).searchForStore}" ... />
controllerLookup is a Spring bean that returns a particular controller (which is also a Spring bean) when passed the allocationConfig from the webflow. The controller then returns a list of stores to display in the autocomplete input.
This works fine when I run it on Tomcat, but when it is deployed onto Websphere, I get this error:
javax.el.PropertyNotFoundException: /WEB-INF/flows/manage-allocation/manage-allocation.xhtml #76,97 completeMethod="#{controllerLookup.get(allocationConfig).searchForStore}": Property 'get' not found on type com.web.controller.allocations.ControllerLookup
at com.sun.faces.facelets.el.TagMethodExpression.invoke(Unknown Source)
at org.primefaces.component.autocomplete.AutoComplete.broadcast(AutoComplete.java:459)
at javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
at javax.faces.component.UIViewRoot.processDecodes(Unknown Source)
at org.springframework.faces.webflow.FlowLifecycle.invokePhase(FlowLifecycle.java:88)
at org.springframework.faces.webflow.FlowLifecycle.execute(FlowLifecycle.java:69)
at org.springframework.faces.webflow.JsfView.processUserEvent(JsfView.java:111)
at org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:225)
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:195)
at org.springframework.webflow.engine.Flow.resume(Flow.java:537)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:228)
at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:57)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
at com.pcmsgroup.v21.web.config.AuthFilter.doFilter(AuthFilter.java:46)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:964)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1104)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:914)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1865)
It seems that Websphere is wrongly interpreting controllerLookup.get as a property, whereas Tomcat correctly interprets it as a method.
Any ideas why Tomcat and Websphere are interpreting my EL differently? or how to fix it?
I've come up with a workaround that seems to work so far.
I've changed the signature of the look-up method to be called getController without any parameters. Instead, it obtains the config object from Spring's flow scope:
public AllocationsController getController() {
AllocationConfig config = (AllocationConfig) RequestContextHolder.getRequestContext().getFlowScope().get("allocationConfig");
// Determine the concrete type of controller depending on the config, and return it.
}
and in the tag for the autocomplete input:
<p:autoComplete completeMethod="#{controllerLookup.controller.searchForStore}" ... />

Hazelcast can't deserialize an enum class

I'm having some problems with Hazelcast deserialize. I don't know why it is happening to me.
When I build my project with Maven I can see the next error code:
GRAVE: Failed to execute callback: com.hazelcast.client.proxy.ClientMapProxy$1#382710c7! Request: com.hazelcast.map.impl.client.MapGetRequest#cbe959e, response: HeapData{type=- 25,
hashCode=1128451374, partitionHash=1128451374, dataSize=89, heapCost=117}
com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to deserialize enum: com.grupo.exception.ExceptionCauseEnum
at com.hazelcast.nio.serialization.DefaultSerializers$EnumSerializer.read(DefaultSerializers.java:243)
at com.hazelcast.nio.serialization.DefaultSerializers$EnumSerializer.read(DefaultSerializers.java:225)
at com.hazelcast.nio.serialization.StreamSerializerAdapter.toObject(StreamSerializerAdapter.java:65)
at com.hazelcast.nio.serialization.SerializationServiceImpl.toObject(SerializationServiceImpl.java:260)
at com.hazelcast.client.spi.impl.ClientCallFuture$1.run(ClientCallFuture.java:292)
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:745)
at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
Caused by: java.lang.ClassNotFoundException: com.grupo.exception.ExceptionCauseEnum
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:124)
at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:113)
at com.hazelcast.nio.serialization.DefaultSerializers$EnumSerializer.read(DefaultSerializers.java:241)
... 9 more
ExceptionCauseEnum is in my classpath.
My Hazelcast instance configuration (just in case it is useful):
<hz:hazelcast id="instance">
<hz:config>
<hz:group name="${name}"
password="${pass}" />
<hz:network port="23456"
port-auto-increment="true">
<hz:join>
<hz:multicast
enabled="false"
multicast-group="${multicast-group}"
multicast-port="${multicast-port}" />
<hz:tcp-ip enabled="true">
<hz:interface>127.0.0.1</hz:interface>
</hz:tcp-ip>
</hz:join>
<hz:interfaces enabled="false">
<hz:interface></hz:interface>
</hz:interfaces>
</hz:network>
<hz:map name="myMap" max-size="5000" max-idle-seconds="3600"
time-to-live-seconds="7200" eviction-percentage="25"
eviction-policy="LRU" />
</hz:config>
</hz:hazelcast>
Although Maven throws me that error, it builds correctly.
Any idea what is happening and what am I doing wrong?
Thanks in advance.
I had a similar problem: in my case my enums had a constructor, so my solution was to create a parameterless constructor.

Dispatcher has no subscriber [Spring integration]

I have the following exception:
INFO 2015-01-19 11:00:00 [AbstractCorrelatingMessageHandler] - Expiring MessageGroup with correlationKey[aa7eb738-b47e-3bbe-8aca-282453ae5b29]
ERROR 2015-01-19 11:00:00 [JdbcMessageStore] - Exception in expiry callback
org.springframework.integration.MessageDeliveryException: Dispatcher has no subscribers for channel 'org.springframework.context.support.ClassPathXmlApplicationContext#19e0ff2f.SIEBELDOC_PARK_after_aggregation'.
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:81)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:181)
at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:330)
at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:169)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.sendReplyMessage(AbstractCorrelatingMessageHandler.java:436)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.sendReplies(AbstractCorrelatingMessageHandler.java:429)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.completeGroup(AbstractCorrelatingMessageHandler.java:404)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.completeGroup(AbstractCorrelatingMessageHandler.java:389)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.expireGroup(AbstractCorrelatingMessageHandler.java:371)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.forceComplete(AbstractCorrelatingMessageHandler.java:308)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.access$000(AbstractCorrelatingMessageHandler.java:71)
at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler$1.execute(AbstractCorrelatingMessageHandler.java:137)
at org.springframework.integration.store.AbstractMessageGroupStore.expire(AbstractMessageGroupStore.java:117)
at org.springframework.integration.store.AbstractMessageGroupStore.expireMessageGroups(AbstractMessageGroupStore.java:87)
at org.springframework.integration.store.MessageGroupStoreReaper.run(MessageGroupStoreReaper.java:115)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
That's the flow:
<int:channel id="SIEBELDOC_PARK_job_Channel"/>
<int:channel id="SIEBELDOC_PARK_after_split"/>
<int:channel id="SIEBELDOC_PARK_after_aggregation"/>
<int:inbound-channel-adapter channel="SIEBELDOC_PARK_job_Channel" expression="#parkingGetItems.getItems('SIEBELDOC_PARK')">
<int:poller fixed-rate="${fdl.db.item.polling.rate}"/>
</int:inbound-channel-adapter>
<int:splitter input-channel="SIEBELDOC_PARK_job_Channel" output-channel="SIEBELDOC_PARK_after_split"/>
<int:aggregator input-channel="SIEBELDOC_PARK_after_split" output-channel="SIEBELDOC_PARK_after_aggregation" message-store="SIEBELDOC_PARK_messageStore"
ref="parkingStackMessageAggregator" method="aggregate"
correlation-strategy="parkingStackMessageAggregator"
correlation-strategy-method="correlate"
release-strategy="parkingStackMessageAggregator"
release-strategy-method="release"
send-partial-result-on-expiry="true"
expire-groups-upon-completion="true"
>
</int:aggregator>
<int:chain id="jobexecutor" input-channel="SIEBELDOC_PARK_after_aggregation" >
<int:transformer>
<bean class="hu.telekom.fdl.job.IntegrationMessageToJobRequest"/>
</int:transformer>
<int:service-activator>
<bean class = "hu.telekom.fdl.job.JobLaunchMessageHandler"/>
</int:service-activator>
</int:chain>
I'm using the following reaper and messagestore code:
<int-jdbc:message-store id="SIEBELDOC_PARK_messageStore" region="SIEBELDOC_PARK_GRP" data-source="jobRepoDataSource" table-prefix="INT_" lob-handler="lobHandler"/>
<bean id="SIEBELDOC_PARK_messageStoreReaper" class="org.springframework.integration.store.MessageGroupStoreReaper">
<property name="messageGroupStore" ref="SIEBELDOC_PARK_messageStore" />
<property name="timeout" value="100000" />
</bean>
<task:scheduled-tasks>
<task:scheduled ref="SIEBELDOC_PARK_messageStoreReaper" method="run" cron="* */30 * * * ?"/>
</task:scheduled-tasks>
Can you give me advices what could be the problem?
Thanks,
For me the channel name: org.springframework.context.support.ClassPathXmlApplicationContext#19e0ff2f.SIEBELDOC_PARK_after_aggregation is also strange for me.
The original channel name is: SIEBELDOC_PARK_after_aggregation which is not the same as the channel name referred in the stacktracce.
Ferenc
org.springframework.context.support.ClassPathXmlApplicationContext#19e0ff2f.SIEBELDOC_PARK_after_aggregation is a result of AbstractMessageChannel#getFullChannelName(). As you see we include there an ApplicationContext id.
I may guess, but would be better if you remove that jobexecutor id from the <chain>. There might be another bean in the ctx with the same id. No ?
How does it work if you just send messages to the aggregator for regular releasing? Don't you see the same MessageDeliveryException ?

Resources