0

I do have a web application working fine on our machines, and fine on many different installations. But one customer does have very strange problems and I do not have any idea about the reasons.

Environment:

  • Wildfly 10.0.0
  • Own EAR with Java 8
  • UI with JSF/RichFaces.
  • JPA with Postgres 9.6.2-3
  • Windows
  • Browser: Firefox and Internet Explorer

Problem:

The customer did not had any problems with older version, using Wildfly 8.2.1 and Postgres 9.3. But since the update to 10.0.0, one of 3 servers produces sometimes 500 error messages in the browser, based on exceptions:

2017-07-20 15:14:40,642 ERROR [io.undertow.request] (default task-43) UT005023: Exception handling request to /ws/ELResolver: org.jboss.weld.exceptions.IllegalStateException: WELD-001304: More than one context active for scope type javax.enterprise.context.SessionScoped
    at org.jboss.weld.manager.BeanManagerImpl.internalGetContext(BeanManagerImpl.java:720) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:687) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:95) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.get(ContextualInstanceStrategy.java:178) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:107) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:90) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at org.jboss.as.jsf.injection.weld.ForwardingELResolver.getValue(ForwardingELResolver.java:46) [wildfly-jsf-injection-8.1.0.Final.jar:8.1.0.Final]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) [jboss-el-api_3.0_spec-1.0.5.Final.jar:1.0.5.Final]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.7-patched-by-ov.jar:]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.7-patched-by-ov.jar:]
    at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-impl-3.0.1-b08-jbossorg-1.jar:3.0.1-b08-jbossorg-1]
    at com.sun.el.parser.AstValue.getBase(AstValue.java:150) [javax.el-impl-3.0.1-b08-jbossorg-1.jar:3.0.1-b08-jbossorg-1]
    at com.sun.el.parser.AstValue.getValue(AstValue.java:199) [javax.el-impl-3.0.1-b08-jbossorg-1.jar:3.0.1-b08-jbossorg-1]
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-impl-3.0.1-b08-jbossorg-1.jar:3.0.1-b08-jbossorg-1]
    at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
    at com.sun.faces.application.ApplicationImpl.evaluateExpressionGet(ApplicationImpl.java:430) [jsf-impl-2.1.7-patched-by-ov.jar:]
    at org.jboss.as.jsf.injection.weld.ForwardingApplication.evaluateExpressionGet(ForwardingApplication.java:170) [wildfly-jsf-injection-8.1.0.Final.jar:8.1.0.Final]
    ...

The problem did disappear on one server after some time but appeared on another server one day later! Until now, there is no pattern visible what the reasons are. I have no idea how to reproduce on my machine.

Question:

Has anyone an idea what the reason could be for such an error? I do not think, it is a code issue because this is working on many other installations. I belief there is something special in the network there, but have no idea what. I already tried to check for issues caused by virus scanner or proxy server, but found nothing so far.

Searching for the WELD-001304 error I just find some special cases with old software components but seem to happen all the time.

Community
  • 1
  • 1
Martin Metz
  • 308
  • 1
  • 3
  • 13
  • Are you using the weld (CDI) feature? If not you can try to remove the extension in standalone.xml. – Quincy Jul 26 '17 at 01:37
  • By any chance are you manually starting a session context programmatically? – John Ament Jul 26 '17 at 12:11
  • Yes, I use CDI, and yes, in some places I do create a session context programmatically to access a session scoped bean without having a 'normal' session. But both works since years. But no, I do not create a session context within a normal web page or there beans. – Martin Metz Jul 26 '17 at 12:55

0 Answers0