Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004523 [Resin] minor always 04-27-11 16:18 05-02-11 12:13
Reporter rickHigh View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.18 Product Version
  Product Build
Summary 0004523: appear to have circular dependency. Consider using <absolute-ordering> in web.xml
Description I am using a web-fragment.xml file and am getting a circular dependency issue.

My fragment is defined here:

https://github.com/CDISource/cdisource/blob/master/spring/src/main/resources/META-INF/web-fragment.xml [^]

The listener for this fragment is defined here:

https://github.com/CDISource/cdisource/blob/master/spring/src/main/java/org/cdisource/springintegration/servletsupport/ApplicationContextFinderServletContextListener.java [^]

The error message I am getting is here.

 

    [java] [11-04-27 16:11:17.801] {http://*:8080-1} [^] WebApp[production/webapp/default/springapp] stopping
     [java] [11-04-27 16:11:18.586] {http://*:8080-1} [^] web-fragments at 'WebApp[production/webapp/default/springapp,INITIALIZING]' appear to have circular dependency. Consider using <absolute-ordering> in web.xml.
     [java] [11-04-27 16:11:18.587] {http://*:8080-1} [^] web-fragments at 'WebApp[production/webapp/default/springapp,INITIALIZING]' appear to have circular dependency. Consider using <absolute-ordering> in web.xml.


I believe it might because the @WebListener
public class ApplicationContextFinderServletContextListener

and the web-fragment clash

I think the behavior should be that the web fragment take precedence over the annotation.

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0005218)
rickHigh
04-27-11 16:24

Removing the @WebListener did not help.
 
(0005219)
rickHigh
04-27-11 16:32

When I changed this:

<?xml version="1.0" encoding="UTF-8"?>

<web-fragment version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [^] http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd"> [^]

    <name>Spring CDI Bridge</name>

    <ordering><after><others/></after></ordering>

    <listener>
        <display-name></display-name>

        <listener-class>org.cdisource.springintegration.servletsupport.ApplicationContextFinderServletContextListener</listener-class>

    </listener>

 
</web-fragment>

to this:

<?xml version="1.0" encoding="UTF-8"?>

<web-fragment version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [^] http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd"> [^]

    <name>Spring CDI Bridge</name>

    <listener>
        <display-name></display-name>

        <listener-class>org.cdisource.springintegration.servletsupport.ApplicationContextFinderServletContextListener</listener-class>

    </listener>

 
</web-fragment>

It "works".

However I want to make sure that this listener executes after others, namely the one spring appilcatiion context loader one. But when I use what appears to be valid syntax, resin gives me a circular error.
 
(0005224)
ferg
05-02-11 12:13

server/1r20
 

- Issue History
Date Modified Username Field Change
04-27-11 16:18 rickHigh New Issue
04-27-11 16:24 rickHigh Note Added: 0005218
04-27-11 16:32 rickHigh Note Added: 0005219
05-02-11 12:13 ferg Note Added: 0005224
05-02-11 12:13 ferg Assigned To  => ferg
05-02-11 12:13 ferg Status new => closed
05-02-11 12:13 ferg Resolution open => fixed
05-02-11 12:13 ferg Fixed in Version  => 4.0.18


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker