Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name of web-fragment in moskito-webui should be "MoSKitoWebUI" #42

Closed
frankbregulla1111 opened this issue Jun 17, 2014 · 6 comments
Closed

Comments

@frankbregulla1111
Copy link

With commit 141eff7 the name of the web-fragment.xml in moskito-webui was changed from "MoSKitoWebUI" to "MoSKitoInspectShared". However the ordering in web-fragment.xml in moskito-web references "MoSKitoWebUI". So one of the names should be changed to match the other.

This leads to the problem that moskito cannot be deployed in Jetty 8. Jetty will refuse to start with a "java.lang.IllegalStateException: Circular references for fragments" message.

Tomcat 7 however has no problem deploying this..

@dvayanu
Copy link
Member

dvayanu commented Jun 17, 2014

Hi Frank,

thank you for the issue ;-)

just to get it right, jetty won't start as long as one of the referenced fragments are missing? That could be a problem, since MoSKito Inspect is actually an optional package. So do you think simple renaming will help, or do we need to ensure both webapps are present?

@frankbregulla1111
Copy link
Author

I think the problem is that moskito-web has an ordering after MoSKitoWebUI in it's web-fragment.xml but the name of the web-fragment in moskito-webui is "MoSKitoInspectShared" and not "MoSKitoWebUI" as I would expect.
I have not tried if jetty will start if I don't reference moskito-webui at all.

As a workaround I have configured the ordering of the web-fragments explicitly in my web.xml with the "absolute ordering" element:

<absolute-ordering>
    <name>MoSKitoInspect</name>
    <name>MoSKitoInspectShared</name>
    <name>MoSKitoWeb</name>
</absolute-ordering>

@dvayanu
Copy link
Member

dvayanu commented Jun 19, 2014

I change the dependency of MoskitoWeb to MoSKitoInspectShared. However, I think the above ordering is the better option. Problem on my side is, that if I set the dependency to MoSKitoInspect but it isn't there (because you use remote inspect), you will have start problems. If I set it to MoSKitoInspectShared - MoSKitoInspect filters are monitored, which doesn't make sense.

@dvayanu dvayanu closed this as completed Oct 3, 2014
@FelixJongleur42
Copy link

Is there actually a solution without the workaround in the web.xml? I still see this when not using the absolute-ordering tag. Shouldn't this be fixed by using ordering in the corresponding web-fragment.xml?

java.lang.IllegalStateException: Circular references for fragments
        at org.eclipse.jetty.webapp.Ordering$RelativeOrdering.order(Ordering.java:208)
        at org.eclipse.jetty.webapp.MetaData.orderFragments(MetaData.java:365)
        at org.eclipse.jetty.webapp.MetaData.setOrdering(MetaData.java:533)
        at org.eclipse.jetty.webapp.MetaData.addFragment(MetaData.java:296)
        at org.eclipse.jetty.webapp.FragmentConfiguration.findWebFragments(FragmentConfiguration.java:75)
        at org.eclipse.jetty.webapp.FragmentConfiguration.preConfigure(FragmentConfiguration.java:44)
        at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:468)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:504)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
        at org.eclipse.jetty.server.Server.start(Server.java:387)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
        at org.eclipse.jetty.server.Server.doStart(Server.java:354)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

@dvayanu
Copy link
Member

dvayanu commented Oct 25, 2016

Hi @FelixJongleur42 ,

so you are using standalone or embedded mode?
Because I am using mostly embedded myself and I don't see this problem.
Does it only happen in jetty?

@FelixJongleur42
Copy link

Yes and yes, I am using the workaround now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants