<< Back to previous view

[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
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... Resolved
Tags:
Participants: Michal Gajdos, phil.zampino, TangYong and tlcksnyder

 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 07:25 PM ]

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 01:22 AM ]

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 05:38 PM ]

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 08:13 PM ]

Tested successfully as of Revision: 60694.

Generated at Sat Apr 19 20:00:18 UTC 2014 using JIRA 4.0.2#472.