ArrayIndexOutOfBoundsException at com.sun.faces.context.flash.ELFlash$PreviousNextFlashInfoManager.decode - jsf

I am trying to run a JSF web application on Payara 5.194.
The whole application is compiled and runs successfully. But after being deployed it gives an error and doesn't load.
I am not able to identify the cause of this error.
Warning: StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.sun.faces.util.ByteArrayGuardAESCTR.decrypt(ByteArrayGuardAESCTR.java:133)
at com.sun.faces.context.flash.ELFlash$PreviousNextFlashInfoManager.decode(ELFlash.java:1390)
at com.sun.faces.context.flash.ELFlash.getCurrentFlashManager(ELFlash.java:1213)
at com.sun.faces.context.flash.ELFlash.doPrePhaseActions(ELFlash.java:617)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:190)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:74)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:109)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1628)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:258)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:755)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:575)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
at java.lang.Thread.run(Thread.java:748)

This is related to invalid flash cookie data. Did you try clearing the cookies?
Also see this bug report which is still open: https://github.com/javaserverfaces/mojarra/issues/4386

Related

java.lang.NullPointerException at org.primefaces.model.chart.BarChartModel.getTicks

I am using Tomcat7 and when I run my server I get this error. I wasn't getting this error it was working fine but all of a sudden this error came up. Web page shows up this error comes up only when I submit the form in the page.
java.lang.NullPointerException
at org.primefaces.model.chart.BarChartModel.getTicks(BarChartModel.java:82)
at org.primefaces.component.chart.renderer.BarRenderer.encodeOptions(BarRenderer.java:81)
at org.primefaces.component.chart.renderer.BasePlotRenderer.render(BasePlotRenderer.java:30)
at org.primefaces.component.chart.ChartRenderer.encodeScript(ChartRenderer.java:98)
at org.primefaces.component.chart.ChartRenderer.encodeEnd(ChartRenderer.java:67)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:282)
at org.richfaces.renderkit.html.TogglePanelItemRenderer.doEncodeChildren(TogglePanelItemRenderer.java:140)
at org.richfaces.renderkit.html.TabRenderer.doEncodeChildren(TabRenderer.java:113)
at org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:158)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:282)
at org.richfaces.renderkit.html.TogglePanelRenderer.doEncodeChildren(TogglePanelRenderer.java:129)
at org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:158)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
After debugging the error I found out that I had used a variable of BarChartModel but accidentally deleted the line where I had set it.
java.lang.NullPointerException
at org.primefaces.model.chart.BarChartModel.getTicks(BarChartModel.java:82
because in your BarChartModel:-
if you are using Map and set the key/value like this:
map.set(key, value);
so, key cannot be null.

java.lang.ClassNotFoundException: org.icefaces.x.context.BridgeFacesContext2

I have developed JSF application using icefaces component but when I am trying to run application I am getting below error.
SEVERE: Problem encountered during View.servePage
java.lang.ClassNotFoundException: org.icefaces.x.context.BridgeFacesContext2
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.icesoft.faces.context.View$2.serve(View.java:68)
at com.icesoft.faces.context.View.servePage(View.java:149)
at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
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)
May 1, 2015 4:58:35 PM org.apache.catalina.core.StandardWrapperValve invoke
Kindly help me to resolve this error.

java.lang.IllegalStateException: Singleton is not set at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton

I was created a JSF application using JBOSS tool and it worked fine.Then I added some libraries to my WEB-INF > lib folder and now it says an error as follows.What is the reason for it?
INFO: Server startup in 7613 ms
Feb 15, 2015 9:45:28 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/ApplicationForm_1] threw exception [Singleton is not set] with root cause
java.lang.IllegalStateException: Singleton is not set
at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52)
at org.jboss.weld.Container.instance(Container.java:54)
at org.jboss.weld.jsf.WeldPhaseListener.instance(WeldPhaseListener.java:161)
at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:98)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:85)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

Neo4j org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out after CDI migration

I migrated a JavaEE JSF application running over GlassFish server from using Managed Beans to using CDI.
Everything works fine, all pages display correctly except a page which uses Neo4j which now returns a
org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out
I chased the problem down to a specific git commit where I change my class LibraryController from being:
#ManagedBean
#SessionScoped
public class LibraryController
{
private GraphStorage graphStorage;
public LibraryController()
{
graphStorage = new GraphStorage();
graphStorage.setUp();
}
}
to
#Named
#SessionScoped
public class LibraryController
{
private GraphStorage graphStorage;
public LibraryController()
{
graphStorage = new GraphStorage();
graphStorage.setUp();
}
}
the timeout error happens when the neo4j changes are committed with tx.finish inside the setUp() method of GraphStorage:
public class GraphStorage
{
private void createNodespace()
{
Transaction tx = graphDb.beginTx();
try
{
Node rootNode = graphDb.createNode();
setGraphRootUUIDString(java.util.UUID.randomUUID().toString());
rootNode.setProperty("uuid", getGraphRootUUIDString());
index.add(rootNode, "uuid", rootNode.getProperty("uuid"));
tx.success();
}
finally
{
tx.finish();
}
}
public void setUp()
{
graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(FILESYSTEM_DB);
indexManager = graphDb.index();
index = indexManager.forNodes("indexNodes");
registerShutdownHook();
createNodespace();
}
}
Notice I have a main method inside GraphStorage which calls the same setUp() and creates the same nodes which runs fine, it seems the CDI somehow breaks the way Neo4j works.
Any hint at how to fix this please?
EDIT:
Ok found out that the main method inside GraphStorage correctly works because it calls the constructor once, while JavaEE CDI calls the constructor of GraphStorage multiple times
due apparently to how CDI is implemented (i.e. proxies). Still dont' know how to fix this
TRACE LOG:
Schwerwiegend: Error Rendering View[documents.xhtml]
javax.el.ELException: documents.xhtml #47,61 value="#{libraryController.root}": org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at org.primefaces.component.api.UITree.getValue(UITree.java:118)
at org.primefaces.component.tree.TreeRenderer.encodeMarkup(TreeRenderer.java:228)
at org.primefaces.component.tree.TreeRenderer.encodeEnd(TreeRenderer.java:185)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:70)
at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:57)
at org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:204)
at org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:121)
at org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:58)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.example.common.utils.AuthenticationFilter.doFilter(AuthenticationFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:744)
Caused by: javax.el.ELException: org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
at javax.el.BeanELResolver.getValue(BeanELResolver.java:368)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
... 59 more
Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
at org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:143)
at com.example.dms.GraphStorage.createNodespace(GraphStorage.java:190)
at com.example.dms.GraphStorage.setUp(GraphStorage.java:405)
at com.example.controllers.LibraryController.<init>(LibraryController.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:79)
at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:63)
at org.jboss.weld.injection.producer.AbstractInstantiator.newInstance(AbstractInstantiator.java:29)
at org.jboss.weld.injection.producer.DefaultInstantiator.newInstance(DefaultInstantiator.java:90)
at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:86)
at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:172)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:157)
at org.jboss.weld.context.ForwardingContextual.create(ForwardingContextual.java:27)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)
at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:64)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:93)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at com.example.controllers.LibraryController$Proxy$_$$_WeldClientProxy.getRoot(Unknown Source)
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 javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
... 66 more
Caused by: org.neo4j.graphdb.TransactionFailureException: commit threw exception
at org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:432)
at org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:344)
at org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:134)
at org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:127)
... 91 more
Caused by: javax.transaction.xa.XAException
at org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:576)
at org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:394)
... 94 more
Caused by: java.lang.RuntimeException: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock#/home/antonio.test/glassfish-4.0/glassfish/domains/domain1/config/target/dms-db/index/lucene/node/indexNodes/write.lock
at org.neo4j.index.impl.lucene.LuceneDataSource.newIndexWriter(LuceneDataSource.java:718)
at org.neo4j.index.impl.lucene.LuceneDataSource.syncGetIndexSearcher(LuceneDataSource.java:596)
at org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:560)
at org.neo4j.index.impl.lucene.CommitContext.ensureWriterInstantiated(CommitContext.java:58)
at org.neo4j.index.impl.lucene.LuceneCommand$AddCommand.perform(LuceneCommand.java:188)
at org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:286)
at org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:322)
at org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.commit(XaResourceManager.java:489)
at org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.commit(XaResourceHelpImpl.java:64)
at org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:570)
... 95 more
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock#/home/antonio.test/glassfish-4.0/glassfish/domains/domain1/config/target/dms-db/index/lucene/node/indexNodes/write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:84)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1098)
at org.neo4j.index.impl.lucene.LuceneDataSource.newIndexWriter(LuceneDataSource.java:707)
... 104 more
Beans called twice as you found out is normal behaviour, the first creation is the Weld container creating a scoped proxy of the bean so that the scoped proxy, which extends your bean, gets injected whenever some other component needs your bean.
Now for the solution you should avoid putting logic in the constructor and put it instead in a PostConstructor which behaves as you would expect it to, so you would change your code to look something like:
#PostConstruct
void postConstruct()
{
graphStorage = new GraphStorage();
graphStorage.setUp();
}

JSF + JBOSS 6.0 + Linux + java.lang.IllegalArgumentException: null source

We are using Jboss 6.1.0 in our local Windows development environment using faces version 2.1.19. The application that we use works perfectly fine. However, when we promote our code to the testing environment which is Linux with JBoss 6.0 server which uses faces version "2.0.2.Final-redhat-1", we are getting the error
"java.lang.IllegalArgumentException: null source".
Complete stack trace is pasted below. The server does not provide more information than this and we are finding it hard to debug. Any advice/help on this would be great.
The issue appears when I click a button on the page which in turn makes an AJAX call.
16:37:44,298 INFO [stdout] (http-/10.23.212.109:8080-2) AUTH FILTER -- procesiisng .. /vcp-web/jsf/calendar/calResult.xhtml
16:37:44,299 INFO [stdout] (http-/10.23.212.109:8080-2) leaving phase >> RESTORE_VIEW 1
16:37:44,301 INFO [stdout] (http-/10.23.212.109:8080-2) Entering phase >> RESTORE_VIEW 1
16:37:44,301 ERROR [APPL] (http-/10.23.212.109:8080-2) ### DefaultExceptionHandler.handle() >> Uncaught Exception
java.lang.IllegalArgumentException: null source
16:37:44,302 ERROR [APPL] (http-/10.23.212.109:8080-2) ### DefaultExceptionHandler.handle() >> Uncaught Exception >> Root Cause
java.lang.IllegalArgumentException: null source: java.lang.IllegalArgumentException: null source at
util.EventObject.<init>(EventObject.java:38) [rt.jar:1.6.0_33]
at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71)
[jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73)
[jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73)
[jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:271)
[jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:257) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.16.Final-redhat-1.jar:]
at au.com.woolworths.vcp.web.misc.AuthenticateFilter.doFilter(AuthenticateFilter.java:54) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
[jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
[jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
16:37:44,305 ERROR [APPL] (http-/10.23.212.109:8080-2) ### DefaultExceptionHandler.handle() >> Other Exception
16:37:44,306 ERROR [APPL] (http-/10.23.212.109:8080-2) Exception in FacesHelper.setGlobalMessageByCode() >>
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key
web.common.exception.unknown: java.util.MissingResourceException: Can't find resource for bundle
java.util.PropertyResourceBundle, key web.common.exception.unknown
at java.util.ResourceBundle.getObject(ResourceBundle.java:374) [rt.jar:1.6.0_33]
at java.util.ResourceBundle.getString(ResourceBundle.java:334) [rt.jar:1.6.0_33]
at au.com.woolworths.vcp.util.helper.FacesHelper.setGlobalMessageByCode(FacesHelper.java:125) [classes:]
at au.com.woolworths.vcp.util.exception.DefaultExceptionHandler.handle(DefaultExceptionHandler.java:55) [classes:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.16.Final-redhat-1.jar:]
The best solution is to ensure that every field in the XHTML field has a name and id associated with it. The issue in my case was that some of the input hidden fields did not have a name associated with it and request parameter was sent without a key. This caused the page to not render successfully

Resources