Re: error shutting down

2018-10-26 Thread Maxim Solodovnik
Please let as know if the issue is still reproducible :)

On Fri, 26 Oct 2018 at 23:33, Rob Audenaerde 
wrote:

> Will do, but after the weekend :D
>
> On Fri, Oct 26, 2018 at 5:58 PM Maxim Solodovnik 
> wrote:
>
> > Hello Rob,
> >
> > The PR was merged, so you can verify the fix using 8.2.0-SNAPSHOT (in ~30
> > minutes or so ) :))
> >
> > On Wed, 24 Oct 2018 at 15:09, Maxim Solodovnik 
> > wrote:
> >
> > > BTW master branch of our project is already uses wicket 8.2.0-SNAPSHOT
> > >
> > > On Wed, 24 Oct 2018 at 15:07, Maxim Solodovnik 
> > > wrote:
> > >
> > >> My steps were:
> > >>
> > >> 0) locate problem test (TestInstall in my case)
> > >> 1) build updated wicket-core
> > >> 2) Run problem test in a loop:
> > >> reset && for i in `seq 0 200`; do echo; echo; echo "---
> ${i}
> > >> -"; echo; echo; echo; mvn clean test
> > >> -DgenerateReports=false -Dtest=TestInstall -o; done
> > >>
> > >> We also can merge this code (after proper review)
> > >> And then it can be tested using Jenkins and 8.2.0-SNAPSHOT as wicket
> > >> version
> > >>
> > >> On Wed, 24 Oct 2018 at 15:02, Rob Audenaerde <
> rob.audenae...@gmail.com>
> > >> wrote:
> > >>
> > >>> Thank you Maxim!
> > >>>
> > >>> I'd gladly test this.
> > >>> Is there an standard/easy (maven?) way to test this in my
> application?
> > >>>
> > >>> -Rob
> > >>>
> > >>> On Wed, Oct 24, 2018 at 9:52 AM Maxim Solodovnik <
> solomax...@gmail.com
> > >
> > >>> wrote:
> > >>>
> > >>> > Here is the JIRA [1]
> > >>> >
> > >>> > I was able to reproduce this issue running one of our tests in a
> bash
> > >>> loop
> > >>> > Original 8.2.0-SNAPSHOT usually hang on <10th iteration
> > >>> >
> > >>> > After this [1] fix, it flawlessly works 201 iterations
> > >>> > I would appreciate if you can review/test these changes
> > >>> >
> > >>> > [1] https://issues.apache.org/jira/browse/WICKET-6603
> > >>> > [2] https://github.com/apache/wicket/pull/300
> > >>> >
> > >>> >
> > >>> > On Fri, 12 Oct 2018 at 21:59, Rob Audenaerde <
> > rob.audenae...@gmail.com
> > >>> >
> > >>> > wrote:
> > >>> >
> > >>> > > BTW: I currently worked around it by (very ugly) adding a
> > >>> > > Thread.sleep(1000) between the last test-action in Wicket and the
> > >>> > > Jetty-shutdown. So it seems a timing issue (which probably
> explains
> > >>> why
> > >>> > > Maxim has been seeing Jenkins failing occasionally).
> > >>> > >
> > >>> > > Thanks for checking into this!
> > >>> > >
> > >>> > > -Rob
> > >>> > >
> > >>> > > On Fri, Oct 12, 2018 at 4:08 PM Rob Audenaerde <
> > >>> rob.audenae...@gmail.com
> > >>> > >
> > >>> > > wrote:
> > >>> > >
> > >>> > > > Is there a simple way to disable the AsynchronousDataStore (for
> > >>> now)?
> > >>> > > >
> > >>> > > > On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik <
> > >>> solomax...@gmail.com
> > >>> > >
> > >>> > > > wrote:
> > >>> > > >
> > >>> > > >> I'm occasionally able to see this error on Apache Jenkins, but
> > >>> > > >> unfortunately there is no clear steps to reproduce
> > >>> > > >> I was unable to find what is wrong, will spend some more time
> on
> > >>> this
> > >>> > > >> next week
> > >>> > > >> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov <
> > >>> mgrigo...@apache.org>
> > >>> > > >> wrote:
> > >>> > > >> >
> > >>> > > >> > Hi,
> > >>> > > >> >
> > >>> > > >> > When the application stops Application#destroy() should call
> > >>> > > >> > AsynchronousDataStore#destroy() (
> > >>> > > >> >
> > >>> > > >>
> > >>> > >
> > >>> >
> > >>>
> >
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
> > >>> > > >> > )
> > >>> > > >> > There it will interrupt the page saving thread and it should
> > >>> stop:
> > >>> > > >> >
> > >>> > > >>
> > >>> > >
> > >>> >
> > >>>
> >
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L325
> > >>> > > >> >
> > >>> > > >> > I do not remember changes in this area of the code in 8.x
> but
> > >>> it is
> > >>> > > not
> > >>> > > >> > impossible.
> > >>> > > >> >
> > >>> > > >> > On Fri, Oct 12, 2018 at 12:32 PM Rob Audenaerde <
> > >>> > > >> rob.audenae...@gmail.com>
> > >>> > > >> > wrote:
> > >>> > > >> >
> > >>> > > >> > > Hi all,
> > >>> > > >> > >
> > >>> > > >> > > I'm experiencing some jetty-shutdown problems after
> > upgrading
> > >>> from
> > >>> > > >> 7.9 to
> > >>> > > >> > > 8.1. See the stacktrace below.
> > >>> > > >> > >
> > >>> > > >> > > Is there a simple remedy for this? (or a known cause?) It
> is
> > >>> > > annoying
> > >>> > > >> > > because this error prevents Jetty from shutting down, and
> I
> > >>> use
> > >>> > this
> > >>> > > >> in my
> > >>> > > >> > > tests, so my tests never end... :(
> > >>> > > >> > >
> > >>> > > >> > > Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112
> > >>> > > >> > >
> > >>> > > >> > >
> > >>> 

Re: error shutting down

2018-10-26 Thread Rob Audenaerde
Will do, but after the weekend :D

On Fri, Oct 26, 2018 at 5:58 PM Maxim Solodovnik 
wrote:

> Hello Rob,
>
> The PR was merged, so you can verify the fix using 8.2.0-SNAPSHOT (in ~30
> minutes or so ) :))
>
> On Wed, 24 Oct 2018 at 15:09, Maxim Solodovnik 
> wrote:
>
> > BTW master branch of our project is already uses wicket 8.2.0-SNAPSHOT
> >
> > On Wed, 24 Oct 2018 at 15:07, Maxim Solodovnik 
> > wrote:
> >
> >> My steps were:
> >>
> >> 0) locate problem test (TestInstall in my case)
> >> 1) build updated wicket-core
> >> 2) Run problem test in a loop:
> >> reset && for i in `seq 0 200`; do echo; echo; echo "--- ${i}
> >> -"; echo; echo; echo; mvn clean test
> >> -DgenerateReports=false -Dtest=TestInstall -o; done
> >>
> >> We also can merge this code (after proper review)
> >> And then it can be tested using Jenkins and 8.2.0-SNAPSHOT as wicket
> >> version
> >>
> >> On Wed, 24 Oct 2018 at 15:02, Rob Audenaerde 
> >> wrote:
> >>
> >>> Thank you Maxim!
> >>>
> >>> I'd gladly test this.
> >>> Is there an standard/easy (maven?) way to test this in my application?
> >>>
> >>> -Rob
> >>>
> >>> On Wed, Oct 24, 2018 at 9:52 AM Maxim Solodovnik  >
> >>> wrote:
> >>>
> >>> > Here is the JIRA [1]
> >>> >
> >>> > I was able to reproduce this issue running one of our tests in a bash
> >>> loop
> >>> > Original 8.2.0-SNAPSHOT usually hang on <10th iteration
> >>> >
> >>> > After this [1] fix, it flawlessly works 201 iterations
> >>> > I would appreciate if you can review/test these changes
> >>> >
> >>> > [1] https://issues.apache.org/jira/browse/WICKET-6603
> >>> > [2] https://github.com/apache/wicket/pull/300
> >>> >
> >>> >
> >>> > On Fri, 12 Oct 2018 at 21:59, Rob Audenaerde <
> rob.audenae...@gmail.com
> >>> >
> >>> > wrote:
> >>> >
> >>> > > BTW: I currently worked around it by (very ugly) adding a
> >>> > > Thread.sleep(1000) between the last test-action in Wicket and the
> >>> > > Jetty-shutdown. So it seems a timing issue (which probably explains
> >>> why
> >>> > > Maxim has been seeing Jenkins failing occasionally).
> >>> > >
> >>> > > Thanks for checking into this!
> >>> > >
> >>> > > -Rob
> >>> > >
> >>> > > On Fri, Oct 12, 2018 at 4:08 PM Rob Audenaerde <
> >>> rob.audenae...@gmail.com
> >>> > >
> >>> > > wrote:
> >>> > >
> >>> > > > Is there a simple way to disable the AsynchronousDataStore (for
> >>> now)?
> >>> > > >
> >>> > > > On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik <
> >>> solomax...@gmail.com
> >>> > >
> >>> > > > wrote:
> >>> > > >
> >>> > > >> I'm occasionally able to see this error on Apache Jenkins, but
> >>> > > >> unfortunately there is no clear steps to reproduce
> >>> > > >> I was unable to find what is wrong, will spend some more time on
> >>> this
> >>> > > >> next week
> >>> > > >> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov <
> >>> mgrigo...@apache.org>
> >>> > > >> wrote:
> >>> > > >> >
> >>> > > >> > Hi,
> >>> > > >> >
> >>> > > >> > When the application stops Application#destroy() should call
> >>> > > >> > AsynchronousDataStore#destroy() (
> >>> > > >> >
> >>> > > >>
> >>> > >
> >>> >
> >>>
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
> >>> > > >> > )
> >>> > > >> > There it will interrupt the page saving thread and it should
> >>> stop:
> >>> > > >> >
> >>> > > >>
> >>> > >
> >>> >
> >>>
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L325
> >>> > > >> >
> >>> > > >> > I do not remember changes in this area of the code in 8.x but
> >>> it is
> >>> > > not
> >>> > > >> > impossible.
> >>> > > >> >
> >>> > > >> > On Fri, Oct 12, 2018 at 12:32 PM Rob Audenaerde <
> >>> > > >> rob.audenae...@gmail.com>
> >>> > > >> > wrote:
> >>> > > >> >
> >>> > > >> > > Hi all,
> >>> > > >> > >
> >>> > > >> > > I'm experiencing some jetty-shutdown problems after
> upgrading
> >>> from
> >>> > > >> 7.9 to
> >>> > > >> > > 8.1. See the stacktrace below.
> >>> > > >> > >
> >>> > > >> > > Is there a simple remedy for this? (or a known cause?) It is
> >>> > > annoying
> >>> > > >> > > because this error prevents Jetty from shutting down, and I
> >>> use
> >>> > this
> >>> > > >> in my
> >>> > > >> > > tests, so my tests never end... :(
> >>> > > >> > >
> >>> > > >> > > Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112
> >>> > > >> > >
> >>> > > >> > >
> >>> > > >> > > 2018-10-12 11:24:25,738 ERROR - AsynchronousDataStore  -
> >>> > > >> > > java.lang.InterruptedException
> >>> > > >> > > at
> >>> > > >> > >
> >>> > > >> > >
> >>> > > >>
> >>> > >
> >>> >
> >>>
> java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1259)
> >>> > > >> > > at
> >>> > > >> > >
> >>> > > >> > >
> >>> > > >>
> >>> > >
> >>> >
> >>>
> 

Re: error shutting down

2018-10-26 Thread Maxim Solodovnik
Hello Rob,

The PR was merged, so you can verify the fix using 8.2.0-SNAPSHOT (in ~30
minutes or so ) :))

On Wed, 24 Oct 2018 at 15:09, Maxim Solodovnik  wrote:

> BTW master branch of our project is already uses wicket 8.2.0-SNAPSHOT
>
> On Wed, 24 Oct 2018 at 15:07, Maxim Solodovnik 
> wrote:
>
>> My steps were:
>>
>> 0) locate problem test (TestInstall in my case)
>> 1) build updated wicket-core
>> 2) Run problem test in a loop:
>> reset && for i in `seq 0 200`; do echo; echo; echo "--- ${i}
>> -"; echo; echo; echo; mvn clean test
>> -DgenerateReports=false -Dtest=TestInstall -o; done
>>
>> We also can merge this code (after proper review)
>> And then it can be tested using Jenkins and 8.2.0-SNAPSHOT as wicket
>> version
>>
>> On Wed, 24 Oct 2018 at 15:02, Rob Audenaerde 
>> wrote:
>>
>>> Thank you Maxim!
>>>
>>> I'd gladly test this.
>>> Is there an standard/easy (maven?) way to test this in my application?
>>>
>>> -Rob
>>>
>>> On Wed, Oct 24, 2018 at 9:52 AM Maxim Solodovnik 
>>> wrote:
>>>
>>> > Here is the JIRA [1]
>>> >
>>> > I was able to reproduce this issue running one of our tests in a bash
>>> loop
>>> > Original 8.2.0-SNAPSHOT usually hang on <10th iteration
>>> >
>>> > After this [1] fix, it flawlessly works 201 iterations
>>> > I would appreciate if you can review/test these changes
>>> >
>>> > [1] https://issues.apache.org/jira/browse/WICKET-6603
>>> > [2] https://github.com/apache/wicket/pull/300
>>> >
>>> >
>>> > On Fri, 12 Oct 2018 at 21:59, Rob Audenaerde >> >
>>> > wrote:
>>> >
>>> > > BTW: I currently worked around it by (very ugly) adding a
>>> > > Thread.sleep(1000) between the last test-action in Wicket and the
>>> > > Jetty-shutdown. So it seems a timing issue (which probably explains
>>> why
>>> > > Maxim has been seeing Jenkins failing occasionally).
>>> > >
>>> > > Thanks for checking into this!
>>> > >
>>> > > -Rob
>>> > >
>>> > > On Fri, Oct 12, 2018 at 4:08 PM Rob Audenaerde <
>>> rob.audenae...@gmail.com
>>> > >
>>> > > wrote:
>>> > >
>>> > > > Is there a simple way to disable the AsynchronousDataStore (for
>>> now)?
>>> > > >
>>> > > > On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik <
>>> solomax...@gmail.com
>>> > >
>>> > > > wrote:
>>> > > >
>>> > > >> I'm occasionally able to see this error on Apache Jenkins, but
>>> > > >> unfortunately there is no clear steps to reproduce
>>> > > >> I was unable to find what is wrong, will spend some more time on
>>> this
>>> > > >> next week
>>> > > >> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov <
>>> mgrigo...@apache.org>
>>> > > >> wrote:
>>> > > >> >
>>> > > >> > Hi,
>>> > > >> >
>>> > > >> > When the application stops Application#destroy() should call
>>> > > >> > AsynchronousDataStore#destroy() (
>>> > > >> >
>>> > > >>
>>> > >
>>> >
>>> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
>>> > > >> > )
>>> > > >> > There it will interrupt the page saving thread and it should
>>> stop:
>>> > > >> >
>>> > > >>
>>> > >
>>> >
>>> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L325
>>> > > >> >
>>> > > >> > I do not remember changes in this area of the code in 8.x but
>>> it is
>>> > > not
>>> > > >> > impossible.
>>> > > >> >
>>> > > >> > On Fri, Oct 12, 2018 at 12:32 PM Rob Audenaerde <
>>> > > >> rob.audenae...@gmail.com>
>>> > > >> > wrote:
>>> > > >> >
>>> > > >> > > Hi all,
>>> > > >> > >
>>> > > >> > > I'm experiencing some jetty-shutdown problems after upgrading
>>> from
>>> > > >> 7.9 to
>>> > > >> > > 8.1. See the stacktrace below.
>>> > > >> > >
>>> > > >> > > Is there a simple remedy for this? (or a known cause?) It is
>>> > > annoying
>>> > > >> > > because this error prevents Jetty from shutting down, and I
>>> use
>>> > this
>>> > > >> in my
>>> > > >> > > tests, so my tests never end... :(
>>> > > >> > >
>>> > > >> > > Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112
>>> > > >> > >
>>> > > >> > >
>>> > > >> > > 2018-10-12 11:24:25,738 ERROR - AsynchronousDataStore  -
>>> > > >> > > java.lang.InterruptedException
>>> > > >> > > at
>>> > > >> > >
>>> > > >> > >
>>> > > >>
>>> > >
>>> >
>>> java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1259)
>>> > > >> > > at
>>> > > >> > >
>>> > > >> > >
>>> > > >>
>>> > >
>>> >
>>> java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:317)
>>> > > >> > > at
>>> > > >> > >
>>> > > >> > >
>>> > > >>
>>> > >
>>> >
>>> java.base/java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:373)
>>> > > >> > > at
>>> > > >> > >
>>> > > >> > >
>>> > > >>
>>> > >
>>> >
>>> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:207)
>>> > > >> > >   

Question about IChoiceRenderer

2018-10-26 Thread Claudia Hirt
Hi all, 

i have a question about IChoiceRenderer used for Selectboxes. 

There is a method String getIdValue(Tobject, int index) to get the unique id 
value of an option object. 
The javadoc says the following: 

"This method is called to get the id value of an object (used as the value 
attribute of a choice element) The id can be extracted from the object like a 
primary key, or if the list is stable you could just return a toString of the 
index." 

I wonder if it's a good idea to have the object and the index as parameters in 
this method. If the id value should be kind of a primary key of the object, it 
should not depend on the index, which has nothing to do with the object. 
I cannot use this method in my case to check if an object which is not in the 
choices list has the same id value than the selected one in my selectbox. I 
tried to do this with wicket-extensions Select, which does not have a choice 
renderer by default and I only have the object in isSelectedmethod of Select, 
but not the index. 

Best regards, 
Claudia