[GLASSFISH-19714] Unable to deploy WAR when guava is present in WEB-INF/lib Created: 22/Feb/13  Updated: 21/Mar/13  Resolved: 21/Mar/13

Status: Closed
Project: glassfish
Component/s: cdi
Affects Version/s: 4.0_b77
Fix Version/s: 4.0

Type: Bug Priority: Blocker
Reporter: Michal Gajdos Assignee: phil.zampino
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks JERSEY-1745 Deployment of bookmark.war fails on G... Closed

 Description   

When I try to deploy a WAR containing guava.jar in int (WEB-INF/lib) I get the following exception:

[#|2013-02-22T10:18:36.313+0100|SEVERE|glassfish 4.0|javax.enterprise.system.core|_ThreadID=58;_ThreadName=admin-listener(1);_TimeMillis=1361524716313;_LevelValue=1000;|Exception while deploying the app [helloworld-webapp-2.0-m12-1]|#]

[#|2013-02-22T10:18:36.313+0100|SEVERE|glassfish 4.0|javax.enterprise.system.core|_ThreadID=58;_ThreadName=admin-listener(1);_TimeMillis=1361524716313;_LevelValue=1000;_MessageID=NCLS-CORE-0026;|Exception during lifecycle processing
java.lang.StackOverflowError
        at java.util.HashMap.addEntry(HashMap.java:856)
        at java.util.HashMap.put(HashMap.java:484)
        at java.util.HashSet.add(HashSet.java:217)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:248)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:250)
        at org.glassfish.weld.connector.WeldUtils.isCDIEnablingAnnotation(WeldUtils.java:221)

It seems that WeldUtils class has problems processing com.google.common.annotations.GwtCompatible annotation.

The WAR is available at [1] sources of the app at [2].

[1] http://repo1.maven.org/maven2/org/glassfish/jersey/examples/helloworld-webapp/2.0-m12-1/helloworld-webapp-2.0-m12-1.war
[2] https://github.com/jersey/jersey/tree/master/examples/helloworld-webapp



 Comments   
Comment by phil.zampino [ 20/Mar/13 ]

This is the result of circular annotation relationships.
This code will be removed/replaced shortly, as the requirements around CDI enablement have changed.

Comment by TangYong [ 21/Mar/13 ]

The issue has been reproduced by vaadin demo[1],

[1]: https://github.com/vaadin/dashboard-demo

Currently, a thread[2] is in discussion.
[2]: http://java.net/projects/glassfish/lists/dev/archive/2013-03/message/98

Comment by phil.zampino [ 21/Mar/13 ]

Just committed rev. 60679 of appserver/web/gf-weld-connector/src/main/java/org/glassfish/weld/connector/WeldUtils.java to resolve this issue.
Please check the next build to verify.

Comment by tlcksnyder [ 21/Mar/13 ]

Tested successfully as of Revision: 60694.

Generated at Sat Feb 13 13:46:37 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.