Error. WARN: WELD-000335: Conversation context is already active

1

I'm having the following error in the output of my Glassfish 4.1 server:

  

WARN: WELD-000335: Conversation context is already active, most   it was not cleaned up properly during previous request   processing: org.apache.catalina.connector.RequestFacade@37607e3b

I'm working with jsf, cdi, primefaces, jpa. I already researched for a few days about the error but could not solve it. My project is running (localhost) seemingly without problem, but the message is always showing up.

    
asked by anonymous 04.09.2016 / 06:09

1 answer

1

Warnings are not errors, this bug is reported in the weld doc only for tomcat and for some reason Grizzly behaved similarly when there was more than one weld lib in context, in the case of tomcat it does not allow an integration with ThreadLocal on asynchronous servlet requests, then it warns that the conversation context is already active. but in Glassfish's case it is the weld lib declared in pom.xml and in conflict with the CDI dependency made available by the container.

The solution to remove the warning was to configure the correct CDI library as provided, eg:

This dependency has been removed:

<dependency> 
    <groupId>org.jboss.weld.servlet</groupId> 
    <artifactId>weld-servlet</artifactId> 
    <version>1.1.10.Final</version> 
    <scope>compile</scope> 
</dependency>

and added the CDI API as provided, eg:

<dependency> 
    <groupId>javax.enterprise</groupId> 
    <artifactId>cdi-api</artifactId> 
    <scope>provided</scope> 
</dependency>
    
04.09.2016 / 22:08