Re: exception in windows while using FilePageStore

2021-11-18 Thread Ernesto Reinaldo Barreiro
https://issues.apache.org/jira/browse/WICKET-6936

On Thu, Nov 18, 2021 at 1:10 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi Sven,
>
> Many thanks for your answer.
>
> On Thu, Nov 18, 2021 at 12:36 PM Sven Meier  wrote:
>
>> Hi Ernesto,
>>
>> I've tested FilePageStore without TRUNCATE_EXISTING - in that case the
>> file will not shrink, when the page has reduced its size.
>>
> Ok.
>
>>
>> Luckily this doesn't disturb Java's default deserialization, the excess
>> is just ignored.
>> But what if a project uses another serializer?
>>
>> Good point. For us something like this will be enough:
>
> https://github.com/apache/wicket/pull/484
>
>
>
>> Regards
>>
>> Sven
>>
>>
>> On 17.11.21 10:57, Ernesto Reinaldo Barreiro wrote:
>> > Hi Sven,
>> >
>> > Getting rid of the StandardOpenOption.TRUNCATE_EXISTING here
>> >
>> >
>> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/pageStore/FilePageStore.java#L189
>> >
>> > seems to "fix" the problem in windows and I also do not see problems in
>> > linux. To be honest I have no idea of the full implications of this
>> change.
>> >
>> >
>> >
>> > On Tue, Nov 16, 2021 at 11:40 PM Sven Meier  wrote:
>> >
>> >> Hi Ernesto,
>> >>
>> >> I'm no expert in this, but as I understood it FileChannel should be
>> save
>> >> to be written to in parallel:
>> >>
>> >>
>> >>
>> https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/FileChannel.html
>> >>
>> >> "File channels are safe for use by multiple concurrent threads. ...
>> >> Only one operation that involves the channel's position or can change
>> >> its file's size may be in progress at any given time; attempts to
>> >> initiate a second such operation while the first is still in progress
>> >> will block until the first operation completes. ... The view of a file
>> >> provided by an instance of this class is guaranteed to be consistent
>> >> with other views of the same file provided by other instances in the
>> >> same program."
>> >>
>> >> This sounds related though:
>> >>
>> >>
>> >>
>> https://stackoverflow.com/questions/45441249/why-does-java-filechannel-truncate-fail-predictably-on-windows-only
>> >>
>> >> Regards
>> >> Sven
>> >>
>> >>
>> >> On 16.11.21 19:56, Ernesto Reinaldo Barreiro wrote:
>> >>> Hi Sven,
>> >>>
>> >>> Many thanks for your answer. Main problem is I do not have Windows
>> >>> around... this happens only in our Jenkins (which needs to be a
>> windows
>> >>> machine). I did some googling around and it seems it can be the
>> operating
>> >>> system itself if you access the same file in a very fast sequence:
>> this
>> >>> might be our case, as we are generating many web sockets messages
>> >> (pushing
>> >>> components) and this seems to trigger page serialization.
>> >>>
>> >>> On Linux and Mac we have no problems at all.
>> >>>
>> >>>
>> >>> On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:
>> >>>
>> >>>> Hi Ernesto,
>> >>>>
>> >>>> maybe an issue with concurrent file writes?
>> >>>>
>> >>>> I've tested the new FilePageStore on Linux only, and as it seems I
>> >>>> didn't add any synchronization to it.
>> >>>>
>> >>>> Could you try out FilePageStoreTest?
>> >>>>
>> >>>> Regards
>> >>>> Sven
>> >>>>
>> >>>>
>> >>>> On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:
>> >>>>> Hi,
>> >>>>>
>> >>>>> We are trying to use FilePageStore and we are getting following
>> >>>>> exception (a lot of them actually)
>> >>>>>
>> >>>>> he requested operation cannot be performed on a file with a
>> user-mapped
>> >>>>> section open
>> >>>>> [2021-11-16T07:34:00.699Z] at
>> >>>>>
>> >>
>> sun.nio.fs.Windo

Re: exception in windows while using FilePageStore

2021-11-18 Thread Ernesto Reinaldo Barreiro
Hi Sven,

Many thanks for your answer.

On Thu, Nov 18, 2021 at 12:36 PM Sven Meier  wrote:

> Hi Ernesto,
>
> I've tested FilePageStore without TRUNCATE_EXISTING - in that case the
> file will not shrink, when the page has reduced its size.
>
Ok.

>
> Luckily this doesn't disturb Java's default deserialization, the excess
> is just ignored.
> But what if a project uses another serializer?
>
> Good point. For us something like this will be enough:

https://github.com/apache/wicket/pull/484



> Regards
>
> Sven
>
>
> On 17.11.21 10:57, Ernesto Reinaldo Barreiro wrote:
> > Hi Sven,
> >
> > Getting rid of the StandardOpenOption.TRUNCATE_EXISTING here
> >
> >
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/pageStore/FilePageStore.java#L189
> >
> > seems to "fix" the problem in windows and I also do not see problems in
> > linux. To be honest I have no idea of the full implications of this
> change.
> >
> >
> >
> > On Tue, Nov 16, 2021 at 11:40 PM Sven Meier  wrote:
> >
> >> Hi Ernesto,
> >>
> >> I'm no expert in this, but as I understood it FileChannel should be save
> >> to be written to in parallel:
> >>
> >>
> >>
> https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/FileChannel.html
> >>
> >> "File channels are safe for use by multiple concurrent threads. ...
> >> Only one operation that involves the channel's position or can change
> >> its file's size may be in progress at any given time; attempts to
> >> initiate a second such operation while the first is still in progress
> >> will block until the first operation completes. ... The view of a file
> >> provided by an instance of this class is guaranteed to be consistent
> >> with other views of the same file provided by other instances in the
> >> same program."
> >>
> >> This sounds related though:
> >>
> >>
> >>
> https://stackoverflow.com/questions/45441249/why-does-java-filechannel-truncate-fail-predictably-on-windows-only
> >>
> >> Regards
> >> Sven
> >>
> >>
> >> On 16.11.21 19:56, Ernesto Reinaldo Barreiro wrote:
> >>> Hi Sven,
> >>>
> >>> Many thanks for your answer. Main problem is I do not have Windows
> >>> around... this happens only in our Jenkins (which needs to be a windows
> >>> machine). I did some googling around and it seems it can be the
> operating
> >>> system itself if you access the same file in a very fast sequence: this
> >>> might be our case, as we are generating many web sockets messages
> >> (pushing
> >>> components) and this seems to trigger page serialization.
> >>>
> >>> On Linux and Mac we have no problems at all.
> >>>
> >>>
> >>> On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:
> >>>
> >>>> Hi Ernesto,
> >>>>
> >>>> maybe an issue with concurrent file writes?
> >>>>
> >>>> I've tested the new FilePageStore on Linux only, and as it seems I
> >>>> didn't add any synchronization to it.
> >>>>
> >>>> Could you try out FilePageStoreTest?
> >>>>
> >>>> Regards
> >>>> Sven
> >>>>
> >>>>
> >>>> On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:
> >>>>> Hi,
> >>>>>
> >>>>> We are trying to use FilePageStore and we are getting following
> >>>>> exception (a lot of them actually)
> >>>>>
> >>>>> he requested operation cannot be performed on a file with a
> user-mapped
> >>>>> section open
> >>>>> [2021-11-16T07:34:00.699Z] at
> >>>>>
> >>
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
> >>>>> ~[?:?]
> >>>>> [2021-11-16T07:34:00.699Z] at
> >>>>>
> >>
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
> >>>>> ~[?:?]
> >>>>> [2021-11-16T07:34:00.699Z] at
> >>>>>
> >>
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
> >>>>> ~[?:?]
> >>>>> [2021-11-16T07:34:00.699Z] at
> >>>>>
> >>
> sun.nio.fs.WindowsFileSystemProvider.newFile

Re: exception in windows while using FilePageStore

2021-11-18 Thread Sven Meier

Hi Ernesto,

I've tested FilePageStore without TRUNCATE_EXISTING - in that case the 
file will not shrink, when the page has reduced its size.


Luckily this doesn't disturb Java's default deserialization, the excess 
is just ignored.

But what if a project uses another serializer?

Regards

Sven


On 17.11.21 10:57, Ernesto Reinaldo Barreiro wrote:

Hi Sven,

Getting rid of the StandardOpenOption.TRUNCATE_EXISTING here

https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/pageStore/FilePageStore.java#L189

seems to "fix" the problem in windows and I also do not see problems in
linux. To be honest I have no idea of the full implications of this change.



On Tue, Nov 16, 2021 at 11:40 PM Sven Meier  wrote:


Hi Ernesto,

I'm no expert in this, but as I understood it FileChannel should be save
to be written to in parallel:


https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/FileChannel.html

"File channels are safe for use by multiple concurrent threads. ...
Only one operation that involves the channel's position or can change
its file's size may be in progress at any given time; attempts to
initiate a second such operation while the first is still in progress
will block until the first operation completes. ... The view of a file
provided by an instance of this class is guaranteed to be consistent
with other views of the same file provided by other instances in the
same program."

This sounds related though:


https://stackoverflow.com/questions/45441249/why-does-java-filechannel-truncate-fail-predictably-on-windows-only

Regards
Sven


On 16.11.21 19:56, Ernesto Reinaldo Barreiro wrote:

Hi Sven,

Many thanks for your answer. Main problem is I do not have Windows
around... this happens only in our Jenkins (which needs to be a windows
machine). I did some googling around and it seems it can be the operating
system itself if you access the same file in a very fast sequence: this
might be our case, as we are generating many web sockets messages

(pushing

components) and this seems to trigger page serialization.

On Linux and Mac we have no problems at all.


On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:


Hi Ernesto,

maybe an issue with concurrent file writes?

I've tested the new FilePageStore on Linux only, and as it seems I
didn't add any synchronization to it.

Could you try out FilePageStoreTest?

Regards
Sven


On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:

Hi,

We are trying to use FilePageStore and we are getting following
exception (a lot of them actually)

he requested operation cannot be performed on a file with a user-mapped
section open
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)

~[?:?]
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)

~[?:?]
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)

~[?:?]
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)

~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833)

[?:?]

This does not happen for other operating systems. Is this a known
limitation? Is there anything else that needs to be configured at

operating

system level?

Thanks in advance.


-
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




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



Re: exception in windows while using FilePageStore

2021-11-17 Thread Ernesto Reinaldo Barreiro
Hi Sven,

Getting rid of the StandardOpenOption.TRUNCATE_EXISTING here

https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/pageStore/FilePageStore.java#L189

seems to "fix" the problem in windows and I also do not see problems in
linux. To be honest I have no idea of the full implications of this change.



On Tue, Nov 16, 2021 at 11:40 PM Sven Meier  wrote:

> Hi Ernesto,
>
> I'm no expert in this, but as I understood it FileChannel should be save
> to be written to in parallel:
>
>
> https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/FileChannel.html
>
> "File channels are safe for use by multiple concurrent threads. ...
> Only one operation that involves the channel's position or can change
> its file's size may be in progress at any given time; attempts to
> initiate a second such operation while the first is still in progress
> will block until the first operation completes. ... The view of a file
> provided by an instance of this class is guaranteed to be consistent
> with other views of the same file provided by other instances in the
> same program."
>
> This sounds related though:
>
>
> https://stackoverflow.com/questions/45441249/why-does-java-filechannel-truncate-fail-predictably-on-windows-only
>
> Regards
> Sven
>
>
> On 16.11.21 19:56, Ernesto Reinaldo Barreiro wrote:
> > Hi Sven,
> >
> > Many thanks for your answer. Main problem is I do not have Windows
> > around... this happens only in our Jenkins (which needs to be a windows
> > machine). I did some googling around and it seems it can be the operating
> > system itself if you access the same file in a very fast sequence: this
> > might be our case, as we are generating many web sockets messages
> (pushing
> > components) and this seems to trigger page serialization.
> >
> > On Linux and Mac we have no problems at all.
> >
> >
> > On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:
> >
> >> Hi Ernesto,
> >>
> >> maybe an issue with concurrent file writes?
> >>
> >> I've tested the new FilePageStore on Linux only, and as it seems I
> >> didn't add any synchronization to it.
> >>
> >> Could you try out FilePageStoreTest?
> >>
> >> Regards
> >> Sven
> >>
> >>
> >> On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:
> >>> Hi,
> >>>
> >>> We are trying to use FilePageStore and we are getting following
> >>> exception (a lot of them actually)
> >>>
> >>> he requested operation cannot be performed on a file with a user-mapped
> >>> section open
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>> java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>> java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833)
> [?:?]
> >>>
> >>> This does not happen for other operating systems. Is this a known
> >>> limitation? Is there anything else that needs to be configured at
> >> operating
> >>> system level?
> >>>
> >>> Thanks in advance.
> >>>
> >> -
> >> 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
>
>

-- 
Regards - Ernesto Reinaldo Barreiro


Re: exception in windows while using FilePageStore

2021-11-16 Thread Ernesto Reinaldo Barreiro
Hi Sven,

Many thanks for your answer and ultra fast response!

On Tue, Nov 16, 2021 at 11:40 PM Sven Meier  wrote:

> Hi Ernesto,
>
> I'm no expert in this, but as I understood it FileChannel should be save
> to be written to in parallel:
>
>
> https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/FileChannel.html
>
> "File channels are safe for use by multiple concurrent threads. ...
> Only one operation that involves the channel's position or can change
> its file's size may be in progress at any given time; attempts to
> initiate a second such operation while the first is still in progress
> will block until the first operation completes. ... The view of a file
> provided by an instance of this class is guaranteed to be consistent
> with other views of the same file provided by other instances in the
> same program."
>
> This sounds related though:
>
>
> https://stackoverflow.com/questions/45441249/why-does-java-filechannel-truncate-fail-predictably-on-windows-only


Yes I hit some other posts similar to this one. We have other team members
looking at this too and any answer they found we will come back to you. If
there is anything that can be improved at wicket level (e.g. documentation
on how to use this in windows) we will share what we found. Many thanks
again!


>
>
> Regards
> Sven
>
>
> On 16.11.21 19:56, Ernesto Reinaldo Barreiro wrote:
> > Hi Sven,
> >
> > Many thanks for your answer. Main problem is I do not have Windows
> > around... this happens only in our Jenkins (which needs to be a windows
> > machine). I did some googling around and it seems it can be the operating
> > system itself if you access the same file in a very fast sequence: this
> > might be our case, as we are generating many web sockets messages
> (pushing
> > components) and this seems to trigger page serialization.
> >
> > On Linux and Mac we have no problems at all.
> >
> >
> > On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:
> >
> >> Hi Ernesto,
> >>
> >> maybe an issue with concurrent file writes?
> >>
> >> I've tested the new FilePageStore on Linux only, and as it seems I
> >> didn't add any synchronization to it.
> >>
> >> Could you try out FilePageStoreTest?
> >>
> >> Regards
> >> Sven
> >>
> >>
> >> On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:
> >>> Hi,
> >>>
> >>> We are trying to use FilePageStore and we are getting following
> >>> exception (a lot of them actually)
> >>>
> >>> he requested operation cannot be performed on a file with a user-mapped
> >>> section open
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)
> >>> ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>> java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>> java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at
> >>>
> >>
> org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)
> >>> [wicket-core-9.6.0.jar:9.6.0]
> >>> [2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833)
> [?:?]
> >>>
> >>> This does not happen for other operating systems. Is this a known
> >>> limitation? Is there anything else that needs to be configured at
> >> operating
> >>> system level?
> >>>
> >>> Thanks in advance.
> >>>
> >> -
> >> 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
>
>

-- 
Regards - Ernesto Reinaldo Barreiro


Re: exception in windows while using FilePageStore

2021-11-16 Thread Sven Meier

Hi Ernesto,

I'm no expert in this, but as I understood it FileChannel should be save 
to be written to in parallel:


https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/FileChannel.html

"File channels are safe for use by multiple concurrent threads. ...  
Only one operation that involves the channel's position or can change 
its file's size may be in progress at any given time; attempts to 
initiate a second such operation while the first is still in progress 
will block until the first operation completes. ... The view of a file 
provided by an instance of this class is guaranteed to be consistent 
with other views of the same file provided by other instances in the 
same program."


This sounds related though:

https://stackoverflow.com/questions/45441249/why-does-java-filechannel-truncate-fail-predictably-on-windows-only

Regards
Sven


On 16.11.21 19:56, Ernesto Reinaldo Barreiro wrote:

Hi Sven,

Many thanks for your answer. Main problem is I do not have Windows
around... this happens only in our Jenkins (which needs to be a windows
machine). I did some googling around and it seems it can be the operating
system itself if you access the same file in a very fast sequence: this
might be our case, as we are generating many web sockets messages (pushing
components) and this seems to trigger page serialization.

On Linux and Mac we have no problems at all.


On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:


Hi Ernesto,

maybe an issue with concurrent file writes?

I've tested the new FilePageStore on Linux only, and as it seems I
didn't add any synchronization to it.

Could you try out FilePageStoreTest?

Regards
Sven


On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:

Hi,

We are trying to use FilePageStore and we are getting following
exception (a lot of them actually)

he requested operation cannot be performed on a file with a user-mapped
section open
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)

~[?:?]
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)

~[?:?]
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)

~[?:?]
[2021-11-16T07:34:00.699Z] at


sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)

~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at


org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)

[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833) [?:?]

This does not happen for other operating systems. Is this a known
limitation? Is there anything else that needs to be configured at

operating

system level?

Thanks in advance.


-
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



Re: exception in windows while using FilePageStore

2021-11-16 Thread Ernesto Reinaldo Barreiro
Hi Sven,

Many thanks for your answer. Main problem is I do not have Windows
around... this happens only in our Jenkins (which needs to be a windows
machine). I did some googling around and it seems it can be the operating
system itself if you access the same file in a very fast sequence: this
might be our case, as we are generating many web sockets messages (pushing
components) and this seems to trigger page serialization.

On Linux and Mac we have no problems at all.


On Tue, Nov 16, 2021 at 7:28 PM Sven Meier  wrote:

> Hi Ernesto,
>
> maybe an issue with concurrent file writes?
>
> I've tested the new FilePageStore on Linux only, and as it seems I
> didn't add any synchronization to it.
>
> Could you try out FilePageStoreTest?
>
> Regards
> Sven
>
>
> On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:
> > Hi,
> >
> > We are trying to use FilePageStore and we are getting following
> > exception (a lot of them actually)
> >
> > he requested operation cannot be performed on a file with a user-mapped
> > section open
> > [2021-11-16T07:34:00.699Z] at
> >
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
> > ~[?:?]
> > [2021-11-16T07:34:00.699Z] at
> >
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
> > ~[?:?]
> > [2021-11-16T07:34:00.699Z] at
> >
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
> > ~[?:?]
> > [2021-11-16T07:34:00.699Z] at
> >
> sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)
> > ~[?:?]
> > [2021-11-16T07:34:00.699Z] at
> > java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
> > [2021-11-16T07:34:00.699Z] at
> > java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
> > [2021-11-16T07:34:00.699Z] at
> >
> org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)
> > [wicket-core-9.6.0.jar:9.6.0]
> > [2021-11-16T07:34:00.699Z] at
> >
> org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)
> > [wicket-core-9.6.0.jar:9.6.0]
> > [2021-11-16T07:34:00.699Z] at
> >
> org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)
> > [wicket-core-9.6.0.jar:9.6.0]
> > [2021-11-16T07:34:00.699Z] at
> >
> org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)
> > [wicket-core-9.6.0.jar:9.6.0]
> > [2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833) [?:?]
> >
> > This does not happen for other operating systems. Is this a known
> > limitation? Is there anything else that needs to be configured at
> operating
> > system level?
> >
> > Thanks in advance.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
Regards - Ernesto Reinaldo Barreiro


Re: exception in windows while using FilePageStore

2021-11-16 Thread Sven Meier

Hi Ernesto,

maybe an issue with concurrent file writes?

I've tested the new FilePageStore on Linux only, and as it seems I 
didn't add any synchronization to it.


Could you try out FilePageStoreTest?

Regards
Sven


On 16.11.21 16:18, Ernesto Reinaldo Barreiro wrote:

Hi,

We are trying to use FilePageStore and we are getting following
exception (a lot of them actually)

he requested operation cannot be performed on a file with a user-mapped
section open
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
~[?:?]
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
~[?:?]
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
~[?:?]
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)
~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833) [?:?]

This does not happen for other operating systems. Is this a known
limitation? Is there anything else that needs to be configured at operating
system level?

Thanks in advance.



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



exception in windows while using FilePageStore

2021-11-16 Thread Ernesto Reinaldo Barreiro
Hi,

We are trying to use FilePageStore and we are getting following
exception (a lot of them actually)

he requested operation cannot be performed on a file with a user-mapped
section open
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
~[?:?]
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
~[?:?]
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
~[?:?]
[2021-11-16T07:34:00.699Z] at
sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:121)
~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:298) ~[?:?]
[2021-11-16T07:34:00.699Z] at
java.nio.channels.FileChannel.open(FileChannel.java:357) ~[?:?]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.FilePageStore.writeFile(FilePageStore.java:188)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.FilePageStore.addPersistedPage(FilePageStore.java:178)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.AbstractPersistentPageStore.addPage(AbstractPersistentPageStore.java:128)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at
org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:292)
[wicket-core-9.6.0.jar:9.6.0]
[2021-11-16T07:34:00.699Z] at java.lang.Thread.run(Thread.java:833) [?:?]

This does not happen for other operating systems. Is this a known
limitation? Is there anything else that needs to be configured at operating
system level?

Thanks in advance.

-- 
Regards - Ernesto Reinaldo Barreiro


Re: Component.getPage() and Exception Handling

2020-08-25 Thread Daniel Weiss

Hey all,

after few hours of debugging, clean the inheritance structure and the 
right call of "onBeforeRender" vs "add;addOrReplace" > it works! :)


Yeah ... was hard stuff and a better code review will make something 
simplier.

Thx for your help/motivation :)

Greets
Daniel

Am 24.08.2020 um 17:07 schrieb Sven Meier:

Hi,

I didn't understand what's your problem.

Sven


On 24.08.20 16:56, Daniel Weiss wrote:

Hello all,

I don't like the exception handling of Component.getPage(). We are 
working on the integration to Wicket 8.4. We use panels or dialogs as 
anonymous classes / instances and this feature will blocked us to 
redefine a parent component or page.


In fact (I think ..) we don't need this to handle anonymous 
implementations. My first thoughts about this was "what the hell ... 
why ... and whats the benefit of it?" :)


Please explain or link a reason,documentation etc. to handle it and 
the reason for it.


Thx in advance!
Daniel

https://issues.apache.org/jira/browse/WICKET-6415
https://github.com/apache/wicket/commit/140fea6/




-
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



Re: Component.getPage() and Exception Handling

2020-08-24 Thread Sven Meier

Hi,

I didn't understand what's your problem.

Sven


On 24.08.20 16:56, Daniel Weiss wrote:

Hello all,

I don't like the exception handling of Component.getPage(). We are 
working on the integration to Wicket 8.4. We use panels or dialogs as 
anonymous classes / instances and this feature will blocked us to 
redefine a parent component or page.


In fact (I think ..) we don't need this to handle anonymous 
implementations. My first thoughts about this was "what the hell ... 
why ... and whats the benefit of it?" :)


Please explain or link a reason,documentation etc. to handle it and 
the reason for it.


Thx in advance!
Daniel

https://issues.apache.org/jira/browse/WICKET-6415
https://github.com/apache/wicket/commit/140fea6/




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



Component.getPage() and Exception Handling

2020-08-24 Thread Daniel Weiss

Hello all,

I don't like the exception handling of Component.getPage(). We are 
working on the integration to Wicket 8.4. We use panels or dialogs as 
anonymous classes / instances and this feature will blocked us to 
redefine a parent component or page.


In fact (I think ..) we don't need this to handle anonymous 
implementations. My first thoughts about this was "what the hell ... why 
... and whats the benefit of it?" :)


Please explain or link a reason,documentation etc. to handle it and the 
reason for it.


Thx in advance!
Daniel

https://issues.apache.org/jira/browse/WICKET-6415
https://github.com/apache/wicket/commit/140fea6/



RE: Exception handling wicket 8

2019-02-18 Thread HOPPAN Matúš
Thanks for fast response, ive created quickstart and attached it to JIRA issue
https://issues.apache.org/jira/browse/WICKET-6637

Matus

-Original Message-
From: Martin Grigorov 
Sent: Monday, February 18, 2019 1:49 PM
To: users@wicket.apache.org
Subject: Re: Exception handling wicket 8

Hi,

Sounds like a bug in Wicket.
If you can reproduce it in a quickstart (mini) application then please attach 
it to a ticket in JIRA!
Thanks!

On Mon, Feb 18, 2019 at 2:45 PM HOPPAN Matúš  wrote:

> Hi,
>
> recently we have upgraded our application, from wicket 7.11 to wicket
> 8.3.0.
> With wicket 7 everything seemed to be fine, however in wicket 8 we
> have an issue with handling exception.
> In Application we have in init() method:
> 
> getRequestCycleListeners().add(new
> MyRequestCycleListener());
> 
>
>
> MyRequestCycleListener implements IRequestCycleListener and override
> method
>
>  
> @Override
>     public IRequestHandler onException(RequestCycle cycle, Exception ex) {}
>   Optional target = cycle.find(AjaxRequestTarget.class);
>   //this part stopped working since it return Optional.empty(),
> because active RequestHandler
>   //and RequestHandlerScheduledAfterCurrent are both null
> if (target.isPresent()) {
> return target.get();
> }
> IPageRequestHandler last =
> PageRequestHandlerTracker.getLastHandler(RequestCycle.get());
> WebPage page = (WebPage) (last.getPage());
>return new RenderPageRequestHandler(new
> PageProvider(currentPage));
>}
> 
>
> Is this a wicket bug or it was intention to work like this? If it was
> intentended, is there any workaround to get the AjaxRequestTarget? Or
> the approach has changed in wicket 8? Any other ideas?
>
>
> Matus
>
> 
>
> Táto správa je určená iba pre uvedeného príjemcu a môže obsahovať
> dôverné alebo interné informácie. Ak ste ju omylom obdržali,
> upovedomte o tom prosím odosielateľa a vymažte ju. Akýkoľvek iný
> spôsob použitia tohto e-mailu je zakázaný.
>
> This message is for the designated recipient only and may contain
> confidential or internal information. If you have received it in
> error, please notify the sender immediately and delete the original.
> Any other use of the e-mail by you is prohibited.
>



Táto správa je určená iba pre uvedeného príjemcu a môže obsahovať dôverné alebo 
interné informácie. Ak ste ju omylom obdržali, upovedomte o tom prosím 
odosielateľa a vymažte ju. Akýkoľvek iný spôsob použitia tohto e-mailu je 
zakázaný.

This message is for the designated recipient only and may contain confidential 
or internal information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of the e-mail by you 
is prohibited.


Re: Exception handling wicket 8

2019-02-18 Thread Martin Grigorov
Hi,

Sounds like a bug in Wicket.
If you can reproduce it in a quickstart (mini) application then please
attach it to a ticket in JIRA!
Thanks!

On Mon, Feb 18, 2019 at 2:45 PM HOPPAN Matúš  wrote:

> Hi,
>
> recently we have upgraded our application, from wicket 7.11 to wicket
> 8.3.0.
> With wicket 7 everything seemed to be fine, however in wicket 8 we have an
> issue
> with handling exception.
> In Application we have in init() method:
> 
> getRequestCycleListeners().add(new
> MyRequestCycleListener());
> 
>
>
> MyRequestCycleListener implements IRequestCycleListener and override method
>
>  
> @Override
>     public IRequestHandler onException(RequestCycle cycle, Exception ex) {}
>   Optional target = cycle.find(AjaxRequestTarget.class);
>   //this part stopped working since it return Optional.empty(), because
> active RequestHandler
>   //and RequestHandlerScheduledAfterCurrent are both null
> if (target.isPresent()) {
> return target.get();
> }
> IPageRequestHandler last =
> PageRequestHandlerTracker.getLastHandler(RequestCycle.get());
> WebPage page = (WebPage) (last.getPage());
>return new RenderPageRequestHandler(new
> PageProvider(currentPage));
>}
> 
>
> Is this a wicket bug or it was intention to work like this? If it was
> intentended, is there
> any workaround to get the AjaxRequestTarget? Or the approach has changed
> in wicket 8? Any other ideas?
>
>
> Matus
>
> 
>
> Táto správa je určená iba pre uvedeného príjemcu a môže obsahovať dôverné
> alebo interné informácie. Ak ste ju omylom obdržali, upovedomte o tom
> prosím odosielateľa a vymažte ju. Akýkoľvek iný spôsob použitia tohto
> e-mailu je zakázaný.
>
> This message is for the designated recipient only and may contain
> confidential or internal information. If you have received it in error,
> please notify the sender immediately and delete the original. Any other use
> of the e-mail by you is prohibited.
>


Exception handling wicket 8

2019-02-18 Thread HOPPAN Matúš
Hi,

recently we have upgraded our application, from wicket 7.11 to wicket 8.3.0.
With wicket 7 everything seemed to be fine, however in wicket 8 we have an issue
with handling exception.
In Application we have in init() method:

getRequestCycleListeners().add(new MyRequestCycleListener());



MyRequestCycleListener implements IRequestCycleListener and override method

 
@Override
public IRequestHandler onException(RequestCycle cycle, Exception ex) {}
  Optional target = cycle.find(AjaxRequestTarget.class);
  //this part stopped working since it return Optional.empty(), because active 
RequestHandler
  //and RequestHandlerScheduledAfterCurrent are both null
if (target.isPresent()) {
return target.get();
}
IPageRequestHandler last = 
PageRequestHandlerTracker.getLastHandler(RequestCycle.get());
WebPage page = (WebPage) (last.getPage());
   return new RenderPageRequestHandler(new 
PageProvider(currentPage));
   }


Is this a wicket bug or it was intention to work like this? If it was 
intentended, is there
any workaround to get the AjaxRequestTarget? Or the approach has changed in 
wicket 8? Any other ideas?


Matus



Táto správa je určená iba pre uvedeného príjemcu a môže obsahovať dôverné alebo 
interné informácie. Ak ste ju omylom obdržali, upovedomte o tom prosím 
odosielateľa a vymažte ju. Akýkoľvek iný spôsob použitia tohto e-mailu je 
zakázaný.

This message is for the designated recipient only and may contain confidential 
or internal information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of the e-mail by you 
is prohibited.


Re: Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Tom Götz
Ok, that problem seemed to be related to the wicket-bootstrap library, which we 
also use. An upgrade of that dependency from 0.10.7 to 0.10.16 solved the 
problem.

Cheers,
   Tom


> On 08.12.2017, at 09:21, Tom Götz <tgo...@decoded.de> wrote:
> 
> I have not tried, but I guess this only happens in our application’s 
> setup/environment. Just need a starting point for debugging, as something 
> must have changed between Wicket 7.4.0 and 7.5.0 that causes a different 
> behaviour in our app. Just asking here and hoping that someone else might 
> have experienced the same exception/behaviour …
> 
>   Tom
> 
> 
>> On 08.12.2017, at 09:06, Maxim Solodovnik <solomax...@gmail.com> wrote:
>> 
>> Hello Tom,
>> 
>> maybe you can create quickstart
>> http://wicket.apache.org/start/quickstart.html demonstrating this?
>> 
>> On Fri, Dec 8, 2017 at 3:00 PM, Tom Götz <t...@decoded.de> wrote:
>>> Hi there,
>>> 
>>> starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
>>> FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
>>> pages. Everything is fine if there are not messages, but as soon as there 
>>> is any message to be rendered, we get this:
>>> 
>>> org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
>>> render. Possible reasons could be that: 1) you have added a component in 
>>> code but forgot to reference it in the markup (thus the component will 
>>> never be rendered), 2) if your components were added in a parent container 
>>> then make sure the markup for the child container includes them in 
>>> .
>>> 
>>> 1. [Component id = message]
>>> 
>>> at org.apache.wicket.Page.checkRendering(Page.java:666) 
>>> ~[wicket-core-7.5.0.jar:7.5.0]
>>> 
>>> 
>>> Without any code changes in our application, this runs fine with Wicket 
>>> 7.4.0. Any hint where I could start looking what causes this?
>>> 
>>> 
>>> Cheers,
>>>  Tom


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



Re: Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Tom Götz
I have not tried, but I guess this only happens in our application’s 
setup/environment. Just need a starting point for debugging, as something must 
have changed between Wicket 7.4.0 and 7.5.0 that causes a different behaviour 
in our app. Just asking here and hoping that someone else might have 
experienced the same exception/behaviour …

   Tom


> On 08.12.2017, at 09:06, Maxim Solodovnik <solomax...@gmail.com> wrote:
> 
> Hello Tom,
> 
> maybe you can create quickstart
> http://wicket.apache.org/start/quickstart.html demonstrating this?
> 
> On Fri, Dec 8, 2017 at 3:00 PM, Tom Götz <t...@decoded.de> wrote:
>> Hi there,
>> 
>> starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
>> FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
>> pages. Everything is fine if there are not messages, but as soon as there is 
>> any message to be rendered, we get this:
>> 
>> org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
>> render. Possible reasons could be that: 1) you have added a component in 
>> code but forgot to reference it in the markup (thus the component will never 
>> be rendered), 2) if your components were added in a parent container then 
>> make sure the markup for the child container includes them in 
>> .
>> 
>> 1. [Component id = message]
>> 
>>  at org.apache.wicket.Page.checkRendering(Page.java:666) 
>> ~[wicket-core-7.5.0.jar:7.5.0]
>> 
>> 
>> Without any code changes in our application, this runs fine with Wicket 
>> 7.4.0. Any hint where I could start looking what causes this?
>> 
>> 
>> Cheers,
>>   Tom
>> 





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



Re: Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Maxim Solodovnik
Hello Tom,

maybe you can create quickstart
http://wicket.apache.org/start/quickstart.html demonstrating this?

On Fri, Dec 8, 2017 at 3:00 PM, Tom Götz  wrote:
> Hi there,
>
> starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
> FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
> pages. Everything is fine if there are not messages, but as soon as there is 
> any message to be rendered, we get this:
>
> org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
> render. Possible reasons could be that: 1) you have added a component in code 
> but forgot to reference it in the markup (thus the component will never be 
> rendered), 2) if your components were added in a parent container then make 
> sure the markup for the child container includes them in .
>
> 1. [Component id = message]
>
>   at org.apache.wicket.Page.checkRendering(Page.java:666) 
> ~[wicket-core-7.5.0.jar:7.5.0]
>
>
>  Without any code changes in our application, this runs fine with Wicket 
> 7.4.0. Any hint where I could start looking what causes this?
>
>
> Cheers,
>Tom
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
WBR
Maxim aka solomax

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



Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Tom Götz
Hi there,

starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
pages. Everything is fine if there are not messages, but as soon as there is 
any message to be rendered, we get this:

org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
render. Possible reasons could be that: 1) you have added a component in code 
but forgot to reference it in the markup (thus the component will never be 
rendered), 2) if your components were added in a parent container then make 
sure the markup for the child container includes them in .
 
1. [Component id = message]
 
  at org.apache.wicket.Page.checkRendering(Page.java:666) 
~[wicket-core-7.5.0.jar:7.5.0]


 Without any code changes in our application, this runs fine with Wicket 7.4.0. 
Any hint where I could start looking what causes this?


Cheers,
   Tom



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



Re: Custom handling of serialisation exception

2017-10-05 Thread Sven Meier

Hi,

you can use PageRequestHandlerTracker to get hold of the requested page.

Have fun
Sven


Am 05.10.2017 um 14:42 schrieb ssamarin:

Hello,
I'm trying to figure out on how to force wicket to re-render requested page.
On a first try it fails when it deserialises it from disk due to changes in
classfile (introduction of serialversionuid is not a solution for us,
unfortunately).
Please have a look at the following code snippet, I've been trying to get
.class from mounted pages and then invoke "return new
RenderPageRequestHandler"...but this doesn't seem to work.

... extends AbstractRequestCycleListener {

public IRequestHandler onException(RequestCycle cycle, Exception ex) {

if (ex instanceof RuntimeException && ex.getMessage() != null &&
ex.getMessage().contains("Could not deserialize object from byte[]")) {
IPageRequestHandler handler = 
cycle.find(IPageRequestHandler.class);
if (handler == null) {
for (Iterator it =
Application.get().getRootRequestMapperAsCompound().iterator(); it.hasNext();
) {
IRequestMapper mapper = it.next();
if (mapper instanceof MountedMapper) {
MountedMapper mm = 
(MountedMapper) mapper;


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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



Custom handling of serialisation exception

2017-10-05 Thread ssamarin
Hello,
I'm trying to figure out on how to force wicket to re-render requested page.
On a first try it fails when it deserialises it from disk due to changes in
classfile (introduction of serialversionuid is not a solution for us,
unfortunately). 
Please have a look at the following code snippet, I've been trying to get
.class from mounted pages and then invoke "return new
RenderPageRequestHandler"...but this doesn't seem to work.

... extends AbstractRequestCycleListener {

public IRequestHandler onException(RequestCycle cycle, Exception ex) {

if (ex instanceof RuntimeException && ex.getMessage() != null &&
ex.getMessage().contains("Could not deserialize object from byte[]")) {
IPageRequestHandler handler = 
cycle.find(IPageRequestHandler.class);
if (handler == null) {
for (Iterator it =
Application.get().getRootRequestMapperAsCompound().iterator(); it.hasNext();
) {
IRequestMapper mapper = it.next();
if (mapper instanceof MountedMapper) {
MountedMapper mm = 
(MountedMapper) mapper;


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Wicket Modal throws exception

2017-05-01 Thread Martin Grigorov
Please start new threads for new issues!

Double check that this particular component indeed renders its HTML element.
No matter what Java methods you call on the component it won't render if
the used HTML element is . Depending on your MarkupSettings
this elements are usually not rendered.

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

On Mon, May 1, 2017 at 9:06 PM, Entropy <blmulholl...@gmail.com> wrote:

> Upgrading seems to fix this specific issue.  However, I am no getting
> another
> odd behavior.  I am trying to update some text and button captions on the
> page.  It's working, but gives an error in javascript despite the working.
>
> Wicket.Ajax:  Wicket.Ajax.Call.processComponent: Component with id
> [[message]] was not found while trying to perform markup update. Make sure
> you called component.setOutputMarkupId(true) on the component whose markup
> you are trying to update.
>
> It says that, but in fact, I DID call setOutputMarkupId(true) on not just
> that component, but EVERY component in the modal, overkill though it may
> be.
> I also called setOutputPlaceholderTag and setMarkupId just in case.
> Neither
> changed anything.
>
> The confusing part is that the label change AND the button caption changes
> ARE working.
>
> The relevant part of the ajax event:
>
> message.setDefaultModelObject(modalWindow.getMessage());
> button.setVisible(true);
> button.setDefaultModel(new Model(modalWindow.
> getButtonCaption()));
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p460.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: Wicket Modal throws exception

2017-05-01 Thread Entropy
Upgrading seems to fix this specific issue.  However, I am no getting another
odd behavior.  I am trying to update some text and button captions on the
page.  It's working, but gives an error in javascript despite the working.

Wicket.Ajax:  Wicket.Ajax.Call.processComponent: Component with id
[[message]] was not found while trying to perform markup update. Make sure
you called component.setOutputMarkupId(true) on the component whose markup
you are trying to update.

It says that, but in fact, I DID call setOutputMarkupId(true) on not just
that component, but EVERY component in the modal, overkill though it may be. 
I also called setOutputPlaceholderTag and setMarkupId just in case.  Neither
changed anything.  

The confusing part is that the label change AND the button caption changes
ARE working.  

The relevant part of the ajax event:

message.setDefaultModelObject(modalWindow.getMessage());
button.setVisible(true);
button.setDefaultModel(new 
Model(modalWindow.getButtonCaption()));



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p460.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: Wicket Modal throws exception

2017-05-01 Thread Martin Grigorov
First "workaround" that everyone should try whenever something behaves
wrong is to upgrade to the latest stable version! In your case this is
6.26.0.

If this doesn't help then try to reproduce the problem in a small demo app.
Share it somehow with us (JIRA ticket, GitHub project, ...) and someone
will either fix the app for you or fix Wicket!

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

On Mon, May 1, 2017 at 1:36 PM, Entropy <blmulholl...@gmail.com> wrote:

> 6.24.  Is there a workaround?  We're using modals elsewhere.  I am trying
> to
> make one that will be more general purpose, but it otherwise seems the same
> as our others and I am not sure what is so different about it.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p4677768.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: Wicket Modal throws exception

2017-05-01 Thread Entropy
6.24.  Is there a workaround?  We're using modals elsewhere.  I am trying to
make one that will be more general purpose, but it otherwise seems the same
as our others and I am not sure what is so different about it.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p4677768.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: Wicket Modal throws exception

2017-04-30 Thread Martin Grigorov
Wicket version ?

I think there was a bug related to that that has been fixed an year (?!)
ago.

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

On Sun, Apr 30, 2017 at 8:39 PM, Entropy <blmulholl...@gmail.com> wrote:

> I am addding a Wicket Modal.  I go to render it on button click and amd
> getting the below trace.  But I don't have _header_ in my page, in the
> modal, or anywhere in my app actually (I searched the whole workspace), so
> I'm not sure where it comes from, and therefore am not sure how to fix it.
>
> org.apache.wicket.WicketRuntimeException: Cannot replace a component which
> has not been added: id='_header_', component=[HtmlHeaderContainer
> [Component
> id = _header_]]:
> [Page class = com.mycompany.mypage, id = 0, render count = 1]
> at org.apache.wicket.MarkupContainer.replace(
> MarkupContainer.java:734)
> at
> org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(
> AbstractAjaxResponse.java:170)
> at
> org.apache.wicket.ajax.AjaxRequestHandler.respond(
> AjaxRequestHandler.java:359)
> at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(
> RequestCycle.java:890)
> 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.protocol.http.WicketFilter.processRequestCycle(
> WicketFilter.java:259)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.
> java:201)
> at
> org.apache.wicket.protocol.http.WicketServlet.doPost(
> WicketServlet.java:159)
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-Modal-throws-exception-tp4677764.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
>
>


Wicket Modal throws exception

2017-04-30 Thread Entropy
I am addding a Wicket Modal.  I go to render it on button click and amd
getting the below trace.  But I don't have _header_ in my page, in the
modal, or anywhere in my app actually (I searched the whole workspace), so
I'm not sure where it comes from, and therefore am not sure how to fix it.

org.apache.wicket.WicketRuntimeException: Cannot replace a component which
has not been added: id='_header_', component=[HtmlHeaderContainer [Component
id = _header_]]:
[Page class = com.mycompany.mypage, id = 0, render count = 1]
at org.apache.wicket.MarkupContainer.replace(MarkupContainer.java:734)
at
org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:170)
at
org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:359)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
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.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:159)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764.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: WicketMessage: Can't instantiate page using constructor 'public com.mycompany.StartPage()'. An exception has been thrown during construction!

2017-03-26 Thread Sokab
Thank You very much!! :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketMessage-Can-t-instantiate-page-using-constructor-public-com-mycompany-StartPage-An-exception-h-tp4677445p4677447.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: WicketMessage: Can't instantiate page using constructor 'public com.mycompany.StartPage()'. An exception has been thrown during construction!

2017-03-26 Thread Sven Meier

Hi,

apparently your injection isn't set up correctly, thus managerLocal is null.

Please take a look how the CDI example does it in wicket-examples, e.g. 
the following is missing at least:


new CdiConfiguration().configure(this);

Have fun
Sven


On 26.03.2017 17:53, Sokab wrote:

Hi Everyone! I am new and I want to learn to Wicket. When I create new simple
project with Wicket everything is ok but when I try add EJB class to Wicket
(WebPage) always i have this same error:

"WicketMessage: Can't instantiate page using constructor 'public
com.mycompany.StartPage()'. An exception has been thrown during
construction!"

It is my Wicket class:

import javax.ejb.EJB;
import org.apache.wicket.markup.html.WebPage;
public class StartPage extends WebPage{
 @EJB
 PersonManagerLocal managerLocal;

 public StartPage() {
 managerLocal.addPerson();
 }
}
//***
EJB class:

@Stateless
public class PersonManager implements PersonManagerLocal{

 @Override
 public void addPerson() {
 System.out.println("HELLO I AM EJB");
 }
//***
Interface:
//@Local
public interface PersonManagerLocal {
 public void addPerson();
}
//***
WEB.xml:

http://xmlns.jcp.org/xml/ns/javaee;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
 version="3.1">
 
 
 30
 
 
 
 

 WicketSampleEterprise-war

org.apache.wicket.protocol.http.WicketFilter

 
 applicationClassName
 com.mycompany.WicketApplication
 
 

 
 WicketSampleEterprise-war
 /*
 

//***
Wicket initialization class:

public class WicketApplication extends WebApplication{

 @Override
 public Class getHomePage()
 {
 return StartPage.class;
 }
 
 @Override

 protected void init(){
 super.init();
 }
}

I use: Netbeans 8.2, Wicket 7, EJB3.1, wildfly 10
Maybe someone knows what's wrong? Thank you for any advice.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketMessage-Can-t-instantiate-page-using-constructor-public-com-mycompany-StartPage-An-exception-h-tp4677445.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





WicketMessage: Can't instantiate page using constructor 'public com.mycompany.StartPage()'. An exception has been thrown during construction!

2017-03-26 Thread Sokab
Hi Everyone! I am new and I want to learn to Wicket. When I create new simple
project with Wicket everything is ok but when I try add EJB class to Wicket
(WebPage) always i have this same error:

"WicketMessage: Can't instantiate page using constructor 'public
com.mycompany.StartPage()'. An exception has been thrown during
construction!"

It is my Wicket class:

import javax.ejb.EJB;
import org.apache.wicket.markup.html.WebPage;
public class StartPage extends WebPage{
@EJB
PersonManagerLocal managerLocal;

public StartPage() {
managerLocal.addPerson();
}
}
//***
EJB class:

@Stateless
public class PersonManager implements PersonManagerLocal{

@Override
public void addPerson() {
System.out.println("HELLO I AM EJB");
}
//***
Interface:
//@Local
public interface PersonManagerLocal {
public void addPerson();
}
//***
WEB.xml:

http://xmlns.jcp.org/xml/ns/javaee;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd;
 version="3.1">


30




WicketSampleEterprise-war
   
org.apache.wicket.protocol.http.WicketFilter

applicationClassName
com.mycompany.WicketApplication




WicketSampleEterprise-war
/*


//***
Wicket initialization class:

public class WicketApplication extends WebApplication{

@Override
public Class getHomePage() 
{
return StartPage.class;
}

@Override
protected void init(){
super.init();
}
}

I use: Netbeans 8.2, Wicket 7, EJB3.1, wildfly 10
Maybe someone knows what's wrong? Thank you for any advice.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketMessage-Can-t-instantiate-page-using-constructor-public-com-mycompany-StartPage-An-exception-h-tp4677445.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: DiskDataStore exception at end of day

2017-02-09 Thread Martin Grigorov
On Wed, Feb 8, 2017 at 2:03 PM, Peter Henderson <peter.hender...@starjar.com
> wrote:

> Thanks Martin,
>
> On 8 February 2017 at 10:45, Martin Grigorov <mgrigo...@apache.org> wrote:
>
> > Hi,
> >
> > The WebSocket communication doesn't update the session, i.e. doesn't
> renew
> > it. This is by Servlet specification.
> > So if there is no normal HTTP request then the http session will expire
> and
> > Wicket will clean up its resources.
> > Later when a web socket message comes it might fail with such kind of
> > error.
> >
>
> I've done a little more analysis of the logs and my code.
>
> It seems this happened to only 1 used yesterday.
> Tracking her session ID she logs in, 7 hours later her session times out.
>
> My code has a HttpSessionListener which sends a message to an actor which
> monitors sessions. This actor eventually does a web socket broadcast to
> notify everyone who is online.
>
> Could there be a race condition when sessions are being destroyed and
> sending web socket push messages?
>

Wicket also uses HttpSessionListener to be notified when to cleanup the
user's resources.
It might be that your listener is notified later than Wicket's one.
You may try using Wicket's callbacks instead: Session#onInvalidate(),
Application#sessionUnbound()
/ org.apache.wicket.Application#getSessionListeners().add(...)


>
>
>
>
>
> >
> > I am not sure what is the best solution to this.
> > There is an established web socket connection and there won't be a new
> > handshake when the message arrives.
> > The only workaround I see is to make a ping once per N minutes, where N
> is
> > less than the session timeout duration.
> >
>
> When their session goes, does Tomcat & the browser keep a web socket
> connection open.
>

I'm not sure but it should be very easy to test!


>
> Perhaps the simplest option is for me to mute DiskDataStore exception log
> messages.
>
>
>
> >
> > But the exception in the DiskDataStore happens in a different thread, so
> I
> > think it should not affect the thread where the application reads/writes
> to
> > the websocket connection.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Feb 8, 2017 at 9:46 AM, Peter Henderson <
> > peter.hender...@starjar.com
> > > wrote:
> >
> > > Morning all.
> > >
> > > Wicket 7.6.0
> > > Tomcat 8.5.11
> > > Java 1.8.0_121
> > >
> > >
> > >
> > > I'm seeing several DiskDataStore Exceptions [1]. Normally towards the
> end
> > > of the day, long after users have stopped using my app. So probably
> when
> > > their sessions time out.
> > > The file name looks very suspicious to me.
> > > /opt/starjar/domains/customer/apache-tomcat-8.5.11/work/
> > > Catalina/localhost/Starjar/Key[type=org.apache.wicket.
> protocol.ws.javax.
> > > JavaxWebSocketFilter,
> > > annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C
> > > 39/data
> > >
> > >
> > >
> > > Another perhaps unrelated exception [2]
> > >
> > >
> > > Any pointers where I should dig to solve this ?
> > >
> > > Thanks
> > > Peter
> > >
> > >
> > >
> > >
> > >
> > > [1]
> > > 2017-02-07 20:59:34.358 SEVERE oawp.DiskDataStore
> > > /opt/starjar/domains/viper/apache-tomcat-8.5.11/work/
> > > Catalina/localhost/Starjar/Key[type=org.apache.wicket.
> protocol.ws.javax.
> > > JavaxWebSocketFilter,
> > > annotation=[none]]-filesto
> > > re/247/7021/D69E0EE552DC1F1FE5FF986A1A919C39/data (No such file or
> > > directory)
> > > java.io.FileNotFoundException:
> > > /opt/starjar/domains/customer/apache-tomcat-8.5.11/work/
> > > Catalina/localhost/Starjar/Key[type=org.apache.wicket.
> protocol.ws.javax.
> > > JavaxWebSocketFilter,
> > > annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C
> > > 39/data
> > > (No such file or directory)
> > > at java.io.RandomAccessFile.open0(Native Method)
> > > at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
> > > at java.io.RandomAccessFile.(RandomAccessFile.java:243)
> > > at
> > > org.apache.wicket.pageStore.DiskDataStore$SessionEntry.
> > > getFileChannel(DiskDataStore.java:432)
> > > at
> > > org.apache.wicket.pageS

Re: DiskDataStore exception at end of day

2017-02-08 Thread Peter Henderson
Thanks Martin,

On 8 February 2017 at 10:45, Martin Grigorov <mgrigo...@apache.org> wrote:

> Hi,
>
> The WebSocket communication doesn't update the session, i.e. doesn't renew
> it. This is by Servlet specification.
> So if there is no normal HTTP request then the http session will expire and
> Wicket will clean up its resources.
> Later when a web socket message comes it might fail with such kind of
> error.
>

I've done a little more analysis of the logs and my code.

It seems this happened to only 1 used yesterday.
Tracking her session ID she logs in, 7 hours later her session times out.

My code has a HttpSessionListener which sends a message to an actor which
monitors sessions. This actor eventually does a web socket broadcast to
notify everyone who is online.

Could there be a race condition when sessions are being destroyed and
sending web socket push messages?





>
> I am not sure what is the best solution to this.
> There is an established web socket connection and there won't be a new
> handshake when the message arrives.
> The only workaround I see is to make a ping once per N minutes, where N is
> less than the session timeout duration.
>

When their session goes, does Tomcat & the browser keep a web socket
connection open.

Perhaps the simplest option is for me to mute DiskDataStore exception log
messages.



>
> But the exception in the DiskDataStore happens in a different thread, so I
> think it should not affect the thread where the application reads/writes to
> the websocket connection.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Feb 8, 2017 at 9:46 AM, Peter Henderson <
> peter.hender...@starjar.com
> > wrote:
>
> > Morning all.
> >
> > Wicket 7.6.0
> > Tomcat 8.5.11
> > Java 1.8.0_121
> >
> >
> >
> > I'm seeing several DiskDataStore Exceptions [1]. Normally towards the end
> > of the day, long after users have stopped using my app. So probably when
> > their sessions time out.
> > The file name looks very suspicious to me.
> > /opt/starjar/domains/customer/apache-tomcat-8.5.11/work/
> > Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.
> > JavaxWebSocketFilter,
> > annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C
> > 39/data
> >
> >
> >
> > Another perhaps unrelated exception [2]
> >
> >
> > Any pointers where I should dig to solve this ?
> >
> > Thanks
> > Peter
> >
> >
> >
> >
> >
> > [1]
> > 2017-02-07 20:59:34.358 SEVERE oawp.DiskDataStore
> > /opt/starjar/domains/viper/apache-tomcat-8.5.11/work/
> > Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.
> > JavaxWebSocketFilter,
> > annotation=[none]]-filesto
> > re/247/7021/D69E0EE552DC1F1FE5FF986A1A919C39/data (No such file or
> > directory)
> > java.io.FileNotFoundException:
> > /opt/starjar/domains/customer/apache-tomcat-8.5.11/work/
> > Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.
> > JavaxWebSocketFilter,
> > annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C
> > 39/data
> > (No such file or directory)
> > at java.io.RandomAccessFile.open0(Native Method)
> > at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
> > at java.io.RandomAccessFile.(RandomAccessFile.java:243)
> > at
> > org.apache.wicket.pageStore.DiskDataStore$SessionEntry.
> > getFileChannel(DiskDataStore.java:432)
> > at
> > org.apache.wicket.pageStore.DiskDataStore$SessionEntry.
> > savePage(DiskDataStore.java:350)
> > at
> > org.apache.wicket.pageStore.DiskDataStore.storeData(
> > DiskDataStore.java:188)
> > at
> > org.apache.wicket.pageStore.AsynchronousDataStore$
> PageSavingRunnable.run(
> > AsynchronousDataStore.java:355)
> > at java.lang.Thread.run(Thread.java:745)
> >
> >
> >
> >
> >
> >
> > [2]
> > 2017-02-07 21:33:52.127 SEVERE oawpwj.WicketEndpoint An error occurred in
> > web socket connection with id : 5c1c
> > java.io.EOFException
> > at
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.
> > fillReadBuffer(NioEndpoint.java:1221)
> > at
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.
> > fillReadBuffer(NioEndpoint.java:1192)
> > at
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.
> > read(NioEndpoint.java:1165)
> > at
> > org.apache.tomcat.websock

Re: DiskDataStore exception at end of day

2017-02-08 Thread Martin Grigorov
Hi,

The WebSocket communication doesn't update the session, i.e. doesn't renew
it. This is by Servlet specification.
So if there is no normal HTTP request then the http session will expire and
Wicket will clean up its resources.
Later when a web socket message comes it might fail with such kind of error.

I am not sure what is the best solution to this.
There is an established web socket connection and there won't be a new
handshake when the message arrives.
The only workaround I see is to make a ping once per N minutes, where N is
less than the session timeout duration.

But the exception in the DiskDataStore happens in a different thread, so I
think it should not affect the thread where the application reads/writes to
the websocket connection.

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

On Wed, Feb 8, 2017 at 9:46 AM, Peter Henderson <peter.hender...@starjar.com
> wrote:

> Morning all.
>
> Wicket 7.6.0
> Tomcat 8.5.11
> Java 1.8.0_121
>
>
>
> I'm seeing several DiskDataStore Exceptions [1]. Normally towards the end
> of the day, long after users have stopped using my app. So probably when
> their sessions time out.
> The file name looks very suspicious to me.
> /opt/starjar/domains/customer/apache-tomcat-8.5.11/work/
> Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.
> JavaxWebSocketFilter,
> annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C
> 39/data
>
>
>
> Another perhaps unrelated exception [2]
>
>
> Any pointers where I should dig to solve this ?
>
> Thanks
> Peter
>
>
>
>
>
> [1]
> 2017-02-07 20:59:34.358 SEVERE oawp.DiskDataStore
> /opt/starjar/domains/viper/apache-tomcat-8.5.11/work/
> Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.
> JavaxWebSocketFilter,
> annotation=[none]]-filesto
> re/247/7021/D69E0EE552DC1F1FE5FF986A1A919C39/data (No such file or
> directory)
> java.io.FileNotFoundException:
> /opt/starjar/domains/customer/apache-tomcat-8.5.11/work/
> Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.
> JavaxWebSocketFilter,
> annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C
> 39/data
> (No such file or directory)
> at java.io.RandomAccessFile.open0(Native Method)
> at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
> at java.io.RandomAccessFile.(RandomAccessFile.java:243)
> at
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.
> getFileChannel(DiskDataStore.java:432)
> at
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.
> savePage(DiskDataStore.java:350)
> at
> org.apache.wicket.pageStore.DiskDataStore.storeData(
> DiskDataStore.java:188)
> at
> org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(
> AsynchronousDataStore.java:355)
> at java.lang.Thread.run(Thread.java:745)
>
>
>
>
>
>
> [2]
> 2017-02-07 21:33:52.127 SEVERE oawpwj.WicketEndpoint An error occurred in
> web socket connection with id : 5c1c
> java.io.EOFException
> at
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.
> fillReadBuffer(NioEndpoint.java:1221)
> at
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.
> fillReadBuffer(NioEndpoint.java:1192)
> at
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.
> read(NioEndpoint.java:1165)
> at
> org.apache.tomcat.websocket.server.WsFrameServer.
> onDataAvailable(WsFrameServer.java:63)
> at
> org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(
> WsHttpUpgradeHandler.java:148)
> at
> org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(
> UpgradeProcessorInternal.java:54)
> at
> org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:53)
> at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:798)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1434)
> 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:745)
>
>
>
> --
> Peter Henderson
>


DiskDataStore exception at end of day

2017-02-08 Thread Peter Henderson
Morning all.

Wicket 7.6.0
Tomcat 8.5.11
Java 1.8.0_121



I'm seeing several DiskDataStore Exceptions [1]. Normally towards the end
of the day, long after users have stopped using my app. So probably when
their sessions time out.
The file name looks very suspicious to me.
/opt/starjar/domains/customer/apache-tomcat-8.5.11/work/Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter,
annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C39/data



Another perhaps unrelated exception [2]


Any pointers where I should dig to solve this ?

Thanks
Peter





[1]
2017-02-07 20:59:34.358 SEVERE oawp.DiskDataStore
/opt/starjar/domains/viper/apache-tomcat-8.5.11/work/Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter,
annotation=[none]]-filesto
re/247/7021/D69E0EE552DC1F1FE5FF986A1A919C39/data (No such file or
directory)
java.io.FileNotFoundException:
/opt/starjar/domains/customer/apache-tomcat-8.5.11/work/Catalina/localhost/Starjar/Key[type=org.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter,
annotation=[none]]-filestore/247/7021/D69E0EE552DC1F1FE5FF986A1A919C39/data
(No such file or directory)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.(RandomAccessFile.java:243)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:432)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:350)
at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:188)
at
org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
at java.lang.Thread.run(Thread.java:745)






[2]
2017-02-07 21:33:52.127 SEVERE oawpwj.WicketEndpoint An error occurred in
web socket connection with id : 5c1c
java.io.EOFException
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1221)
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1192)
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1165)
at
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:63)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
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:745)



-- 
Peter Henderson


Re: Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

2017-01-28 Thread Martin Grigorov
Hi,

Please try with Tomcat 8.5.11. There were some improvements lately.
What I find strange in the stacktrace is that the server is notified that
the client closed the connection and still it tries to write a close frame
back to it.
I have two recommendations:
1) switch temporarily to English locale so that the error messages are more
clear to non-German people. Google Translate helps but the message doesn't
directly map to any of the error messages I know of in English
2) ask this question in Tomcat forums (us...@tomcat.apache.org)

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

On Sat, Jan 28, 2017 at 8:40 PM, Marc <marcgiff...@web.de> wrote:

> It seems that this exception only occurs in Google Chrome...
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-Websocket-Exception-is-logged-
> in-WicketEndpoint-if-the-user-is-closing-the-browser-
> tp4676886p4676889.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: Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

2017-01-28 Thread Marc
It seems that this exception only occurs in Google Chrome...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Websocket-Exception-is-logged-in-WicketEndpoint-if-the-user-is-closing-the-browser-tp4676886p4676889.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



Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

2017-01-27 Thread Marc
Hi,

I've a page with a WebSocketBehavior. Everything is OK until the user is
closing the browser or tab. An exception is logged in
org.apache.wicket.protocol.ws.javax.WicketEndpoint. 

I don't know if this kind of exception should reach the onError method.
Everything is working fine but the error message is annoying. Is it really
an error which should be logged?

I've created a quickstart attached. websockets.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4676886/websockets.zip>  

Thanks!

2017-01-27 20:55:44.672 ERROR 18092 --- [nio-8080-exec-2]
o.a.w.protocol.ws.javax.WicketEndpoint   : An error occurred in web socket
connection with id : 1

java.io.IOException: java.io.IOException: Eine bestehende Verbindung wurde
softwaregesteuert
durch den Hostcomputer abgebrochen (an existing connection was forcibly
closed by the remote host)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:315)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:606)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:526)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:348)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:290)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:131)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:69)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_91]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_91]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: java.io.IOException: Eine bestehende Verbindung wurde
softwaregesteuert
durch den Hostcomputer abgebrochen
at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[na:1.8.0_91]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
~[na:1.8.0_91]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) 
~[na:1.8.0_91]
at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_91]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
~[na:1.8.0_91]
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:97)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:494)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
... 17 common frames omitted

--
View this m

Re: Exception object in MyInternalErrorPage

2016-04-17 Thread Martin Grigorov
In onException () I would do:

return new RenderPageRequestHandler (new PageProvider (new
YourInternalErrorPage (exception )));

But I agree, there must be a better solution!
On Apr 17, 2016 5:21 PM, "xesj.hu" <xesj...@gmail.com> wrote:

> I have taken the IRequestCycleListener method for years,
> but I think the setInternalErrorPage() is better.
>
> Thanks a lot.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Exception-object-in-MyInternalErrorPage-tp4674299p4674301.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: Exception object in MyInternalErrorPage

2016-04-17 Thread xesj.hu
I have taken the IRequestCycleListener method for years, 
but I think the setInternalErrorPage() is better.

Thanks a lot.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-object-in-MyInternalErrorPage-tp4674299p4674301.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: Exception object in MyInternalErrorPage

2016-04-17 Thread Martin Grigorov
Hi,

Better use custom IRequestCycleListener.
You'll have much better control in its #onException()
On Apr 17, 2016 3:23 PM, "xesj.hu" <xesj...@gmail.com> wrote:

> Hi !
>
> I can set my error page in MyApplication.init() method:
>
>   getApplicationSettings().setInternalErrorPage(MyInternalErrorPage.class);
>
> But, I would like to store exception stack trace to database.
> How can I get Exception object in MyInternalErrorPage constructor ?
>
> Bye, xesj.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Exception-object-in-MyInternalErrorPage-tp4674299.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
>
>


Exception object in MyInternalErrorPage

2016-04-17 Thread xesj.hu
Hi !

I can set my error page in MyApplication.init() method: 

  getApplicationSettings().setInternalErrorPage(MyInternalErrorPage.class);

But, I would like to store exception stack trace to database.
How can I get Exception object in MyInternalErrorPage constructor ?

Bye, xesj.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-object-in-MyInternalErrorPage-tp4674299.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: Exception Handling (ajax)

2016-03-09 Thread Sven Meier

Yes, indeed.

Sven

On 09.03.2016 15:43, Lars Törner wrote:

Hi Sven and thanks for your answer!

Ok I see! That's a better solution. I guess it means that I don't have to
set:
getExceptionSettings().setAjaxErrorHandlingStrategy(
AjaxErrorStrategy.INVOKE_FAILURE_HANDLER);

Because we'll never get to the DefaultExceptionMapper (in the case of an
expected unexpected exception).

Cheers
Lars

2016-03-09 10:56 GMT+01:00 Sven Meier <s...@meiers.net>:


Hi Lars,


if this is a good or bad way to handle exceptions during ajax requests

I'd keep your IRequestCycleListener and just return new
ErrorCodeRequestHandler(500, message) from there.
No need to fiddle with IExceptionMapper and/or DefaultExceptionMapper.

Have fun
Sven




On 09.03.2016 09:33, Lars Törner wrote:


About exception handling

I would like a fallback for unexcpected exceptions that are thrown during
ajax-calls.

I don't want to redirect to a new page so in my application#init I do:


getExceptionSettings().setAjaxErrorHandlingStrategy(AjaxErrorStrategy.INVOKE_FAILURE_HANDLER);

For the moment I have a request cycle listener for exceptions (added also
in application#init). Which implements #onException but for now does
nothing if an ajax-request is running:
!((WebRequest) requestCycle.getRequest()).isAjax()) -> return null

AjaxErrorStrategy.INVOKE_FAILURE_HANDLER leads to
org.apache.wicket.DefaultExceptionMapper.internalMap(Exception) returns
ErrorCodeRequestHandler(500)

What I would like is to register a global failure handler that via java
script shows a nice toaster with a user friendly message:

Wicket.Event.subscribe('/ajax/call/failure',
function (jqEvent, attributes, jqXHR, errorThrown, textStatus)
{
//TODO Show a fancy toaster with a nice localized user error message
});

ErrorCodeRequestHandler above has also a constructor that takes a message:
ErrorCodeRequestHandler(final int errorCode, final String message)

I guess this can be used to get the nice message to the browser?

So when I write this an do some more thinking my conclusion is that I must
implement my own IExceptionMapper (extending DefaultExceptionMapper?).

I will then create my new ExceptionMapper in MyApplication#init and
override Application#getExceptionMapperProvider() to return it. In my
exception mapper I can check all types of unexpected exeptions my
application might throw and get the corresponding user message to supply
it
to ErrorCodeRequestHandler(final int errorCode, final String message) and
then let failure handler show it in the toaster.

Ok, so now I guess it would be easier to just test this, but the mail is
written so I hope I don´t waste to much of your time by asking if this is
a
good or bad way to handle exceptions during ajax requests.

Cheers
Lasse



-
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



Re: Exception Handling (ajax)

2016-03-09 Thread Lars Törner
Hi Sven and thanks for your answer!

Ok I see! That's a better solution. I guess it means that I don't have to
set:
getExceptionSettings().setAjaxErrorHandlingStrategy(
AjaxErrorStrategy.INVOKE_FAILURE_HANDLER);

Because we'll never get to the DefaultExceptionMapper (in the case of an
expected unexpected exception).

Cheers
Lars

2016-03-09 10:56 GMT+01:00 Sven Meier <s...@meiers.net>:

> Hi Lars,
>
> > if this is a good or bad way to handle exceptions during ajax requests
>
> I'd keep your IRequestCycleListener and just return new
> ErrorCodeRequestHandler(500, message) from there.
> No need to fiddle with IExceptionMapper and/or DefaultExceptionMapper.
>
> Have fun
> Sven
>
>
>
>
> On 09.03.2016 09:33, Lars Törner wrote:
>
>> About exception handling
>>
>> I would like a fallback for unexcpected exceptions that are thrown during
>> ajax-calls.
>>
>> I don't want to redirect to a new page so in my application#init I do:
>>
>>
>> getExceptionSettings().setAjaxErrorHandlingStrategy(AjaxErrorStrategy.INVOKE_FAILURE_HANDLER);
>>
>> For the moment I have a request cycle listener for exceptions (added also
>> in application#init). Which implements #onException but for now does
>> nothing if an ajax-request is running:
>> !((WebRequest) requestCycle.getRequest()).isAjax()) -> return null
>>
>> AjaxErrorStrategy.INVOKE_FAILURE_HANDLER leads to
>> org.apache.wicket.DefaultExceptionMapper.internalMap(Exception) returns
>> ErrorCodeRequestHandler(500)
>>
>> What I would like is to register a global failure handler that via java
>> script shows a nice toaster with a user friendly message:
>>
>> Wicket.Event.subscribe('/ajax/call/failure',
>> function (jqEvent, attributes, jqXHR, errorThrown, textStatus)
>> {
>>//TODO Show a fancy toaster with a nice localized user error message
>> });
>>
>> ErrorCodeRequestHandler above has also a constructor that takes a message:
>> ErrorCodeRequestHandler(final int errorCode, final String message)
>>
>> I guess this can be used to get the nice message to the browser?
>>
>> So when I write this an do some more thinking my conclusion is that I must
>> implement my own IExceptionMapper (extending DefaultExceptionMapper?).
>>
>> I will then create my new ExceptionMapper in MyApplication#init and
>> override Application#getExceptionMapperProvider() to return it. In my
>> exception mapper I can check all types of unexpected exeptions my
>> application might throw and get the corresponding user message to supply
>> it
>> to ErrorCodeRequestHandler(final int errorCode, final String message) and
>> then let failure handler show it in the toaster.
>>
>> Ok, so now I guess it would be easier to just test this, but the mail is
>> written so I hope I don´t waste to much of your time by asking if this is
>> a
>> good or bad way to handle exceptions during ajax requests.
>>
>> Cheers
>> Lasse
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Exception Handling (ajax)

2016-03-09 Thread Sven Meier

Hi Lars,

> if this is a good or bad way to handle exceptions during ajax requests

I'd keep your IRequestCycleListener and just return new 
ErrorCodeRequestHandler(500, message) from there.

No need to fiddle with IExceptionMapper and/or DefaultExceptionMapper.

Have fun
Sven



On 09.03.2016 09:33, Lars Törner wrote:

About exception handling

I would like a fallback for unexcpected exceptions that are thrown during
ajax-calls.

I don't want to redirect to a new page so in my application#init I do:

getExceptionSettings().setAjaxErrorHandlingStrategy(AjaxErrorStrategy.INVOKE_FAILURE_HANDLER);

For the moment I have a request cycle listener for exceptions (added also
in application#init). Which implements #onException but for now does
nothing if an ajax-request is running:
!((WebRequest) requestCycle.getRequest()).isAjax()) -> return null

AjaxErrorStrategy.INVOKE_FAILURE_HANDLER leads to
org.apache.wicket.DefaultExceptionMapper.internalMap(Exception) returns
ErrorCodeRequestHandler(500)

What I would like is to register a global failure handler that via java
script shows a nice toaster with a user friendly message:

Wicket.Event.subscribe('/ajax/call/failure',
function (jqEvent, attributes, jqXHR, errorThrown, textStatus)
{
   //TODO Show a fancy toaster with a nice localized user error message
});

ErrorCodeRequestHandler above has also a constructor that takes a message:
ErrorCodeRequestHandler(final int errorCode, final String message)

I guess this can be used to get the nice message to the browser?

So when I write this an do some more thinking my conclusion is that I must
implement my own IExceptionMapper (extending DefaultExceptionMapper?).

I will then create my new ExceptionMapper in MyApplication#init and
override Application#getExceptionMapperProvider() to return it. In my
exception mapper I can check all types of unexpected exeptions my
application might throw and get the corresponding user message to supply it
to ErrorCodeRequestHandler(final int errorCode, final String message) and
then let failure handler show it in the toaster.

Ok, so now I guess it would be easier to just test this, but the mail is
written so I hope I don´t waste to much of your time by asking if this is a
good or bad way to handle exceptions during ajax requests.

Cheers
Lasse




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



Exception Handling (ajax)

2016-03-09 Thread Lars Törner
About exception handling

I would like a fallback for unexcpected exceptions that are thrown during
ajax-calls.

I don't want to redirect to a new page so in my application#init I do:

getExceptionSettings().setAjaxErrorHandlingStrategy(AjaxErrorStrategy.INVOKE_FAILURE_HANDLER);

For the moment I have a request cycle listener for exceptions (added also
in application#init). Which implements #onException but for now does
nothing if an ajax-request is running:
!((WebRequest) requestCycle.getRequest()).isAjax()) -> return null

AjaxErrorStrategy.INVOKE_FAILURE_HANDLER leads to
org.apache.wicket.DefaultExceptionMapper.internalMap(Exception) returns
ErrorCodeRequestHandler(500)

What I would like is to register a global failure handler that via java
script shows a nice toaster with a user friendly message:

Wicket.Event.subscribe('/ajax/call/failure',
function (jqEvent, attributes, jqXHR, errorThrown, textStatus)
{
  //TODO Show a fancy toaster with a nice localized user error message
});

ErrorCodeRequestHandler above has also a constructor that takes a message:
ErrorCodeRequestHandler(final int errorCode, final String message)

I guess this can be used to get the nice message to the browser?

So when I write this an do some more thinking my conclusion is that I must
implement my own IExceptionMapper (extending DefaultExceptionMapper?).

I will then create my new ExceptionMapper in MyApplication#init and
override Application#getExceptionMapperProvider() to return it. In my
exception mapper I can check all types of unexpected exeptions my
application might throw and get the corresponding user message to supply it
to ErrorCodeRequestHandler(final int errorCode, final String message) and
then let failure handler show it in the toaster.

Ok, so now I guess it would be easier to just test this, but the mail is
written so I hope I don´t waste to much of your time by asking if this is a
good or bad way to handle exceptions during ajax requests.

Cheers
Lasse


Re: Wicket 6 Clustering - Component Not Found Exception

2016-02-21 Thread mashleyttu
Hi,

We are using Wicket 6.11 in production where we have the clustered servers.
It's in memory cache was set to 40 by default. 

I've verify that setting this to 0 fixes the issue! 

I apologize if this default has been changed in a later point release of
Wicket 6, but you really helped me have a better understanding of how Wicket
stores pages internally!

Once again, you have been an excellent help and I am thankful. If I run into
any further issues I'll let you know.

Thanks,
Matt


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673687.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: Wicket 6 Clustering - Component Not Found Exception

2016-02-20 Thread Martin Grigorov
Which version of Wicket do you use?
I cannot verify at the moment but I believe this is 0 by default since a
long time.

Check Wicket guide, section "Page storage". I think this is the second
level cache.
On Feb 21, 2016 12:58 AM, "mashleyttu" <mash...@gmail.com> wrote:

> Hi,
>
> This was also very helpful. A little more insight into our application: It
> is a single page web app and we swap panels via ajax with the following
> code:
>
> myPanel.setOutputMarkupPlaceholderTag(true); //Newly constructed panel
> pnlMain.replaceWith(myPanel); //Replace panel
> pnlMain = myPanel; //Update reference in MainPage.java to new panel
> target.add(myPanel); //Add to target for rendering
>
> On the node where everything worked (node that ran the code above) we had
> all the components on the page we are expecting.
>
> On the node with the component not found exception (code above was not run
> on this node) it had the previous panel that we were on.
>
> Is the DefaultPageStore stored in the session? I'm thinking that is not
> getting serialized by the tomcat memcached session manager.
>
> What would happen if we set cacheSize to 0?
>
> * @param cacheSize
> *the number of pages to cache in memory before passing them to
> *{@link IDataStore#storeData(String, int, byte[])}
>
> Thanks so much!
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673683.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: Wicket 6 Clustering - Component Not Found Exception

2016-02-20 Thread mashleyttu
Hi,

This was also very helpful. A little more insight into our application: It
is a single page web app and we swap panels via ajax with the following
code:

myPanel.setOutputMarkupPlaceholderTag(true); //Newly constructed panel
pnlMain.replaceWith(myPanel); //Replace panel
pnlMain = myPanel; //Update reference in MainPage.java to new panel
target.add(myPanel); //Add to target for rendering

On the node where everything worked (node that ran the code above) we had
all the components on the page we are expecting.

On the node with the component not found exception (code above was not run
on this node) it had the previous panel that we were on.

Is the DefaultPageStore stored in the session? I'm thinking that is not
getting serialized by the tomcat memcached session manager. 

What would happen if we set cacheSize to 0?

* @param cacheSize
*the number of pages to cache in memory before passing them to
*{@link IDataStore#storeData(String, int, byte[])}

Thanks so much!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673683.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: Wicket 6 Clustering - Component Not Found Exception

2016-02-20 Thread Martin Grigorov
talina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
> at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
> at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
> at
>
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
> at
>
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
> DEBUG - Page   - ending request for page [Page class =
> com._806technologies.title1crateweb.MainPage, id = 0, render count = 1],
> request org.apache.wicket.protocol.http.servlet.ServletWebRequest@30560be1
> DEBUG - Page   - ending request for page [Page class =
> com._806technologies.title1crateweb.MainPage, id = 0, render count = 1],
> request org.apache.wicket.protocol.http.servlet.ServletWebRequest@30560be1
> *INFO  - 806HttpSessionDataStoreLog - StoreData session id:
> E24FAB17D7B8C7AD74186C659F219E9D page id: 0 byte length: 5198*
> INFO  - T806WebApplication - Writing Timestamp to session.
> DEBUG - PageAccessSynchronizer - 'http-apr-443-exec-7' released lock to
> page with id '0'
> DEBUG - PageAccessSynchronizer - 'http-apr-443-exec-7' notifying
> blocked
> threads
> 20-Feb-2016 09:48:46.826 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.BackupSessionService.backupSession Starting for
> session id E24FAB17D7B8C7AD74186C659F219E9D
> 20-Feb-2016 09:48:46.827 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.BackupSessionTask.call Starting for session id
> E24FAB17D7B8C7AD74186C659F219E9D
> 20-Feb-2016 09:48:46.827 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
> attribute 'Wicket:SessionUnbindingListener-wicket.Title1Crate' with value
> 'org.apache.wicket.session.HttpSessionStore$SessionBindingListener@5124ccb5
> '
> 20-Feb-2016 09:48:46.827 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
> attribute 'wicket:wicket.Title1Crate:page:store:memory' with value
> 'org.apache.wicket.pageStore.memory.PageTable@46fba8b1'
> 20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
> attribute 'wicket:wicket.Title1Crate:session' with value
> 'com._806technologies.title1cratecore.components.T1CSession@340020df'
> 20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
> attribute 'wicket:wicket.Title1Crate:timestamp' with value 'Sat Feb 20
> 09:48:46 CST 2016'
> INFO  - 806HttpSessionDataStoreLog - calling isReplicated
> 20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
> attribute 'wicket:wicket.Title1Crate:wicket:persistentPageManagerData -
> wicket.Title1Crate' with value
> 'org.apache.wicket.page.PageStoreManager$SessionEntry@746e2b24'
> 20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.BackupSessionTask.doBackupSession Trying to store
> session in memcached: E24FAB17D7B8C7AD74186C659F219E9D
> 20-Feb-2016 09:48:46.840 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.BackupSessionTask.call Finished for session id
> E24FAB17D7B8C7AD74186C659F219E9D, returning status SUCCESS
> 20-Feb-2016 09:48:46.840 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.BackupSessionTask.releaseLock Releasing lock for
> session E24FAB17D7B8C7AD74186C659F219E9D
> 20-Feb-2016 09:48:46.856 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.LockingStrategy.onAfterBackupSession Stored session
> validity info for session E24FAB17D7B8C7AD74186C659F219E9D
> 20-Feb-2016 09:48:46.858 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.RequestTrackingHostValve.logDebugRequestSessionCookie
> Have request session cookie: domain=null, maxAge=-1, path=null,
> value=E24FAB17D7B8C7AD74186C659F219E9D, version=0, secure=false
> 20-Feb-2016 09:48:46.859 FINE [http-apr-443-exec-7]
> de.javakaffee.web.msm.RequestTrackingHostValve.invoke <<<<<< Request
> finished: POST /wicket/page ==
> 20-Feb-2016 09:48:47.117 FINE [http-apr-443-exec-6]
> de.javakaffee.web.msm.RequestTrackingHostValve.invoke >>>>>> Request
> starting: GET
> /wicket/bookmarkable/org.apache.wicket.markup.html.pages.InternalErrorPage
> (requestedSessionId E24FAB17D7B8C7AD74186C659F219E9D) ==
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673677.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: Wicket 6 Clustering - Component Not Found Exception

2016-02-20 Thread mashleyttu
INE [http-apr-443-exec-7]
de.javakaffee.web.msm.BackupSessionTask.call Starting for session id
E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:48:46.827 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
attribute 'Wicket:SessionUnbindingListener-wicket.Title1Crate' with value
'org.apache.wicket.session.HttpSessionStore$SessionBindingListener@5124ccb5'
20-Feb-2016 09:48:46.827 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
attribute 'wicket:wicket.Title1Crate:page:store:memory' with value
'org.apache.wicket.pageStore.memory.PageTable@46fba8b1'
20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
attribute 'wicket:wicket.Title1Crate:session' with value
'com._806technologies.title1cratecore.components.T1CSession@340020df'
20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
attribute 'wicket:wicket.Title1Crate:timestamp' with value 'Sat Feb 20
09:48:46 CST 2016'
INFO  - 806HttpSessionDataStoreLog - calling isReplicated
20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes   storing
attribute 'wicket:wicket.Title1Crate:wicket:persistentPageManagerData -
wicket.Title1Crate' with value
'org.apache.wicket.page.PageStoreManager$SessionEntry@746e2b24'
20-Feb-2016 09:48:46.828 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.BackupSessionTask.doBackupSession Trying to store
session in memcached: E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:48:46.840 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.BackupSessionTask.call Finished for session id
E24FAB17D7B8C7AD74186C659F219E9D, returning status SUCCESS
20-Feb-2016 09:48:46.840 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.BackupSessionTask.releaseLock Releasing lock for
session E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:48:46.856 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.LockingStrategy.onAfterBackupSession Stored session
validity info for session E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:48:46.858 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.RequestTrackingHostValve.logDebugRequestSessionCookie
Have request session cookie: domain=null, maxAge=-1, path=null,
value=E24FAB17D7B8C7AD74186C659F219E9D, version=0, secure=false
20-Feb-2016 09:48:46.859 FINE [http-apr-443-exec-7]
de.javakaffee.web.msm.RequestTrackingHostValve.invoke <<<<<< Request
finished: POST /wicket/page ==
20-Feb-2016 09:48:47.117 FINE [http-apr-443-exec-6]
de.javakaffee.web.msm.RequestTrackingHostValve.invoke >>>>>> Request
starting: GET
/wicket/bookmarkable/org.apache.wicket.markup.html.pages.InternalErrorPage
(requestedSessionId E24FAB17D7B8C7AD74186C659F219E9D) ==

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673677.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: Wicket 6 Clustering - Component Not Found Exception

2016-02-17 Thread Martin Grigorov
Hi,

I'd suggest to try the following:

 setPageManagerProvider(new DefaultPageManagerProvider(this){
@Override
protected IDataStore newDataStore() {
return new
HttpSessionDataStore(getPageManagerContext(),
new
PageNumberEvictionStrategy(100)) {

@Override

public void storeData(String sessionId, int pageId, byte[] pageAsBytes)
{
super.storeData(sessionId, pageId, pageAsBytes);
*pageManagerContext.setSessionAttribute("timestamps", new
java.util.Date());*
}

};
}
});

The idea is to put some something in the session that marks it as
touched/dirty.
I have seen such behavior with Jetty's JdbcSessionStore - it will serialize
the session to the RDBMS only if it sees that there is something changed in
it.

Additionally I'd suggest to extend HttpSessionDataStore and put logging in
all its methods. Unfortunately it doesn't have much logging at the moment.


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

On Wed, Feb 17, 2016 at 12:39 AM, mashleyttu <mash...@gmail.com> wrote:

> Hi Everyone, Over the weekend we clustered our Wicket 6 application in
> AWS/Tomcat. Since AWS doesn't support multicasting we used an AWS Load
> Balancer and the tomcat memcached-session-manager with sticky
> sessions=false, sessionbackupasync=false and lockingmode=all.
>
> We changed our wicket configuration to the following:
> @Override
> public void init(){
> super.init();
>
> getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);
>
> //Store previous Pages in HttpSession instead of on local
> disk for
> clustering.
> setPageManagerProvider(new
> DefaultPageManagerProvider(this){
> @Override
> protected IDataStore newDataStore() {
> return new
> HttpSessionDataStore(getPageManagerContext(), new
> PageNumberEvictionStrategy(100));
> }
> });
>
> We are able to navigate from page-to-page (each request going to a
> different
> node) without losing our session (user doesn't get logged out) and we
> aren't
> receiving any page expired exceptions.
>
> The component not found exception occurs every time there is an ajax call
> that goes to a different node than the node that first rendered the page.
>
> I know no one here is a tomcat memcached session manager expert, so my
> question is:
>
> from a Wicket perspective is there anything else that needs to be
> configured
> to ensure that everything is stored in the session?
>
> Although, we can turn on sticky sessions, we really only want to do that is
> a last resort.
>
> Thanks for any advice that can be given!
> Matt
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610.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
>
>


Wicket 6 Clustering - Component Not Found Exception

2016-02-16 Thread mashleyttu
Hi Everyone, Over the weekend we clustered our Wicket 6 application in
AWS/Tomcat. Since AWS doesn't support multicasting we used an AWS Load
Balancer and the tomcat memcached-session-manager with sticky
sessions=false, sessionbackupasync=false and lockingmode=all. 

We changed our wicket configuration to the following:
@Override
public void init(){
super.init();
getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);

//Store previous Pages in HttpSession instead of on local disk 
for
clustering.
setPageManagerProvider(new DefaultPageManagerProvider(this){
@Override
protected IDataStore newDataStore() {
return new 
HttpSessionDataStore(getPageManagerContext(), new
PageNumberEvictionStrategy(100));
}
});

We are able to navigate from page-to-page (each request going to a different
node) without losing our session (user doesn't get logged out) and we aren't
receiving any page expired exceptions.

The component not found exception occurs every time there is an ajax call
that goes to a different node than the node that first rendered the page.

I know no one here is a tomcat memcached session manager expert, so my
question is: 

from a Wicket perspective is there anything else that needs to be configured
to ensure that everything is stored in the session?

Although, we can turn on sticky sessions, we really only want to do that is
a last resort.

Thanks for any advice that can be given!
Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610.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: Exception handling in AutoCompleteTextField

2016-01-12 Thread Rakesh A
Hi,

After looking into ajax code a bit, I see that 'Ajax-Location' header is not
considered for autocomplete response.
I created a PR (https://github.com/apache/wicket/pull/156) with a small
change to ajax JavaScript.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192p4673272.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: Exception handling in AutoCompleteTextField

2016-01-08 Thread Martin Grigorov
Hi,

The error handling in Ajax is controlled
via org.apache.wicket.settings.ExceptionSettings#setAjaxErrorHandlingStrategy().
By default it redirects to the error page.
http://examples7x.wicket.apache.org/ajax/links shows both ways.

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

On Wed, Jan 6, 2016 at 10:39 AM, Rakesh A <iamrakes...@rediffmail.com>
wrote:

> Hi,
>
> If we get an exception while preparing suggestions/choices for the entered
> text (in AutoCompleteTextField#getChoices()), I see that, there is no means
> to show it to user.
> JavaScript implementation handles only success responses.
>
> Is there any way to execute standard Ajax response handling, in this case?
>
> Please find attached quick start, try entering 'test' in the autocomplete
> text field on home page.
>
> autocomplete.7z
> <http://apache-wicket.1842946.n4.nabble.com/file/n4673192/autocomplete.7z>
>
> Regards,
> Rakesh.A
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192.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
>
>


Exception handling in AutoCompleteTextField

2016-01-06 Thread Rakesh A
Hi,

If we get an exception while preparing suggestions/choices for the entered
text (in AutoCompleteTextField#getChoices()), I see that, there is no means
to show it to user.
JavaScript implementation handles only success responses.

Is there any way to execute standard Ajax response handling, in this case?

Please find attached quick start, try entering 'test' in the autocomplete
text field on home page.

autocomplete.7z
<http://apache-wicket.1842946.n4.nabble.com/file/n4673192/autocomplete.7z>  

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192.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



not serializable exception

2015-11-19 Thread Ciocoiu Elvis
Hello,

After upgrading to wicket 6.21.0 I've get a strange serialization error
when adding the debug bar to ajax target. I do this on every ajax event in
development and it worked until today. The stacktrace extras:

Caused by: java.lang.RuntimeException: An error occurred while getting the
model object for Component: [Component id = data, page =
ro.emp.wicket.StandaloneHomePage, path =
2:debugBar:content:contributors:3:contrib:link:data.Label, isVisible =
true, isVersioned = true, markup = [markup =
jar:file:/home/fanfy/.m2/repository/org/apache/wicket/wicket-devutils/6.21.0/wicket-devutils-6.21.0.jar!/org/apache/wicket/devutils/debugbar/StandardDebugPanel.html
, index = 0, current =  '' (line 0, column 0)]]
at org.apache.wicket.Component.getDefaultModelObject(Component.java:1617)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1640)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:131)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
~[wicket-core-6.21.0.jar:6.21.0]
at org.apache.wicket.Component.internalRenderComponent(Component.java:2536)
~[wicket-core-6.21.0.jar:6.21.0]
... 132 common frames omitted
Caused by: org.apache.wicket.WicketRuntimeException: Internal error cloning
object
at
org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:361)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.core.util.lang.WicketObjects.sizeof(WicketObjects.java:425)
~[wicket-core-6.21.0.jar:6.21.0]
at
org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:96)
~[wicket-devutils-6.21.0.jar:6.21.0]
at
org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:89)
~[wicket-devutils-6.21.0.jar:6.21.0]
at org.apache.wicket.Component.getDefaultModelObject(Component.java:1612)
~[wicket-core-6.21.0.jar:6.21.0]
... 136 common frames omitted
Caused by: java.io.NotSerializableException:
org.apache.wicket.ajax.AjaxRequestHandler$1
- field (class
"org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer",
name: "this$0", type: "class org.apache.wicket.ajax.AbstractAjaxResponse")
- object (class
"org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer",
[AjaxHtmlHeaderContainer [Component id = _header_]])
- element of array (index: 9)
- array (class "[Ljava.lang.Object;", size: 18)
- field (class "org.apache.wicket.MarkupContainer$ChildList", name:
"childs", type: "class [Ljava.lang.Object;")
- object (class "org.apache.wicket.MarkupContainer$ChildList", [[Component
id = applicationTitle], [FocusComponentFeedbackPanel [Component id =
feedbackPanel]], [DebugBar [Component id = debugBar]],
[StackComponentContainerImpl [Component id = contentContainer]],
[GlobalMenuPanel [Component id = menu]], [Fragment [Component id =
customHeader]], [Fragment [Component id = customFooter]],
[WebMarkupContainer [Component id = localeContainer]], [WebMarkupContainer
[Component id = userInformations]], [AjaxHtmlHeaderContainer [Component id
= _header_]]])
- field (class "org.apache.wicket.MarkupContainer", name: "children", type:
"class java.lang.Object")
- root object (class "ro.emp.wicket.StandaloneHomePage", [Page class =
ro.emp.wicket.StandaloneHomePage, id = 2, render count = 3])
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
~[na:1.7.0_80]
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
~[na:1.7.0_80]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
~[na:1.7.0_80]
at
org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:306)

Re: not serializable exception

2015-11-19 Thread Martin Grigorov
Hi,

It seems to be caused by
https://github.com/apache/wicket/commit/562d43ccdd7f305f8ca641817f4b63a07ee8b6a6
As the commit message says this container should be removed before the end
of the request cycle, so it won't lead to such problem in the normal cases.
But combined with the DebugBar it breaks...
Please open a ticket. With a quickstart / test case would be perfect!

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

On Thu, Nov 19, 2015 at 10:48 AM, Ciocoiu Elvis 
wrote:

> Hello,
>
> After upgrading to wicket 6.21.0 I've get a strange serialization error
> when adding the debug bar to ajax target. I do this on every ajax event in
> development and it worked until today. The stacktrace extras:
>
> Caused by: java.lang.RuntimeException: An error occurred while getting the
> model object for Component: [Component id = data, page =
> ro.emp.wicket.StandaloneHomePage, path =
> 2:debugBar:content:contributors:3:contrib:link:data.Label, isVisible =
> true, isVersioned = true, markup = [markup =
>
> jar:file:/home/fanfy/.m2/repository/org/apache/wicket/wicket-devutils/6.21.0/wicket-devutils-6.21.0.jar!/org/apache/wicket/devutils/debugbar/StandardDebugPanel.html
> , index = 0, current =  ' wicket:id="data">' (line 0, column 0)]]
> at org.apache.wicket.Component.getDefaultModelObject(Component.java:1617)
> ~[wicket-core-6.21.0.jar:6.21.0]
> at
>
> org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1640)
> ~[wicket-core-6.21.0.jar:6.21.0]
> at
>
> org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:131)
> ~[wicket-core-6.21.0.jar:6.21.0]
> at
>
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
> ~[wicket-core-6.21.0.jar:6.21.0]
> at org.apache.wicket.Component.internalRenderComponent(Component.java:2536)
> ~[wicket-core-6.21.0.jar:6.21.0]
> ... 132 common frames omitted
> Caused by: org.apache.wicket.WicketRuntimeException: Internal error cloning
> object
> at
>
> org.apache.wicket.core.util.lang.WicketObjects.cloneObject(WicketObjects.java:361)
> ~[wicket-core-6.21.0.jar:6.21.0]
> at
>
> org.apache.wicket.core.util.lang.WicketObjects.sizeof(WicketObjects.java:425)
> ~[wicket-core-6.21.0.jar:6.21.0]
> at
>
> org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:96)
> ~[wicket-devutils-6.21.0.jar:6.21.0]
> at
>
> org.apache.wicket.devutils.debugbar.PageSizeDebugPanel$2.getObject(PageSizeDebugPanel.java:89)
> ~[wicket-devutils-6.21.0.jar:6.21.0]
> at org.apache.wicket.Component.getDefaultModelObject(Component.java:1612)
> ~[wicket-core-6.21.0.jar:6.21.0]
> ... 136 common frames omitted
> Caused by: java.io.NotSerializableException:
> org.apache.wicket.ajax.AjaxRequestHandler$1
> - field (class
> "org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer",
> name: "this$0", type: "class org.apache.wicket.ajax.AbstractAjaxResponse")
> - object (class
> "org.apache.wicket.ajax.AbstractAjaxResponse$AjaxHtmlHeaderContainer",
> [AjaxHtmlHeaderContainer [Component id = _header_]])
> - element of array (index: 9)
> - array (class "[Ljava.lang.Object;", size: 18)
> - field (class "org.apache.wicket.MarkupContainer$ChildList", name:
> "childs", type: "class [Ljava.lang.Object;")
> - object (class "org.apache.wicket.MarkupContainer$ChildList", [[Component
> id = applicationTitle], [FocusComponentFeedbackPanel [Component id =
> feedbackPanel]], [DebugBar [Component id = debugBar]],
> [StackComponentContainerImpl [Component id = contentContainer]],
> [GlobalMenuPanel [Component id = menu]], [Fragment [Component id =
> customHeader]], [Fragment [Component id = customFooter]],
> [WebMarkupContainer [Component id = localeContainer]], [WebMarkupContainer
> [Component id = userInformations]], [AjaxHtmlHeaderContainer [Component id
> = _header_]]])
> - field (class "org.apache.wicket.MarkupContainer", name: "children", type:
> "class java.lang.Object")
> - root object (class "ro.emp.wicket.StandaloneHomePage", [Page class =
> ro.emp.wicket.StandaloneHomePage, id = 2, render count = 3])
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
> ~[na:1.7.0_80]
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> ~[na:1.7.0_80]
> at
>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
> ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
> ~[na:1.7.0_80]
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> ~[na:1.7.0_80]
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)

Re: CompoundPropertyModel: override method or catch exception

2015-06-17 Thread Martin Grigorov
Hi,

Then you need to roll your own IModel and use it instead of
CompountPropertyModel.
**PropertyModel classes use reflection to find and call the setter and
getter methods.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jun 16, 2015 at 9:23 PM, sorinev sori...@gmail.com wrote:

 To go with my  other thread
 
 http://apache-wicket.1842946.n4.nabble.com/TextField-AjaxEventBehavior-onBlur-onEvent-tp4671150.html
 
 about the same form page, I have an issue with the CompoundPropertyModel.
 There is a TextField in a form on this page, and the corresponding setter
 in
 the model can throw an exception. When it does, wicket crashes the page. It
 seems that it's using reflection by grabbing the name of the component on
 the page, and looking for a setter for that component in the model
 automatically behind the scenes.

 What I need to have happen is either I can somehow override that method
 through the CompoundPropertyModel, or just catch exceptions from the model
 in general, or maybe some other mechanism. In any case, what I need is to
 be
 able to cleanly reset things on the page in the case of an exception rather
 than the page crashing altogether.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-override-method-or-catch-exception-tp4671205.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




CompoundPropertyModel: override method or catch exception

2015-06-16 Thread sorinev
To go with my  other thread
http://apache-wicket.1842946.n4.nabble.com/TextField-AjaxEventBehavior-onBlur-onEvent-tp4671150.html
  
about the same form page, I have an issue with the CompoundPropertyModel.
There is a TextField in a form on this page, and the corresponding setter in
the model can throw an exception. When it does, wicket crashes the page. It
seems that it's using reflection by grabbing the name of the component on
the page, and looking for a setter for that component in the model
automatically behind the scenes.

What I need to have happen is either I can somehow override that method
through the CompoundPropertyModel, or just catch exceptions from the model
in general, or maybe some other mechanism. In any case, what I need is to be
able to cleanly reset things on the page in the case of an exception rather
than the page crashing altogether. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-override-method-or-catch-exception-tp4671205.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: Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-26 Thread Sebastien
Hi Chris,

AFAIS, the only thing that I think it could typically cause an issue is
calcHeight(). But the error message is misleading, I would have expect a
calcHeight is undefined instead, so I am not really sure... Furthermore,
I don't know how/where you have included the calcHeight function. If the
scope is window then try window.calcHeight();

If it does not solve the issue or you suspect it comes from elsewhere
please create a minimal quickstart that reproduce the issue and I will have
a look...

Thanks  best regards,
Sebastien.

(function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();
(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();
(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();
(function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();
(function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();
(function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();
(function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();
(function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();
(function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();

(function(){ calcHeight();})();

(function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();

(function(){
jQuery('#sortable2c').sortable({
update: function (event,ui) {

var attrs =
{c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
var params = {'hash': ui.item.data('hash'),'index':
ui.item.index()};
attrs.ep = params;
Wicket.Ajax.ajax(attrs);
}
, handle: .handle });
})();

(function(){
jQuery('#sortable2c').selectable({
cancel: span, filter: li, stop: function () {

var indexes=[]; jQuery('.ui-selected', this).each( function() {
indexes.push(jQuery('#sortable2c li').index(this)); } );
var attrs =
{c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
var params = {'indexes': indexes};
attrs.ep = params;
Wicket.Ajax.ajax(attrs);
}
});

})();

On Sun, Apr 26, 2015 at 2:08 AM, Chris chris...@gmx.at wrote:

 Hi Sebastian,

 I would like to render the container with the sortable items based on a
 Wicket event:

 @Override
 public void onEvent(IEvent? event) {
 super.onEvent(event);

 if (event.getPayload() instanceof AddItem) {
 
 update.getTarget().add(container);
 }
 }

 Thereby, I am getting following error. Has this something to do that some
 JS file has to be referenced in the panel instead of page?

 Thanks a lot,
 Chris

 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
 javascript: TypeError: undefined is not a function (evaluating
 'jQuery('#sortable2c').sortable'), text:
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();(function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();(function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();(function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();(function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click

Re: Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-26 Thread Chris
 void onEvent(IEvent? event) {
  super.onEvent(event);
 
  if (event.getPayload() instanceof AddItem) {
  
  update.getTarget().add(container);
  }
 }
 
 Thereby, I am getting following error. Has this something to do that
 some
 JS file has to be referenced in the panel instead of page?
 
 Thanks a lot,
 Chris
 
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
 javascript: TypeError: undefined is not a function (evaluating
 'jQuery('#sortable2c').sortable'), text:
 
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();(function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();(function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();(function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();(function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();(function(){calcHeight();})();(function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();(function(){jQuery('#sortable2c').sortable({
 update: function (event,ui) {
 var attrs =
 
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
 var params = {'hash': ui.item.data('hash'),'index': ui.item.index()};
 attrs.ep = params;
 Wicket.Ajax.ajax(attrs);
 }
 , handle: .handle
 });})();(function(){jQuery('#sortable2c').selectable({ cancel:
 span,
 filter: li, stop: function () {
 var indexes=[]; jQuery('.ui-selected', this).each( function() {
 indexes.push(jQuery('#sortable2c li').index(this)); } ); var attrs =
 
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
 var params = {'indexes': indexes};
 attrs.ep = params;
 Wicket.Ajax.ajax(attrs);
 }
 });})();
 -
 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
 
 
 
 
 -
 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



Re: Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-26 Thread Chris
Hi Sebastian,

thanks for your help.

the reason for this error seems that I load jquery-1.11.2.min.js in wicket head 
next to jQuery-1.11.1 which is already loaded via wicket.

However, when I restrain from loading jquery-1.11.2.min.js in wicket head , the 
javascript $(function () {…} is not called although jQuery-1.11.1 seems to be 
loaded (via wicket).

Why does this happen?

Thanks Chris


 Am 26.04.2015 um 18:02 schrieb Sebastien seb...@gmail.com:
 
 Hi Chris,
 
 AFAIS, the only thing that I think it could typically cause an issue is
 calcHeight(). But the error message is misleading, I would have expect a
 calcHeight is undefined instead, so I am not really sure... Furthermore,
 I don't know how/where you have included the calcHeight function. If the
 scope is window then try window.calcHeight();
 
 If it does not solve the issue or you suspect it comes from elsewhere
 please create a minimal quickstart that reproduce the issue and I will have
 a look...
 
 Thanks  best regards,
 Sebastien.
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();
 (function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();
 (function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();
 (function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();
 (function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();
 (function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();
 (function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();
 (function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();
 
 (function(){ calcHeight();})();
 
 (function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();
 
 (function(){
jQuery('#sortable2c').sortable({
update: function (event,ui) {
 
var attrs =
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
var params = {'hash': ui.item.data('hash'),'index':
 ui.item.index()};
attrs.ep = params;
Wicket.Ajax.ajax(attrs);
}
, handle: .handle });
 })();
 
 (function(){
jQuery('#sortable2c').selectable({
cancel: span, filter: li, stop: function () {
 
var indexes=[]; jQuery('.ui-selected', this).each( function() {
indexes.push(jQuery('#sortable2c li').index(this)); } );
var attrs =
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
var params = {'indexes': indexes};
attrs.ep = params;
Wicket.Ajax.ajax(attrs);
}
});
 
 })();
 
 On Sun, Apr 26, 2015 at 2:08 AM, Chris chris...@gmx.at wrote:
 
 Hi Sebastian,
 
 I would like to render the container with the sortable items based on a
 Wicket event:
 
 @Override
public void onEvent(IEvent? event) {
super.onEvent(event);
 
if (event.getPayload() instanceof AddItem) {

update.getTarget().add(container);
}
 }
 
 Thereby, I am getting following error. Has this something to do that some
 JS file has to be referenced in the panel instead of page?
 
 Thanks a lot,
 Chris
 
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
 javascript: TypeError: undefined is not a function (evaluating
 'jQuery('#sortable2c').sortable'), text:
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();(function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();(function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();(function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1

Re: Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-26 Thread Sebastien
(event);
 
if (event.getPayload() instanceof AddItem) {

update.getTarget().add(container);
}
  }
 
  Thereby, I am getting following error. Has this something to do that
  some
  JS file has to be referenced in the panel instead of page?
 
  Thanks a lot,
  Chris
 
  ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
  javascript: TypeError: undefined is not a function (evaluating
  'jQuery('#sortable2c').sortable'), text:
 
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();(function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();(function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();(function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();(function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();(function(){calcHeight();})();(function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();(function(){jQuery('#sortable2c').sortable({
  update: function (event,ui) {
  var attrs =
 
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
  var params = {'hash': ui.item.data('hash'),'index': ui.item.index()};
  attrs.ep = params;
  Wicket.Ajax.ajax(attrs);
  }
  , handle: .handle
  });})();(function(){jQuery('#sortable2c').selectable({ cancel:
 span,
  filter: li, stop: function () {
  var indexes=[]; jQuery('.ui-selected', this).each( function() {
  indexes.push(jQuery('#sortable2c li').index(this)); } ); var attrs =
 
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
  var params = {'indexes': indexes};
  attrs.ep = params;
  Wicket.Ajax.ajax(attrs);
  }
  });})();
  -
  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
 
 


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




Re: Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-26 Thread Sebastien
Hi Chris,

You cannot have 2 concurrent versions of jquery...

If you need to upgrade jquery version, please use:
this.getJavaScriptLibrarySettings().setJQueryReference(jQueryReference) -
in MyApplication#init()

Hope this helps,
Sebastien


On Sun, Apr 26, 2015 at 7:14 PM, Chris chris...@gmx.at wrote:

 Hi Sebastian,

 thanks for your help.

 the reason for this error seems that I load jquery-1.11.2.min.js in wicket
 head next to jQuery-1.11.1 which is already loaded via wicket.

 However, when I restrain from loading jquery-1.11.2.min.js in wicket head
 , the javascript $(function () {…} is not called although jQuery-1.11.1
 seems to be loaded (via wicket).

 Why does this happen?

 Thanks Chris


  Am 26.04.2015 um 18:02 schrieb Sebastien seb...@gmail.com:
 
  Hi Chris,
 
  AFAIS, the only thing that I think it could typically cause an issue is
  calcHeight(). But the error message is misleading, I would have expect
 a
  calcHeight is undefined instead, so I am not really sure...
 Furthermore,
  I don't know how/where you have included the calcHeight function. If
 the
  scope is window then try window.calcHeight();
 
  If it does not solve the issue or you suspect it comes from elsewhere
  please create a minimal quickstart that reproduce the issue and I will
 have
  a look...
 
  Thanks  best regards,
  Sebastien.
 
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();
 
 (function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();
 
 (function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();
 
 (function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();
 
  (function(){ calcHeight();})();
 
 
 (function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();
 
  (function(){
 jQuery('#sortable2c').sortable({
 update: function (event,ui) {
 
 var attrs =
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
 var params = {'hash': ui.item.data('hash'),'index':
  ui.item.index()};
 attrs.ep = params;
 Wicket.Ajax.ajax(attrs);
 }
 , handle: .handle });
  })();
 
  (function(){
 jQuery('#sortable2c').selectable({
 cancel: span, filter: li, stop: function () {
 
 var indexes=[]; jQuery('.ui-selected', this).each( function()
 {
 indexes.push(jQuery('#sortable2c li').index(this)); } );
 var attrs =
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
 var params = {'indexes': indexes};
 attrs.ep = params;
 Wicket.Ajax.ajax(attrs);
 }
 });
 
  })();
 
  On Sun, Apr 26, 2015 at 2:08 AM, Chris chris...@gmx.at wrote:
 
  Hi Sebastian,
 
  I would like to render the container with the sortable items based on a
  Wicket event:
 
  @Override
 public void onEvent(IEvent? event) {
 super.onEvent(event);
 
 if (event.getPayload() instanceof AddItem) {
 
 update.getTarget().add(container);
 }
  }
 
  Thereby, I am getting following error. Has this something to do that
 some
  JS file has to be referenced in the panel instead of page?
 
  Thanks a lot,
  Chris
 
  ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
  javascript: TypeError: undefined is not a function (evaluating
  'jQuery('#sortable2c').sortable'), text:
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems

Re: Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-26 Thread Chris
Hi Sebastian,

I just did this - but nevertheless, if I do not include the same version in 
wicket:head, $(function () is not called in html head.
Does Wicket include it only for internal purposes, but not automatically for JS 
placed in HTML?

Thanks, Chris




 Am 26.04.2015 um 19:33 schrieb Sebastien seb...@gmail.com:
 
 Hi Chris,
 
 You cannot have 2 concurrent versions of jquery...
 
 If you need to upgrade jquery version, please use:
 this.getJavaScriptLibrarySettings().setJQueryReference(jQueryReference) -
 in MyApplication#init()
 
 Hope this helps,
 Sebastien
 
 
 On Sun, Apr 26, 2015 at 7:14 PM, Chris chris...@gmx.at wrote:
 
 Hi Sebastian,
 
 thanks for your help.
 
 the reason for this error seems that I load jquery-1.11.2.min.js in wicket
 head next to jQuery-1.11.1 which is already loaded via wicket.
 
 However, when I restrain from loading jquery-1.11.2.min.js in wicket head
 , the javascript $(function () {…} is not called although jQuery-1.11.1
 seems to be loaded (via wicket).
 
 Why does this happen?
 
 Thanks Chris
 
 
 Am 26.04.2015 um 18:02 schrieb Sebastien seb...@gmail.com:
 
 Hi Chris,
 
 AFAIS, the only thing that I think it could typically cause an issue is
 calcHeight(). But the error message is misleading, I would have expect
 a
 calcHeight is undefined instead, so I am not really sure...
 Furthermore,
 I don't know how/where you have included the calcHeight function. If
 the
 scope is window then try window.calcHeight();
 
 If it does not solve the issue or you suspect it comes from elsewhere
 please create a minimal quickstart that reproduce the issue and I will
 have
 a look...
 
 Thanks  best regards,
 Sebastien.
 
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();
 
 (function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();
 
 (function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();
 
 (function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();
 
 (function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();
 
 (function(){ calcHeight();})();
 
 
 (function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();
 
 (function(){
   jQuery('#sortable2c').sortable({
   update: function (event,ui) {
 
   var attrs =
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
   var params = {'hash': ui.item.data('hash'),'index':
 ui.item.index()};
   attrs.ep = params;
   Wicket.Ajax.ajax(attrs);
   }
   , handle: .handle });
 })();
 
 (function(){
   jQuery('#sortable2c').selectable({
   cancel: span, filter: li, stop: function () {
 
   var indexes=[]; jQuery('.ui-selected', this).each( function()
 {
   indexes.push(jQuery('#sortable2c li').index(this)); } );
   var attrs =
 
 {c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
   var params = {'indexes': indexes};
   attrs.ep = params;
   Wicket.Ajax.ajax(attrs);
   }
   });
 
 })();
 
 On Sun, Apr 26, 2015 at 2:08 AM, Chris chris...@gmx.at wrote:
 
 Hi Sebastian,
 
 I would like to render the container with the sortable items based on a
 Wicket event:
 
 @Override
   public void onEvent(IEvent? event) {
   super.onEvent(event);
 
   if (event.getPayload() instanceof AddItem) {
   
   update.getTarget().add(container);
   }
 }
 
 Thereby, I am getting following error. Has this something to do that
 some
 JS file has to be referenced in the panel instead of page?
 
 Thanks a lot,
 Chris
 
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
 javascript: TypeError: undefined is not a function (evaluating
 'jQuery('#sortable2c').sortable'), text:
 
 (function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function

Sortable, with Selectable; Exception evaluating javascript: TypeError: undefined is not a function

2015-04-25 Thread Chris
Hi Sebastian,

I would like to render the container with the sortable items based on a Wicket 
event:

@Override
public void onEvent(IEvent? event) {
super.onEvent(event);

if (event.getPayload() instanceof AddItem) {

update.getTarget().add(container);
}
}

Thereby, I am getting following error. Has this something to do that some JS 
file has to be referenced in the panel instead of page?

Thanks a lot,
Chris

ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: 
TypeError: undefined is not a function (evaluating 
'jQuery('#sortable2c').sortable'), text: 
(function(){Wicket.Ajax.ajax({sc:voteup,c:voteup47,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedown48,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown,e:click,f:form46,m:POST});})();(function(){Wicket.Ajax.ajax({c:thumbTitleLink49,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink,e:click});})();(function(){Wicket.Ajax.ajax({c:remove4a,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove,e:click});})();(function(){Wicket.Ajax.ajax({c:position4b,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position,e:click});})();(function(){Wicket.Ajax.ajax({c:poiItem4c,u:./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem,e:click});})();(function(){Wicket.Ajax.ajax({sc:voteup,c:voteupab,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({sc:votedown,c:votedownac,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown,e:click,f:formaa,m:POST});})();(function(){Wicket.Ajax.ajax({c:shuffleae,u:./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle,e:click});})();(function(){calcHeight();})();(function(){Wicket.Ajax.ajax({c:deleteAll,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll,e:click});})();(function(){jQuery('#sortable2c').sortable({
 update: function (event,ui) {
var attrs = 
{c:sortable2c,u:./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable};
var params = {'hash': ui.item.data('hash'),'index': ui.item.index()};
attrs.ep = params;
Wicket.Ajax.ajax(attrs);
}
, handle: .handle });})();(function(){jQuery('#sortable2c').selectable({ 
cancel: span, filter: li, stop: function () {
var indexes=[]; jQuery('.ui-selected', this).each( function() { 
indexes.push(jQuery('#sortable2c li').index(this)); } ); var attrs = 
{c:sortable2c,u:./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable};
var params = {'indexes': indexes};
attrs.ep = params;
Wicket.Ajax.ajax(attrs);
}
 });})();
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



wicket:enclosure tag issue - no exception for components missing in markup

2015-03-05 Thread Martin Sturm
Hello together,

we've just recognized some strange behavior when using wicket:enclosure
tag.

The scenario:
I have a page that has two labels in it's component hierarchy. In the pages
markup one label is surrounded with an enclosure-tag, and this label is
invisible. The second label was not added to the markup. When I now render
the page I would expect a WicketRuntimeException because of the broken
markup but the page will be rendered successfully.

I would open a ticket in jira, but I want to ensure that I'm not creating a
ticket for an already known bug or expected behavior.

I have a small quickstart for that:

@Test(expected = WicketRuntimeException.class) // fails
public void renderInvisible() throws Exception {
final WicketTester tester = new WicketTester();
tester.startPage(new TestPage(false));
tester.assertRenderedPage(TestPage.class);
tester.assertVisible(secondLabel); // true
}

@Test(expected = WicketRuntimeException.class) // success
public void renderVisible() throws Exception {
final WicketTester tester = new WicketTester();
tester.startPage(new TestPage(true));
tester.assertRenderedPage(TestPage.class);
}

public static class TestPage extends WebPage implements
IMarkupResourceStreamProvider {

public TestPage(boolean labelVisible) {
add(new Label(label, invisible).setVisible(labelVisible));
add(new Label(secondLabel, WTF?));
}

@Override
public IResourceStream getMarkupResourceStream(final MarkupContainer
container, final Class? containerClass) {
return new StringResourceStream(htmlbodywicket:enclosure
child=\label\span
wicket:id=\label\/span/wicket:enclosure/body/html);
}
}

Maybe I could contribute a patch. Do you have any idea where I can find the
cause of this issue?

I've just found out, that unrenderedComponents list in Page#checkRendering
is empty but it must not.

cheers,
Martin


Re: wicket:enclosure tag issue - no exception for components missing in markup

2015-03-05 Thread Martin Grigorov
Hi,

I'd try with a proper .java/.html files.
Using getMarkupResourceStream() is not always the same as the
default/production way. Maybe the bug is somewhere there.

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

On Thu, Mar 5, 2015 at 12:06 PM, Martin Sturm martin.st...@comsysto.com
wrote:

 Hello together,

 we've just recognized some strange behavior when using wicket:enclosure
 tag.

 The scenario:
 I have a page that has two labels in it's component hierarchy. In the pages
 markup one label is surrounded with an enclosure-tag, and this label is
 invisible. The second label was not added to the markup. When I now render
 the page I would expect a WicketRuntimeException because of the broken
 markup but the page will be rendered successfully.

 I would open a ticket in jira, but I want to ensure that I'm not creating a
 ticket for an already known bug or expected behavior.

 I have a small quickstart for that:

 @Test(expected = WicketRuntimeException.class) // fails
 public void renderInvisible() throws Exception {
 final WicketTester tester = new WicketTester();
 tester.startPage(new TestPage(false));
 tester.assertRenderedPage(TestPage.class);
 tester.assertVisible(secondLabel); // true
 }

 @Test(expected = WicketRuntimeException.class) // success
 public void renderVisible() throws Exception {
 final WicketTester tester = new WicketTester();
 tester.startPage(new TestPage(true));
 tester.assertRenderedPage(TestPage.class);
 }

 public static class TestPage extends WebPage implements
 IMarkupResourceStreamProvider {

 public TestPage(boolean labelVisible) {
 add(new Label(label, invisible).setVisible(labelVisible));
 add(new Label(secondLabel, WTF?));
 }

 @Override
 public IResourceStream getMarkupResourceStream(final MarkupContainer
 container, final Class? containerClass) {
 return new StringResourceStream(htmlbodywicket:enclosure
 child=\label\span
 wicket:id=\label\/span/wicket:enclosure/body/html);
 }
 }

 Maybe I could contribute a patch. Do you have any idea where I can find the
 cause of this issue?

 I've just found out, that unrenderedComponents list in Page#checkRendering
 is empty but it must not.

 cheers,
 Martin



Re: GC overhead limit exceeded exception @ wicket-examples.

2015-02-17 Thread Tobias Soloschenko
Hi Martin,

the exception are copy / paste from wicket-library.com - forgot to say that. 

Locally everything is working fine.

kind regards

Tobias

 Am 17.02.2015 um 14:55 schrieb Martin Grigorov mgrigo...@apache.org:
 
 Hi Tobias,
 
 I always run the examples in embedded Jetty locally, to test/debug
 something.
 http://www.wicket-examples.com runs on Tomcat 6.x and this could be the
 reason why it is down so often lately. I didn't have time to investigate
 yet.
 The error says that there is no enough memory available and there is a lot
 GC.
 
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Tue, Feb 17, 2015 at 2:53 PM, Tobias Soloschenko 
 tobiassolosche...@googlemail.com wrote:
 
 Hi everyone,
 
 I got an error when I try to access wicket-examples.
 
 kind regards
 
 Tobias
 
 HTTP Status 500 - Filter execution threw an exception
 --
 
 *type* Exception report
 
 *message* *Filter execution threw an exception*
 
 *description* *The server encountered an internal error that prevented it
 from fulfilling this request.*
 
 *exception*
 
 javax.servlet.ServletException: Filter execution threw an exception
 
 *root cause*
 
 java.lang.OutOfMemoryError: GC overhead limit exceeded
 
 *note* *The full stack trace of the root cause is available in the Apache
 Tomcat/6.0.36 logs.*
 --
 Apache Tomcat/6.0.36
 

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



Re: GC overhead limit exceeded exception @ wicket-examples.

2015-02-17 Thread Martin Grigorov
Hi Tobias,

I always run the examples in embedded Jetty locally, to test/debug
something.
http://www.wicket-examples.com runs on Tomcat 6.x and this could be the
reason why it is down so often lately. I didn't have time to investigate
yet.
The error says that there is no enough memory available and there is a lot
GC.


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

On Tue, Feb 17, 2015 at 2:53 PM, Tobias Soloschenko 
tobiassolosche...@googlemail.com wrote:

 Hi everyone,

 I got an error when I try to access wicket-examples.

 kind regards

 Tobias

 HTTP Status 500 - Filter execution threw an exception
 --

 *type* Exception report

 *message* *Filter execution threw an exception*

 *description* *The server encountered an internal error that prevented it
 from fulfilling this request.*

 *exception*

 javax.servlet.ServletException: Filter execution threw an exception

 *root cause*

 java.lang.OutOfMemoryError: GC overhead limit exceeded

 *note* *The full stack trace of the root cause is available in the Apache
 Tomcat/6.0.36 logs.*
 --
 Apache Tomcat/6.0.36



GC overhead limit exceeded exception @ wicket-examples.

2015-02-17 Thread Tobias Soloschenko
Hi everyone,

I got an error when I try to access wicket-examples.

kind regards

Tobias

HTTP Status 500 - Filter execution threw an exception
--

*type* Exception report

*message* *Filter execution threw an exception*

*description* *The server encountered an internal error that prevented it
from fulfilling this request.*

*exception*

javax.servlet.ServletException: Filter execution threw an exception

*root cause*

java.lang.OutOfMemoryError: GC overhead limit exceeded

*note* *The full stack trace of the root cause is available in the Apache
Tomcat/6.0.36 logs.*
--
Apache Tomcat/6.0.36


Re: how to handle null pointer exception while submit button

2014-10-06 Thread Paul Bors
Must be the wrong mailing list, ignore :)

On Sun, Oct 5, 2014 at 11:15 PM, Warren Bell warr...@clarksnutrition.com
wrote:

 OK, a little confused, AWT, Applet ? Is Wicket up to something I haven’t
 heard about ?

 Warren

 On Oct 5, 2014, at 7:57 PM, Taught by SM qaidjoharbarbh...@gmail.com
 wrote:

  This code will help to handle exceptions when there is a single
 TextField:
 
  import java.awt.*;
  import java.awt.event.*;
  import java.applet.*;
 
  /*
  applet code=throwsDemo.class height=250 width=300
  /applet
  */
 
  class FieldZeroException extends Exception
  {
FieldZeroException()
{
}
 
public String toString()
{
return Text field is empty.;
}
  }
 
  public class throwsDemo extends Applet implements ActionListener
  {
  Button b1;
  TextField tf1,tf2;
  Label l1,l2;
 
public void init()
{
setLayout(new FlowLayout(FlowLayout.LEFT));
l1=new Label(NULL);
l1.setForeground(Color.RED);
l2=new Label();
l2.setForeground(Color.GREEN);
tf1=new TextField(10);
b1=new Button(Check);
add(tf1);
add(b1);
add(l1);
add(l2);
b1.addActionListener(this);
}
 
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==b1)
{
String str1=tf1.getText();
int i=str1.length();
try
{
if(i==0)
{
throw new FieldZeroException();
}
else
{
l1.setText(Success);
}
}
catch(FieldZeroException fze)
{
l1.setText(fze.toString());
}
}
}
  }
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4667826.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
 
 
  --
  This email was Virus checked by Clark's Nutrition's Astaro Security
 Gateway.


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




Re: how to handle null pointer exception while submit button

2014-10-05 Thread Taught by SM
This code will help to handle exceptions when there is a single TextField:

import java.awt.*;
import java.awt.event.*;
import java.applet.*;

/*
applet code=throwsDemo.class height=250 width=300
/applet
*/

class FieldZeroException extends Exception
{
FieldZeroException()
{
}

public String toString()
{
return Text field is empty.;
}
}

public class throwsDemo extends Applet implements ActionListener
{
Button b1;
TextField tf1,tf2;
Label l1,l2;

public void init()
{
setLayout(new FlowLayout(FlowLayout.LEFT));
l1=new Label(NULL);
l1.setForeground(Color.RED);
l2=new Label();
l2.setForeground(Color.GREEN);
tf1=new TextField(10);
b1=new Button(Check);
add(tf1);
add(b1);
add(l1);
add(l2);
b1.addActionListener(this);
}

public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==b1)
{
String str1=tf1.getText();
int i=str1.length();
try
{
if(i==0)
{
throw new FieldZeroException();
}
else
{
l1.setText(Success);
}
}
catch(FieldZeroException fze)
{
l1.setText(fze.toString());
}
}
}
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4667826.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: how to handle null pointer exception while submit button

2014-10-05 Thread Warren Bell
OK, a little confused, AWT, Applet ? Is Wicket up to something I haven’t heard 
about ?

Warren

On Oct 5, 2014, at 7:57 PM, Taught by SM qaidjoharbarbh...@gmail.com wrote:

 This code will help to handle exceptions when there is a single TextField:
 
 import java.awt.*;
 import java.awt.event.*;
 import java.applet.*;
 
 /*
 applet code=throwsDemo.class height=250 width=300
 /applet
 */
 
 class FieldZeroException extends Exception
 {
   FieldZeroException()
   {
   }
   
   public String toString()
   {
   return Text field is empty.;
   }
 }
 
 public class throwsDemo extends Applet implements ActionListener
 {
 Button b1;
 TextField tf1,tf2;
 Label l1,l2;
 
   public void init()
   {
   setLayout(new FlowLayout(FlowLayout.LEFT));
   l1=new Label(NULL);
   l1.setForeground(Color.RED);
   l2=new Label();
   l2.setForeground(Color.GREEN);
   tf1=new TextField(10);
   b1=new Button(Check);
   add(tf1);
   add(b1);
   add(l1);
   add(l2);
   b1.addActionListener(this);
   }
   
   public void actionPerformed(ActionEvent ae)
   {
   if(ae.getSource()==b1)
   {
   String str1=tf1.getText();
   int i=str1.length();
   try
   {
   if(i==0)
   {
   throw new FieldZeroException();
   }
   else
   {
   l1.setText(Success);
   }
   }
   catch(FieldZeroException fze)
   {
   l1.setText(fze.toString());
   }
   }
   }
 }
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4667826.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
 
 
 -- 
 This email was Virus checked by Clark's Nutrition's Astaro Security Gateway.


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



Re: Wicket7 paging navigation exception

2014-09-25 Thread Maxim Solodovnik
Thanks Andrea,
Paging works as expected in latest snapshot

On 21 September 2014 21:30, Maxim Solodovnik solomax...@gmail.com wrote:

 great!
 Thanks will try to check ASAP

 On 21 September 2014 21:28, Andrea Del Bene an.delb...@gmail.com wrote:

 Done. The fixed snapshot should be available in a while...

 Thanks :)

 On 21 September 2014 01:05, Andrea Del Bene an.delb...@gmail.com
 wrote:

  Same error in Wicket examples (page AjaxDataTablePage) :(. Working on a
 fix.






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




 --
 WBR
 Maxim aka solomax




-- 
WBR
Maxim aka solomax


Re: Wicket7 paging navigation exception

2014-09-21 Thread Andrea Del Bene

Done. The fixed snapshot should be available in a while...

Thanks :)

On 21 September 2014 01:05, Andrea Del Bene an.delb...@gmail.com wrote:


Same error in Wicket examples (page AjaxDataTablePage) :(. Working on a
fix.








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



Re: Wicket7 paging navigation exception

2014-09-21 Thread Maxim Solodovnik
great!
Thanks will try to check ASAP

On 21 September 2014 21:28, Andrea Del Bene an.delb...@gmail.com wrote:

 Done. The fixed snapshot should be available in a while...

 Thanks :)

 On 21 September 2014 01:05, Andrea Del Bene an.delb...@gmail.com wrote:

  Same error in Wicket examples (page AjaxDataTablePage) :(. Working on a
 fix.






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




-- 
WBR
Maxim aka solomax


Wicket7 paging navigation exception

2014-09-20 Thread Maxim Solodovnik
Hello All,

I just tried to use paging navigator (works fine in wicket 6.17) in
wicket7-M3 project and get

[INFO] [http-nio-0.0.0.0-5080-exec-8]
org.apache.wicket.RequestListenerInterface - component not enabled or
visible; ignoring call. Component: [AjaxPagingNavigationLink [Component id
= pageLink]]
 WARN 09-21 00:08:38.556 RequestCycle.java 64403 346 RequestCycleExtra
[http-nio-0.0.0.0-5080-exec-8] - 
 WARN 09-21 00:08:38.560 RequestCycle.java 64407 347 RequestCycleExtra
[http-nio-0.0.0.0-5080-exec-8] - Handling the following exception
org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException:
Component rejected interface invocationComponent: [AjaxPagingNavigationLink
[Component id = pageLink]] Listener: [RequestListenerInterface
name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:212)
~[wicket-core-7.0.0-M3.jar:7.0.0-M3]


should I modify the code somehow? Or it is wicket bug?
(I have clicked page 2 link and get Access denied)

Thanks in advance

-- 
WBR
Maxim aka solomax


Re: Wicket7 paging navigation exception

2014-09-20 Thread Andrea Del Bene

Same error in Wicket examples (page AjaxDataTablePage) :(. Working on a fix.

Hello All,

I just tried to use paging navigator (works fine in wicket 6.17) in
wicket7-M3 project and get

[INFO] [http-nio-0.0.0.0-5080-exec-8]
org.apache.wicket.RequestListenerInterface - component not enabled or
visible; ignoring call. Component: [AjaxPagingNavigationLink [Component id
= pageLink]]
  WARN 09-21 00:08:38.556 RequestCycle.java 64403 346 RequestCycleExtra
[http-nio-0.0.0.0-5080-exec-8] - 
  WARN 09-21 00:08:38.560 RequestCycle.java 64407 347 RequestCycleExtra
[http-nio-0.0.0.0-5080-exec-8] - Handling the following exception
org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException:
Component rejected interface invocationComponent: [AjaxPagingNavigationLink
[Component id = pageLink]] Listener: [RequestListenerInterface
name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:212)
~[wicket-core-7.0.0-M3.jar:7.0.0-M3]


should I modify the code somehow? Or it is wicket bug?
(I have clicked page 2 link and get Access denied)

Thanks in advance




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



Re: Wicket7 paging navigation exception

2014-09-20 Thread Maxim Solodovnik
Thanks :)

On 21 September 2014 01:05, Andrea Del Bene an.delb...@gmail.com wrote:

 Same error in Wicket examples (page AjaxDataTablePage) :(. Working on a
 fix.

  Hello All,

 I just tried to use paging navigator (works fine in wicket 6.17) in
 wicket7-M3 project and get

 [INFO] [http-nio-0.0.0.0-5080-exec-8]
 org.apache.wicket.RequestListenerInterface - component not enabled or
 visible; ignoring call. Component: [AjaxPagingNavigationLink [Component id
 = pageLink]]
   WARN 09-21 00:08:38.556 RequestCycle.java 64403 346 RequestCycleExtra
 [http-nio-0.0.0.0-5080-exec-8] - 
   WARN 09-21 00:08:38.560 RequestCycle.java 64407 347 RequestCycleExtra
 [http-nio-0.0.0.0-5080-exec-8] - Handling the following exception
 org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedEx
 ception:
 Component rejected interface invocationComponent:
 [AjaxPagingNavigationLink
 [Component id = pageLink]] Listener: [RequestListenerInterface
 name=ILinkListener, method=public abstract void
 org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
 at
 org.apache.wicket.RequestListenerInterface.invoke(
 RequestListenerInterface.java:212)
 ~[wicket-core-7.0.0-M3.jar:7.0.0-M3]


 should I modify the code somehow? Or it is wicket bug?
 (I have clicked page 2 link and get Access denied)

 Thanks in advance



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




-- 
WBR
Maxim aka solomax


Re: how to handle null pointer exception while submit button

2014-06-28 Thread Mihir Chhaya
Hmmm...then that leaves a question open on my side that why I didn't get
NPE with that code?
One more thing I observed and you might have already taken care of in your
actual code, but any reason not writing generics type
TextFieldType/ModelType etc in your component?

-Mihir.


On Fri, Jun 27, 2014 at 10:51 PM, kumar ramanathan kumarramana...@gmail.com
 wrote:

 Thanks for reviewing the issue.I have actually fixed my problem.I have used
 setconvertemptyinputstrngtonull method.

 TextField memberIdField = new
 TextField(memberId,memberIdModel);
 *memberIdField.setConvertEmptyInputStringToNull(false);*
 TextField lossIdField = new
 TextField(lossId,lossIdModel);
 lossIdField.setConvertEmptyInputStringToNull(false);


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666404.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: how to handle null pointer exception while submit button

2014-06-27 Thread Mihir Chhaya
Can you share your code snippet? Which type of model are you using?


On Fri, Jun 27, 2014 at 1:17 AM, Sven Meier s...@meiers.net wrote:

 #setConvertEmptyInputStringToNull(false) could help, but with a
 stacktrace we can give you a better advice.

 Sven


 On 06/27/2014 06:33 AM, kumar ramanathan wrote:

 Hi Friends,
 I have a text box and a submit button , If i pressed submit button without
 entering anything in textbox , am getting null pointer exception . Can you
 please help us on it ?


 Thanks,
 Kumar

 --
 View this message in context: http://apache-wicket.1842946.
 n4.nabble.com/how-to-handle-null-pointer-exception-while-
 submit-button-tp4666392.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




Re: how to handle null pointer exception while submit button

2014-06-27 Thread kumar ramanathan

PropertyModel memberIdModel=new PropertyModel(this,memberNumber);
PropertyModel lossIdModel=new PropertyModel(this,lossNumber);
TextField memberIdField = new TextField(memberId,memberIdModel);
TextField lossIdField = new TextField(lossId,lossIdModel);

Form form=new Form(form1){
public void onSubmit(){


flag=0;
assignments.clear();
estimates.clear();
assignments.add(new
AssignmentDB(MemberId,LossId,AssignemntId,DOL));
assignments.add(new
AssignmentDB(1234,001,1357,10/12/1067));
assignments.add(new
AssignmentDB(1234,001,1358,10/12/1067));
assignments.add(new
AssignmentDB(1234,003,1357,10/12/1067));
   
for(int i=1;iassignments.size();){
   
if(memberNumber.equals(assignments.get(i).getMemberId())){
System.out.println(inside2);
   
if(lossNumber.equals(assignments.get(i).getLossId())){
System.out.println(inside3);
i=i+1;
}
else{
assignments.remove(i);
i=1;
}

}
else{
assignments.remove(i);
i=1;
}

}  
if(assignments.size()=1){

setAsssignmentLabel(Assignments Output);
assignments.clear();
setAsssignmentResult(No Assignments for the given
member number and loss number);
setEstimateResult();
setEstimateLabel();
}
else{
setAsssignmentLabel(Assignments Ouput);
  
setAsssignmentResult();
setEstimateResult();
}
  }//form submit


 };//form

form.add(memberIdField);
form.add(lossIdField);
add(form);
   

This is my code snippet . Kindly help me.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666396.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: how to handle null pointer exception while submit button

2014-06-27 Thread Mihir Chhaya
Kumar,

I ran following (copied from your code) and it is showing me the value for
memberNumber. No NPE. Since you have String as memberID, I have assigned
String type to the models and property variable.


PropertyModelString memberIdModel=new
PropertyModelString(this,memberNumber);
TextFieldString memberIdField = new
TextFieldString(memberId,memberIdModel);


Form? form = new FormVoid(form){
 /**
 *
 */
private static final long serialVersionUID = 1L;

/* (non-Javadoc)
 * @see org.apache.wicket.markup.html.form.Form#onSubmit()
 */
@Override
protected void onSubmit() {
 System.out.println(memberNumber.equals(5566));
}
};
add(form);

As Sven has mentioned, stacktrace might be more helpful.




On Fri, Jun 27, 2014 at 6:16 AM, kumar ramanathan kumarramana...@gmail.com
wrote:


 PropertyModel memberIdModel=new PropertyModel(this,memberNumber);
 PropertyModel lossIdModel=new PropertyModel(this,lossNumber);
 TextField memberIdField = new TextField(memberId,memberIdModel);
 TextField lossIdField = new TextField(lossId,lossIdModel);

 Form form=new Form(form1){
 public void onSubmit(){


 flag=0;
 assignments.clear();
 estimates.clear();
 assignments.add(new
 AssignmentDB(MemberId,LossId,AssignemntId,DOL));
 assignments.add(new
 AssignmentDB(1234,001,1357,10/12/1067));
 assignments.add(new
 AssignmentDB(1234,001,1358,10/12/1067));
 assignments.add(new
 AssignmentDB(1234,003,1357,10/12/1067));

 for(int i=1;iassignments.size();){

 if(memberNumber.equals(assignments.get(i).getMemberId())){
 System.out.println(inside2);

 if(lossNumber.equals(assignments.get(i).getLossId())){
 System.out.println(inside3);
 i=i+1;
 }
 else{
 assignments.remove(i);
 i=1;
 }

 }
 else{
 assignments.remove(i);
 i=1;
 }

 }
 if(assignments.size()=1){

 setAsssignmentLabel(Assignments Output);
 assignments.clear();
 setAsssignmentResult(No Assignments for the given
 member number and loss number);
 setEstimateResult();
 setEstimateLabel();
 }
 else{
 setAsssignmentLabel(Assignments Ouput);

 setAsssignmentResult();
 setEstimateResult();
 }
   }//form submit


  };//form

 form.add(memberIdField);
 form.add(lossIdField);
 add(form);


 This is my code snippet . Kindly help me.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666396.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: how to handle null pointer exception while submit button

2014-06-27 Thread kumar ramanathan
Thanks for reviewing the issue.I have actually fixed my problem.I have used
setconvertemptyinputstrngtonull method.

TextField memberIdField = new
TextField(memberId,memberIdModel);
*memberIdField.setConvertEmptyInputStringToNull(false);*
TextField lossIdField = new TextField(lossId,lossIdModel);
lossIdField.setConvertEmptyInputStringToNull(false);


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666404.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



how to handle null pointer exception while submit button

2014-06-26 Thread kumar ramanathan
Hi Friends,
I have a text box and a submit button , If i pressed submit button without
entering anything in textbox , am getting null pointer exception . Can you
please help us on it ?


Thanks,
Kumar 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392.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: how to handle null pointer exception while submit button

2014-06-26 Thread Sven Meier
#setConvertEmptyInputStringToNull(false) could help, but with a 
stacktrace we can give you a better advice.


Sven

On 06/27/2014 06:33 AM, kumar ramanathan wrote:

Hi Friends,
I have a text box and a submit button , If i pressed submit button without
entering anything in textbox , am getting null pointer exception . Can you
please help us on it ?


Thanks,
Kumar

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392.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



Ajax exception handling on client side

2014-05-30 Thread Andre Camilo
Hi,

How can I handle exceptions occurred at the server side on the client side 
(with Ajax requests)?

At the client side, the javascript event ' /ajax/call/failure' is only fired 
when the connection fails (I think), but when the there's an unhandled 
exception on the server side, the events ' /ajax/call/success' and 
'/ajax/call/complete' fired with a redirect message.

I know I can just try...catch each ajax component, but I was looking for 
something more global to the whole application.

Can anyone help me?

--

André Camilo
Software Architect

Premium Minds
Av. Marquês de Tomar nº69, 1º Andar
1050-154 Lisboa
www.premium-minds.comhttp://www.premium-minds.com/

Geral: +351 217 817 555
Tlm: +351 914 515 010
andre.cam...@premium-minds.commailto:andre.cam...@premium-minds.com


Re: Ajax exception handling on client side

2014-05-30 Thread Martin Grigorov
Hi,

See org.apache.wicket.settings.IExceptionSettings#setAjaxErrorHandlingStrategy

Martin Grigorov
Wicket Training and Consulting


On Fri, May 30, 2014 at 12:46 PM, Andre Camilo 
andre.cam...@premium-minds.com wrote:

 Hi,

 How can I handle exceptions occurred at the server side on the client side
 (with Ajax requests)?

 At the client side, the javascript event ' /ajax/call/failure' is only
 fired when the connection fails (I think), but when the there's an
 unhandled exception on the server side, the events ' /ajax/call/success'
 and '/ajax/call/complete' fired with a redirect message.

 I know I can just try...catch each ajax component, but I was looking for
 something more global to the whole application.

 Can anyone help me?

 --

 André Camilo
 Software Architect

 Premium Minds
 Av. Marquês de Tomar nº69, 1º Andar
 1050-154 Lisboa
 www.premium-minds.comhttp://www.premium-minds.com/

 Geral: +351 217 817 555
 Tlm: +351 914 515 010
 andre.cam...@premium-minds.commailto:andre.cam...@premium-minds.com



onInitialize() and exception handling

2014-04-29 Thread Alberto Brosich

Hi,

I have a wicket application where I create page components (mainly
labels and ListViews) using onInitialize() method of some panels I have
in every page.
In some cases, during the creation of the components, some exceptions
can occur (for example if the content is downloaded from a webservice
that returns error 404), and I would propagate it, but onInitialize() of
Panel does not throw exceptions.
So my questions are: which are the best practices to deal that cases?
Is onInitialize() the best place where create components? 

Regards

Alberto


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



Re: onInitialize() and exception handling

2014-04-29 Thread Francois Meillet
You can throw any exception that extends RuntimeException

François Meillet
Formation Wicket - Développement Wicket





Le 29 avr. 2014 à 14:35, Alberto Brosich abros...@ogs.trieste.it a écrit :

 
 Hi,
 
 I have a wicket application where I create page components (mainly
 labels and ListViews) using onInitialize() method of some panels I have
 in every page.
 In some cases, during the creation of the components, some exceptions
 can occur (for example if the content is downloaded from a webservice
 that returns error 404), and I would propagate it, but onInitialize() of
 Panel does not throw exceptions.
 So my questions are: which are the best practices to deal that cases?
 Is onInitialize() the best place where create components? 
 
 Regards
 
 Alberto
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Exception thrown when refreshing the page.

2014-04-02 Thread Sven Meier

 fragment.add(new Label(firstName.getId() + .feedback)

What do you actually want to display with this label?

This way it will look for the property firstname.feedback in a 
parental CompoundPropertyModel.


Sven

On 04/02/2014 06:55 AM, chathuraka.waas wrote:

Hi,

i have a form which as few text field elements. and when i submit the form
it works fine. but after submit if i go and refresh the page it gives me an
expception.

my java and html code is below.

TextFieldStringfirstName = new TextField(firstName, false, 50);
firstName.setOutputMarkupId(true);
fragment.add(firstName);
fragment.add(new Label(firstName.getId() +
.feedback).setOutputMarkupId(true));

wicket:fragment wicket:id=fragment
 label for=firstNameFirst
Name/label
 input id=firstName
wicket:id=firstName type=text value={firstName} maxlength=50
tabindex=1 /
 
 /wicket:fragment



and here's the exception i'm getting.


org.apache.wicket.WicketRuntimeException: Exception in rendering component:
[Component id = firstName.feedback]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2578)
at
org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:56)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1530)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1485)
at
org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.onComponentTagBody(FragmentMarkupSourcingStrategy.java:86)
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1494)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1530)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1485)
at
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1696)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1494)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
at org.apache.wicket.Page.onRender(Page.java:887)
at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at org.apache.wicket.Page.renderPage(Page.java:1024)
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:219)
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
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.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.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.fanminder.HibernateFilter.doFilter

Re: Exception thrown when refreshing the page.

2014-04-02 Thread chathuraka.waas
Hi,

i got it fixed by using the following code.

fragment.add(new FormComponentFeedbackLabel(firstName.feedback,
firstName));

but now when i refresh the page instead of clearing the text field values
they are retained. and any error message i've appended is also retained. 

how can i  fix this issue now?


Best Regards, 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-thrown-when-refreshing-the-page-tp4665212p4665218.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



Exception thrown when refreshing the page.

2014-04-01 Thread chathuraka.waas
Hi,

i have a form which as few text field elements. and when i submit the form
it works fine. but after submit if i go and refresh the page it gives me an
expception.

my java and html code is below. 

TextFieldStringfirstName = new TextField(firstName, false, 50);
firstName.setOutputMarkupId(true);
fragment.add(firstName);
fragment.add(new Label(firstName.getId() +
.feedback).setOutputMarkupId(true));

wicket:fragment wicket:id=fragment
label for=firstNameFirst
Name/label
input id=firstName
wicket:id=firstName type=text value={firstName} maxlength=50
tabindex=1 /

/wicket:fragment


and here's the exception i'm getting. 


org.apache.wicket.WicketRuntimeException: Exception in rendering component:
[Component id = firstName.feedback]
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2578)
at
org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:56)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1530)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1485)
at
org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.onComponentTagBody(FragmentMarkupSourcingStrategy.java:86)
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1494)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1530)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1485)
at
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1696)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2551)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1494)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1555)
at org.apache.wicket.Page.onRender(Page.java:887)
at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
at org.apache.wicket.Component.internalRender(Component.java:2381)
at org.apache.wicket.Component.render(Component.java:2309)
at org.apache.wicket.Page.renderPage(Page.java:1024)
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:219)
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
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.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.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.fanminder.HibernateFilter.doFilter(HibernateFilter.java:24)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210

Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-28 Thread Robin Shine
Hi Sven,

Thanks for looking into this. I started a new wicket project from scratch using 
Wicket maven archetype, and it does work as expected! Then I checked into my 
project to find the difference, and tt turns out that this issue will occur as 
long as below code is added in wicket WebApplication.init():


        getComponentInstantiationListeners().add(new 
IComponentInstantiationListener() {
            
            @Override
            public void onInstantiation(Component component) {
                component.add(new Behavior() {

                });
            }
            
        });

It seems that the instantiation listener adds the behavior to the page at very 
start of the page constructor, and then the page is marked as dirty to cause 
onInitialize() being called afterwards. Is this a bug or expected behavior?


Regards
Robin




 From: Sven Meier s...@meiers.net
To: users@wicket.apache.org 
Sent: Thursday, March 27, 2014 10:49 PM
Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
exception
 

Hi,

#onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.

Regards
Sven


On 03/27/2014 03:30 PM, Robin Shine wrote:
 Hi All,

 We are glad to see that the issue WICKET-5387 (Page#onInitialize called after 
 an exception in the constructor of Page) has been resolved in 6.13.0. However 
 when I tried this version (and 6.14.0) with below code, the issue still exist:

 public class TestPage extends WebPage {

      public TestPage() {
          throw new RuntimeException(exception);
      }

      @Override
      protected void onInitialize() {
          super.onInitialize();
          
          System.out.println(onInitialize);
      }
      
 }

 As you can see from above code, I intentionally throws an exception in 
 TestPage constructor and hoping that onInitialize() method is not called when 
 I visit that page. But the result is that onInitialize is still getting 
 called in this case. Am I understanding WICKET-5387 incorrectly? And is there 
 any approach to prevent onInitialize() from being called in case of a 
 constructor exception? We want this as onInitialize() might rely on some 
 params setup in the constructor, and calling onInitialize() will lead to 
 other exceptions hiding exceptions thrown in constructor.

 Regards

 Robin



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

Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-28 Thread Sven Meier

Hi Robin,

we should try to improve that. Please create a new issue with a quickstart.

Thanks
Sven


On 03/28/2014 09:16 AM, Robin Shine wrote:

Hi Sven,

Thanks for looking into this. I started a new wicket project from scratch using 
Wicket maven archetype, and it does work as expected! Then I checked into my 
project to find the difference, and tt turns out that this issue will occur as 
long as below code is added in wicket WebApplication.init():


 getComponentInstantiationListeners().add(new 
IComponentInstantiationListener() {
 
 @Override

 public void onInstantiation(Component component) {
 component.add(new Behavior() {

 });
 }
 
 });


It seems that the instantiation listener adds the behavior to the page at very 
start of the page constructor, and then the page is marked as dirty to cause 
onInitialize() being called afterwards. Is this a bug or expected behavior?


Regards
Robin




  From: Sven Meier s...@meiers.net
To: users@wicket.apache.org
Sent: Thursday, March 27, 2014 10:49 PM
Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
exception
  


Hi,

#onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.

Regards
Sven


On 03/27/2014 03:30 PM, Robin Shine wrote:

Hi All,

We are glad to see that the issue WICKET-5387 (Page#onInitialize called after 
an exception in the constructor of Page) has been resolved in 6.13.0. However 
when I tried this version (and 6.14.0) with below code, the issue still exist:

public class TestPage extends WebPage {

   public TestPage() {
   throw new RuntimeException(exception);
   }

   @Override
   protected void onInitialize() {
   super.onInitialize();
   
   System.out.println(onInitialize);

   }
   
}


As you can see from above code, I intentionally throws an exception in TestPage 
constructor and hoping that onInitialize() method is not called when I visit that page. 
But the result is that onInitialize is still getting called in this case. Am 
I understanding WICKET-5387 incorrectly? And is there any approach to prevent 
onInitialize() from being called in case of a constructor exception? We want this as 
onInitialize() might rely on some params setup in the constructor, and calling 
onInitialize() will lead to other exceptions hiding exceptions thrown in constructor.

Regards

Robin



-
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



Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-28 Thread Robin Shine
Hi Sven,


An issue has been created for this with a quickstart:
https://issues.apache.org/jira/browse/WICKET-5546

 
Regards
Robin




 From: Sven Meier s...@meiers.net
To: users@wicket.apache.org 
Sent: Friday, March 28, 2014 4:22 PM
Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
exception
 

Hi Robin,

we should try to improve that. Please create a new issue with a quickstart.

Thanks
Sven


On 03/28/2014 09:16 AM, Robin Shine wrote:
 Hi Sven,

 Thanks for looking into this. I started a new wicket project from scratch 
 using Wicket maven archetype, and it does work as expected! Then I checked 
 into my project to find the difference, and tt turns out that this issue will 
 occur as long as below code is added in wicket WebApplication.init():


          getComponentInstantiationListeners().add(new 
IComponentInstantiationListener() {
              
              @Override
              public void onInstantiation(Component component) {
                  component.add(new Behavior() {

                  });
              }
              
          });

 It seems that the instantiation listener adds the behavior to the page at 
 very start of the page constructor, and then the page is marked as dirty to 
 cause onInitialize() being called afterwards. Is this a bug or expected 
 behavior?


 Regards
 Robin



 
   From: Sven Meier s...@meiers.net
 To: users@wicket.apache.org
 Sent: Thursday, March 27, 2014 10:49 PM
 Subject: Re: Avoid calling Page.onInitialize if page constructor throws an 
 exception
  

 Hi,

 #onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.

 Regards
 Sven


 On 03/27/2014 03:30 PM, Robin Shine wrote:
 Hi All,

 We are glad to see that the issue WICKET-5387 (Page#onInitialize called 
 after an exception in the constructor of Page) has been resolved in 6.13.0. 
 However when I tried this version (and 6.14.0) with below code, the issue 
 still exist:

 public class TestPage extends WebPage {

        public TestPage() {
            throw new RuntimeException(exception);
        }

        @Override
        protected void onInitialize() {
            super.onInitialize();
            
            System.out.println(onInitialize);
        }
        
 }

 As you can see from above code, I intentionally throws an exception in 
 TestPage constructor and hoping that onInitialize() method is not called 
 when I visit that page. But the result is that onInitialize is still 
 getting called in this case. Am I understanding WICKET-5387 incorrectly? And 
 is there any approach to prevent onInitialize() from being called in case of 
 a constructor exception? We want this as onInitialize() might rely on some 
 params setup in the constructor, and calling onInitialize() will lead to 
 other exceptions hiding exceptions thrown in constructor.

 Regards

 Robin


 -
 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

Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-27 Thread Robin Shine
Hi All,

We are glad to see that the issue WICKET-5387 (Page#onInitialize called after 
an exception in the constructor of Page) has been resolved in 6.13.0. However 
when I tried this version (and 6.14.0) with below code, the issue still exist:

public class TestPage extends WebPage {

    public TestPage() {
        throw new RuntimeException(exception);
    }

    @Override
    protected void onInitialize() {
        super.onInitialize();
        
        System.out.println(onInitialize);
    }
    
}

As you can see from above code, I intentionally throws an exception in TestPage 
constructor and hoping that onInitialize() method is not called when I visit 
that page. But the result is that onInitialize is still getting called in 
this case. Am I understanding WICKET-5387 incorrectly? And is there any 
approach to prevent onInitialize() from being called in case of a constructor 
exception? We want this as onInitialize() might rely on some params setup in 
the constructor, and calling onInitialize() will lead to other exceptions 
hiding exceptions thrown in constructor.

Regards

Robin


Re: Avoid calling Page.onInitialize if page constructor throws an exception

2014-03-27 Thread Sven Meier

Hi,

#onInitialize() is not called here with 6.14.0 and 6.15.0-SNAPSHOT.

Regards
Sven


On 03/27/2014 03:30 PM, Robin Shine wrote:

Hi All,

We are glad to see that the issue WICKET-5387 (Page#onInitialize called after 
an exception in the constructor of Page) has been resolved in 6.13.0. However 
when I tried this version (and 6.14.0) with below code, the issue still exist:

public class TestPage extends WebPage {

 public TestPage() {
 throw new RuntimeException(exception);
 }

 @Override
 protected void onInitialize() {
 super.onInitialize();
 
 System.out.println(onInitialize);

 }
 
}


As you can see from above code, I intentionally throws an exception in TestPage 
constructor and hoping that onInitialize() method is not called when I visit that page. 
But the result is that onInitialize is still getting called in this case. Am 
I understanding WICKET-5387 incorrectly? And is there any approach to prevent 
onInitialize() from being called in case of a constructor exception? We want this as 
onInitialize() might rely on some params setup in the constructor, and calling 
onInitialize() will lead to other exceptions hiding exceptions thrown in constructor.

Regards

Robin




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



Re: Pass exception to internal error page

2014-03-14 Thread Martin Grigorov
Hi,



On Fri, Mar 14, 2014 at 1:16 AM, jchappelle jchappe...@4redi.com wrote:

 I am using wicket 6.14.0.

 I have a RequestCycleListener that listens for onException. I handle
 PageExpiredException, UnauthorizedInstantiationException(this is custom),
 and by default I redirect to a custom ErrorPage class that takes the
 Exception object in the constructor. It also contains a list of ignored
 exceptions that it will return null for. This custom ErrorPage actually
 reports an error to our JIRA bug tracker when it renders to the user.

 The problem I am having is we are getting a lot of bug reports for things
 like StalePageException and ComponentNotFoundException when I think wicket


Indeed Wicket handles StalePageException.
ComponentNotFoundException usually means that there is an error in the
application, so I think it is good to handle it as you do now.


 can handle those without the user knowing. While I can add them to the
 ignored list, I don't think this is a good design because as wicket
 changes,
 these exceptions can change.

 I would like a way to just register my internal error page with
 getApplicationSettings().setInternalErrorPage(...) but I can't because I
 won't have my Exception passed to my error page. Is there a way to do this?
 Or is there some way to access the last exception associated with the
 session?

 I suppose I can create an Exception variable in my Session class and set it
 in my RequestCycleListener but I'm hoping there is a better way.


storing it in the session is the best place.
other places to store it are RequestCycle's metadata or a ThreadLocal but
usually Wicket will make a http redirect to load the configured internal
error page and those won't be valid any more.

How do you check whether a given type of error is logged in Jira just once ?
An attacker can create thousands of tickets in Jira by just reloading a
page that leads to a problem.



 Thanks!

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Pass-exception-to-internal-error-page-tp4664951.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




  1   2   3   4   5   6   7   8   >