Cannot modify component hierarchy after render phase has started

2017-07-01 Thread Maxim Solodovnik
Hello,

I'm facing weird "Cannot modify component hierarchy after render phase has
started" exception on simultaneous page access using 2 different browsers
everything works in case there is only one browser, or page being accessed
not "simultaneously"

We are using "single page" application, with async updates via
AjaxBehaviours and WebSockets

Maybe you can propose how to debug this?
Wicket 8.8.8-SNAPSHOT
Tomcat 8.5.12


Here is the stack trace:
org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
at org.apache.wicket.Component.checkHierarchyChange(Component.java:3649)
at org.apache.wicket.MarkupContainer.remove(MarkupContainer.java:685)
at
org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:990)
at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:239)
at
org.apache.openmeetings.web.common.MainPanel.onInitialize(MainPanel.java:151)
at org.apache.wicket.Component.fireInitialize(Component.java:878)
at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1037)
at
org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:1014)
at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:239)
at org.apache.openmeetings.web.pages.MainPage.onInitialize(MainPage.java:52)
at org.apache.wicket.Component.fireInitialize(Component.java:878)
at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1037)
at org.apache.wicket.Page.isPageStateless(Page.java:459)
at
org.apache.wicket.request.handler.render.WebPageRenderer.isPageStateless(WebPageRenderer.java:287)
at
org.apache.wicket.request.handler.render.WebPageRenderer.shouldRenderPageAndWriteResponse(WebPageRenderer.java:333)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:193)
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:202)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)
at
org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:253)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
at
org.apache.wicket.protocol.ws.AbstractUpgradeFilter.processRequestCycle(AbstractUpgradeFilter.java:70)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:204)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:286)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.java:84)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

-- 
WBR
Maxim aka solomax


Re: Cannot modify component hierarchy after render phase has started

2017-01-15 Thread Dirk Forchel
Hello Martin,
okay, it was a misunderstanding. I will file a new issue and attach the
quickstart.
Cheers,
  Dirk

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676766.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Cannot modify component hierarchy after render phase has started

2017-01-15 Thread Martin Grigorov
Hi Dirk,

I think Sven said that this is a bug (caused most probably by the support
for queueing components).
Please file a bug report in JIRA and attach the quickstart app.
Thank you!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Jan 16, 2017 at 7:47 AM, Dirk Forchel 
wrote:

> Sven Meier wrote
> > problem is that TestPanel.onConfigure() is called during render phase
> > only, while in 7.4 it was (correctly) called in #beforeRender() (where
> > hierarchy changes are still allowed).
>
> Hi Sven,
> to be honest I didn't get it. Livecycle stages of a component are
> "initializing", "rendering" and "removing", where hook methods involved
> are:
>
> Initialization: /onInitialize/
> Rendering (sorted by execution order): /onConfigure/, /onBeforeRender/,
> /onRender/, /onComponentTag/, o/nComponentTagBody/,
> /onAfterRenderChildren/,
> /onAfterRender/
> Removing: /onRemove/
>
> The /onConfigure/ method is a good point to manage the component states
> such
> as its visibility. This method is called before the render phase starts. I
> assume, changing children hierarchy is still allowed. But we're trying to
> change the model object of a component, which, in my point of view, is
> completely different from changing the children hierarchy
> (/isVisibilityAllowed/ or /isEnabledAllowed/ is not called).
>
> The /onBeforeRender/ method is called after the /onConfigure/ method. This
> method is called before a component starts its rendering phase and would be
> the last chance to change its children hierarchy. But we don't do so.
>
> So why it is not allowed to change the model object of a panel which is a
> child of a border component?
> We're doing this in our application at least since Wicket 1.5.
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Cannot-modify-component-hierarchy-after-
> render-phase-has-started-tp4676711p4676760.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Cannot modify component hierarchy after render phase has started

2017-01-15 Thread Dirk Forchel
Sven Meier wrote
> problem is that TestPanel.onConfigure() is called during render phase 
> only, while in 7.4 it was (correctly) called in #beforeRender() (where 
> hierarchy changes are still allowed).

Hi Sven,
to be honest I didn't get it. Livecycle stages of a component are
"initializing", "rendering" and "removing", where hook methods involved are:

Initialization: /onInitialize/
Rendering (sorted by execution order): /onConfigure/, /onBeforeRender/,
/onRender/, /onComponentTag/, o/nComponentTagBody/, /onAfterRenderChildren/,
/onAfterRender/
Removing: /onRemove/

The /onConfigure/ method is a good point to manage the component states such
as its visibility. This method is called before the render phase starts. I
assume, changing children hierarchy is still allowed. But we're trying to
change the model object of a component, which, in my point of view, is
completely different from changing the children hierarchy
(/isVisibilityAllowed/ or /isEnabledAllowed/ is not called).

The /onBeforeRender/ method is called after the /onConfigure/ method. This
method is called before a component starts its rendering phase and would be
the last chance to change its children hierarchy. But we don't do so.

So why it is not allowed to change the model object of a panel which is a
child of a border component? 
We're doing this in our application at least since Wicket 1.5.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676760.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Cannot modify component hierarchy after render phase has started

2017-01-13 Thread Sven Meier

Hi Dirk,

problem is that TestPanel.onConfigure() is called during render phase 
only, while in 7.4 it was (correctly) called in #beforeRender() (where 
hierarchy changes are still allowed).


So I assume this is caused by WICKET-6216, component queuing might be 
involved.


Regards
Sven

Stacktrace 7.5.0
org.apache.wicket.WicketRuntimeException: Cannot modify component 
hierarchy after render phase has started (page version cant change then 
anymore)
at 
org.apache.wicket.Component.checkHierarchyChange(Component.java:3674) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Page.dirty(Page.java:271) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Page.dirty(Page.java:250) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Page.componentModelChanging(Page.java:904) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.modelChanging(Component.java:2230) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.setDefaultModelObject(Component.java:3133) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
com.mycompany.front.wicket.components.TestPanel.onConfigure(TestPanel.java:30) 
~[classes/:?]
at org.apache.wicket.Component.configure(Component.java:1069) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:954) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.beforeRender(Component.java:1031) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.onBeforeRender(Component.java:3928) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalBeforeRender(Component.java:963) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.beforeRender(Component.java:1031) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalPrepareForRender(Component.java:2248) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.render(Component.java:2337) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1659) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:517) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:70) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2613) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onRender(Border.java:527) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.internalRender(Component.java:2413) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.render(Component.java:2341) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1704) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1659) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:70) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2613) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1668) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.internalRender(Component.java:2413) 
~[wicket-core-7.5.0.jar:7.5.0]
at org.apache.wicket.Component.render(Component.java:2341) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1526) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1729) 
~[wicket-core-7.5.0.jar:7.5.0]
at 
org.apache.wicket.MarkupContainer.renderComponentTagBody

Re: Cannot modify component hierarchy after render phase has started

2017-01-13 Thread Dirk Forchel
Hi Sven,
attached you can find a quickstart which demonstrates the problem. I've
added 3 test pages all with a TextField and a Panel with a TextField. For
each component, the model object is set at the onConfigure method. At the
first page both components are added to the page itself. At the second page
both components are added to the border body container of a Border
component. At the third page both components are added to a "Layout"
container (a Border component too). 
With Wicket 7.4.0 all pages are rendered without any problem, with Wicket
7.5.0 the third page isn't.  Instead the following exception is thrown:

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
 at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3674)
 at org.apache.wicket.Page.dirty(Page.java:271)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
 at org.apache.wicket.Page.dirty(Page.java:250)
 at org.apache.wicket.Page.componentModelChanging(Page.java:904)
 at org.apache.wicket.Component.modelChanging(Component.java:2230)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3133)
 at
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
 at
com.mycompany.front.wicket.components.TestPanel.onConfigure(TestPanel.java:30)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676736.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Cannot modify component hierarchy after render phase has started

2017-01-12 Thread Dirk Forchel
Hi Sven,
could it be that this belongs to
https://issues.apache.org/jira/browse/WICKET-6303? I'm not sure, but after
migrating to Wicket 7.5.0 we've got several errors belonging to this issue.
I'll try to provide a quickstart though.
Thanks,
  Dirk

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676728.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Cannot modify component hierarchy after render phase has started

2017-01-12 Thread Sven Meier

Hi,

a quick lock on a 7.4-7.5 diff didn't reveal any change that has 
something to do with checking the hierarchy.


Could you provide a quickstart, so I can find the difference?

Sven


On 12.01.2017 08:56, Dirk Forchel wrote:

Hi,
I would like to know why we shouldn't change the model object within the
configure phase for Wicket components. We're running our application with
Wicket 7.4 and all works as expected. After migrating to Wicket 7.5 we get
the following exception for different pages, mainly due to modifying the
model object. Could someone explain why this is a bad thing to do?

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
  at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3662)
  at org.apache.wicket.Page.dirty(Page.java:271)
  at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
  at org.apache.wicket.Page.dirty(Page.java:250)
  at org.apache.wicket.Page.componentModelChanging(Page.java:904)
  at org.apache.wicket.Component.modelChanging(Component.java:2218)
  at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3121)
  at
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
  at
com.mycompany.wicket.components.TestPanel.onConfigure(TestPanel.java:111)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Cannot modify component hierarchy after render phase has started

2017-01-11 Thread Dirk Forchel
Hi,
I would like to know why we shouldn't change the model object within the
configure phase for Wicket components. We're running our application with
Wicket 7.4 and all works as expected. After migrating to Wicket 7.5 we get
the following exception for different pages, mainly due to modifying the
model object. Could someone explain why this is a bad thing to do?

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
 at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3662)
 at org.apache.wicket.Page.dirty(Page.java:271)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
 at org.apache.wicket.Page.dirty(Page.java:250)
 at org.apache.wicket.Page.componentModelChanging(Page.java:904)
 at org.apache.wicket.Component.modelChanging(Component.java:2218)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3121)
 at
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
 at
com.mycompany.wicket.components.TestPanel.onConfigure(TestPanel.java:111)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: on upgrade from 7.2 to 7.3 Cannot modify component hierarchy after render phase has started

2016-07-07 Thread Sven Meier

Hi,

there have been some changes related to queued components recently.
Previously MarkupContainer#onInitialize() would trigger loading of the 
markup, this is no longer the case. See the 7.2 stacktrace:


HomePage.getMarkupResourceStream(MarkupContainer, Class) line: 28
MarkupFactory.getMarkupResourceStream(MarkupContainer, Class) 
line: 320

MarkupCache.getMarkup(MarkupContainer, Class, boolean) line: 296
MarkupFactory.getMarkup(MarkupContainer, Class, boolean) line: 236
MarkupFactory.getMarkup(MarkupContainer, boolean) line: 194
HomePage(MarkupContainer).getAssociatedMarkup() line: 456
HomePage(MarkupContainer).getRegionMarkup() line: 2224
HomePage(MarkupContainer).newDequeueContext() line: 2211
HomePage(MarkupContainer).dequeueAutoComponents() line: 1670 < 
no longer called in 7.3

HomePage(MarkupContainer).onInitialize() line: 1664
HomePage(Page).onInitialize() line: 299

IMHO your best option is to trigger loading of markup by yourself from 
#onInitialize().


Have fun
Sven


On 07.07.2016 12:15, Renner, Ingo wrote:


Hi,

the page classes  of our wicket application read their html markup 
from the filesystem, where they are generated by a CMS system.


In the markup of these pages we have special tags which we replace 
with real tags and add some wicket components to the page.


This is nearly the same way which was/is used in the wicket brix cms.

Last cause: Cannot modify component hierarchy after render phase has 
started (page version cant change then anymore)
WicketMessage: Markup of type 'html' for component 'com.lr.HomePage' 
not found. Enable debug messages for org.apache.wicket.util.resource 
to get a list of all filenames tried:

[Page class = com.lr.HomePage, id = 0, render count = 1]

This is just a demo which shows the same technology used in our real 
code, but in a more simple way:


This is the interesting method from the Page class with some comments:

@Override

*public*IResourceStream getMarkupResourceStream(MarkupContainer 
container, Class containerClass) {


// This simulates loading the template from external source

InputStream src= HomePage.*class*.getResourceAsStream("HomePageSrc.html");

String srcStr= "";

*try*{

srcStr= Streams./readString/(src);

// now replacing my special _markup_ "tag" with a real _html_ tag

srcStr= srcStr.replace("${tile}", "");

// and adding the component to the page

HomePage.*this*.add(*new*Label("tile", Model./of/("Content of dynamic 
component aka tile.")));


} *catch*(IOException e) {

// *TODO*Auto-generated catch block

e.printStackTrace();

}

StringResourceStream stringResourceStream= 
*new*StringResourceStream(srcStr, "text/html");


*return*stringResourceStream;

}

A quickstart is attached. Just switch the version number in the 
pom.xml: It works with 7.2 and breaks with 7.3.


My question now. Is this kind of technology wrong with 7.3 (or was it 
always a bad idea) and how should it be done now, or is 7.3 overreacting?


Mit freundlichen Grüßen / Kind regards

Ingo Renner



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




Synchonization problems? (Cannot modify component hierarchy after render phase has started)

2014-12-18 Thread Daniel Stoch
Hi,

Is it possible that there is some issue with simultaneous access to a
page by different threads using wicket-atmosphere integration? From
time to time, when system send many server events to page, such error
can occurs - in onConfigure method I call setVisible on some children
components:

org.apache.wicket.WicketRuntimeException: Cannot modify component
hierarchy after render phase has started (page version cant change
then anymore)
at org.apache.wicket.Component.checkHierarchyChange(Component.java:3557)
at org.apache.wicket.Component.addStateChange(Component.java:3486)
at org.apache.wicket.Component.setVisible(Component.java:3173)
at myapp.MyPanel.onConfigure(MyPanel.java:83)
at org.apache.wicket.Component.configure(Component.java:1041)
at org.apache.wicket.Component.internalBeforeRender(Component.java:926)
at org.apache.wicket.Component.beforeRender(Component.java:1003)
at org.apache.wicket.Component.internalPrepareForRender(Component.java:2179)
at org.apache.wicket.Component.render(Component.java:2268)
at 
org.apache.wicket.ajax.XmlAjaxResponse.writeComponent(XmlAjaxResponse.java:128)
at 
org.apache.wicket.ajax.AbstractAjaxResponse.writeComponents(AbstractAjaxResponse.java:218)
at 
org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:150)
at 
org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:359)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97)
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:417)
at 
org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:393)
at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:346)
at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:329)

So it looks that some thread earlier mark this component as rendering?

--
Daniel

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org