Re: Page deserialization problem after a network problem

2020-05-25 Thread Calin Pavel

On 5/19/2020 10:08 AM, Sven Meier wrote:

Hi,

I don't understand how that exception ends up in your component 
hierarchy either.


Do you use a custom exception mapper or listener? I don't see any 
place in Wicket where that exception is stored.


Best regards

Sven


On 18.05.20 17:12, Calin Pavel wrote:

Sometime our customers have network problems (e.g connection interrupted
for a short period) and if that happens when we are sending response 
for a

page, an exception is thrown:



*2020-04-23 18:47:28 ERROR [ba00c0b5f1c83a39/ba00c0b5f1c83a39] 
[00529169]

[m00080874] DefaultExceptionMapper:144 - Connection lost, give up
responding.org.apache.wicket.protocol.http.servlet.ResponseIOException:
org.eclipse.jetty.io.EofException*

which is normal.

But after that if a user tries to do something else in the same page 
(e.g
clicks on an Ajax Link) a deserialization error appears (like stack 
trace

below).

Did anybody else encounter the same behaviour?

We are using Wicket 7.10.0 and do not understand:
1. why serialized page contains information (details of connection
exception) when serialized
2. why EofException is not found during deserialization, since it was
thrown seconds before in the same running JVM



2020-04-23 18:49:51 ERROR [850aa812ac5fa019/850aa812ac5fa019] [00529169]
[m00080874] DefaultExceptionMapper:170 - Unexpected error occurred
java.lang.RuntimeException: Could not deserialize object from byte[]
at
org.apache.wicket.serialize.java.JavaSerializer.deserialize(JavaSerializer.java:143) 


at
org.apache.wicket.pageStore.AbstractPageStore.deserializePage(AbstractPageStore.java:152) 


at
org.apache.wicket.pageStore.AbstractCachingPageStore.getPage(AbstractCachingPageStore.java:67) 


at
org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:231) 


at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:393) 


at
org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:82) 


at
org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50) 


at
org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:246) 


at
org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:113) 


at
org.apache.wicket.core.request.handler.PageProvider.getStoredPage(PageProvider.java:299) 


at
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264) 


at
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:169) 


at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:96) 


at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:157) 


at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) 


at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) 


at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) 


at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) 


at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) 


at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) 


at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) 


at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) 


at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) 


at
com.tvh.wicket.protocol.http.RequestTimeLoggingFilter.doFilter(RequestTimeLoggingFilter.java:167) 


at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) 


at brave.servlet.TracingFilter.doFilter(TracingFilter.java:86)
at
com.tvh.website.ecommerce.tracing.web.DelegatingTracingFilter.doFilter(DelegatingTracingFilter.java:38) 


at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) 


at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) 


at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) 


at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) 


at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) 


at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) 

at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) 


at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) 


at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141

Page deserialization problem after a network problem

2020-05-18 Thread Calin Pavel
Sometime our customers have network problems (e.g connection interrupted
for a short period) and if that happens when we are sending response for a
page, an exception is thrown:



*2020-04-23 18:47:28 ERROR [ba00c0b5f1c83a39/ba00c0b5f1c83a39] [00529169]
[m00080874] DefaultExceptionMapper:144 - Connection lost, give up
responding.org.apache.wicket.protocol.http.servlet.ResponseIOException:
org.eclipse.jetty.io.EofException*

which is normal.

But after that if a user tries to do something else in the same page (e.g
clicks on an Ajax Link) a deserialization error appears (like stack trace
below).

Did anybody else encounter the same behaviour?

We are using Wicket 7.10.0 and do not understand:
1. why serialized page contains information (details of connection
exception) when serialized
2. why EofException is not found during deserialization, since it was
thrown seconds before in the same running JVM



2020-04-23 18:49:51 ERROR [850aa812ac5fa019/850aa812ac5fa019] [00529169]
[m00080874] DefaultExceptionMapper:170 - Unexpected error occurred
java.lang.RuntimeException: Could not deserialize object from byte[]
at
org.apache.wicket.serialize.java.JavaSerializer.deserialize(JavaSerializer.java:143)
at
org.apache.wicket.pageStore.AbstractPageStore.deserializePage(AbstractPageStore.java:152)
at
org.apache.wicket.pageStore.AbstractCachingPageStore.getPage(AbstractCachingPageStore.java:67)
at
org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:231)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:393)
at
org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:82)
at
org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50)
at
org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:246)
at
org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:113)
at
org.apache.wicket.core.request.handler.PageProvider.getStoredPage(PageProvider.java:299)
at
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:169)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:96)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:157)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
at
com.tvh.wicket.protocol.http.RequestTimeLoggingFilter.doFilter(RequestTimeLoggingFilter.java:167)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
at brave.servlet.TracingFilter.doFilter(TracingFilter.java:86)
at
com.tvh.website.ecommerce.tracing.web.DelegatingTracingFilter.doFilter(DelegatingTracingFilter.java:38)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at
org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at 

Re: Client browser timezone offset

2019-10-28 Thread Calin Pavel

Current code is working ok. There is no problem with it.
But it gives you the UtcOffset at 1.Jan.2019 and UtcDstOffset at 
1.June.2019.


But I do not know how to determine what is the CURRENT timezone offset 
(for Date.NOW)


On 10/28/2019 6:24 PM, Martin Grigorov wrote:

Hi,

I didn't get what is the problem with the current code.
For me http://examples8x.wicket.apache.org/ajaxhellobrowser/ shows
utcDSTOffset=3
utcOffset=2
which seems to be correct.

On Mon, Oct 28, 2019 at 5:56 PM Maxim Solodovnik 
wrote:


On the other hand: the old code can be used if TZ is not available
I'll do some tests and will create PR

On Mon, 28 Oct 2019 at 22:51, Maxim Solodovnik 
wrote:


@devs are we supporting IE11 for wicket9? if not we can add this call to
standard ClientProperties ...
WDYT?

On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik 
wrote:


Hello,

according to stackoverflow [1]
you can use Intl.DateTimeFormat().resolvedOptions().timeZone
ClientProperties can be extended to get this info on server

[1]


https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser

On Mon, 28 Oct 2019 at 22:26, Calin Pavel  wrote:


I'm trying to detect what is the current timezone offset for a client
browser accessing my Wicket application.
I found out that BrowserInfoForm.ClientPropertiesBean contains details
about:
- utcOffset
- utcDstOffset
but these are calculated at 1.Jan and 1.June.

Is there any way to determine on server side what is the CURRENT

timezone

offset of the client?
I've tried to use ClientPropertiesBean.timeZone, but that is relative /
guest and not real client timezone.


--

Kind Regards,


*CALIN PAVELSoftware Engineer - consultant*
calin.pa...@tvh.com

*TVH PARTS HOLDING NV*
Vichtseweg 129 • BE-8790 WAREGEM
T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com

<https://www.tvh.com/>

--


 DISCLAIMER
<https://media.tvh.com/content/pdf/various/Email-disclaimer.pdf> 

This
message is delivered to all addressees subject to the conditions set
forth
in the attached disclaimer, which is an integral part of this message.


When you communicate with us via e-mail, telephone, fax or via our
website,
we process your personal data. For more information on how we process
your
personal data, please consult our Privacy Policy
<https://www.tvh.com/privacy-policy>. By communicating with us, you
unambiguously consent to our use of your personal data as explained in
the
Privacy Policy.



--
WBR
Maxim aka solomax



--
WBR
Maxim aka solomax



--
WBR
Maxim aka solomax




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



Client browser timezone offset

2019-10-28 Thread Calin Pavel
I'm trying to detect what is the current timezone offset for a client
browser accessing my Wicket application.
I found out that BrowserInfoForm.ClientPropertiesBean contains details
about:
- utcOffset
- utcDstOffset
but these are calculated at 1.Jan and 1.June.

Is there any way to determine on server side what is the CURRENT timezone
offset of the client?
I've tried to use ClientPropertiesBean.timeZone, but that is relative /
guest and not real client timezone.


-- 

Kind Regards,


*CALIN PAVELSoftware Engineer - consultant*
calin.pa...@tvh.com

*TVH PARTS HOLDING NV*
Vichtseweg 129 • BE-8790 WAREGEM
T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com



-- 


 DISCLAIMER 
 

This 
message is delivered to all addressees subject to the conditions set forth 
in the attached disclaimer, which is an integral part of this message.


When you communicate with us via e-mail, telephone, fax or via our website, 
we process your personal data. For more information on how we process your 
personal data, please consult our Privacy Policy 
. By communicating with us, you 
unambiguously consent to our use of your personal data as explained in the 
Privacy Policy.


Client browser timezone offset

2019-10-28 Thread Calin Pavel
I'm trying to detect what is the current timezone offset for a client
browser accessing my Wicket application.
I found out that BrowserInfoForm.ClientPropertiesBean contains details
about:
- utcOffset
- utcDstOffset
but these are calculated at 1.Jan and 1.June.

Is there any way to determine on server side what is the CURRENT timezone
offset of the client?
I've tried to use ClientPropertiesBean.timeZone, but that is relative /
guest and not real client timezone.


-- 

Kind Regards,


*CALIN PAVELSoftware Engineer - consultant*
calin.pa...@tvh.com

*TVH PARTS HOLDING NV*
Vichtseweg 129 • BE-8790 WAREGEM
T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com



-- 


 DISCLAIMER 
 

This 
message is delivered to all addressees subject to the conditions set forth 
in the attached disclaimer, which is an integral part of this message.


When you communicate with us via e-mail, telephone, fax or via our website, 
we process your personal data. For more information on how we process your 
personal data, please consult our Privacy Policy 
. By communicating with us, you 
unambiguously consent to our use of your personal data as explained in the 
Privacy Policy.


Integrate Wicket with Keycloak

2019-04-10 Thread Calin Pavel

Hi everybody,

Did anybody integrated Wicket with Keycloak?
Do you have any sample how this could be done - to restrict access to 
pages, to authenticate user 



Thank you,
Calin Pavel

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



Re: Skip URL escape on redirect

2019-03-06 Thread Calin Pavel

Hi Martin,

It works fine if using this status code. Thank you for your help.

Calin Pavel

On 3/6/2019 5:47 PM, Martin Grigorov wrote:

Hi,

Use RedirectToUrlException(yourUrl, HttpServletResponse.SC_SEE_OTHER)

See https://markmail.org/message/bis57nb2yecdgzqx for more details. It has
been discussed last week.

On Wed, Mar 6, 2019 at 5:02 PM Calin Pavel  wrote:


Hello,

I'm doing a redirect from Wicket code like*   throw new
RedirectToUrlException("
http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2");
*and this should redirect user to this page which is accessible if
signature is valid (checks if URL did not changed).

But, when doing the redirect Wicket escapes the brackets - so browser
received in header
location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *,
but the server does not accepts the request because signature does not
match this URL.

For this:
1. is there any other way to do the redirect without escaping URL?

2. is it a browser problem - it should unescape URL before doing
redirect? have some doubts, since all (Chrome, IE, Firefox) works the same
3. would it be the responsibility of the targeted server to decode /
unescape URL and then check for the signature?

Thank you,
Calin Pavel
*
*




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



Skip URL escape on redirect

2019-03-06 Thread Calin Pavel

Hello,

I'm doing a redirect from Wicket code like*   throw new 
RedirectToUrlException("http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2"); 
*and this should redirect user to this page which is accessible if 
signature is valid (checks if URL did not changed).


But, when doing the redirect Wicket escapes the brackets - so browser 
received in header 
location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *, 
but the server does not accepts the request because signature does not 
match this URL.


For this:
1. is there any other way to do the redirect without escaping URL?

2. is it a browser problem - it should unescape URL before doing 
redirect? have some doubts, since all (Chrome, IE, Firefox) works the same
3. would it be the responsibility of the targeted server to decode / 
unescape URL and then check for the signature?


Thank you,
Calin Pavel
*
*


Full HTML markup for a panel

2017-11-15 Thread Calin Pavel
Hi everybody,

Can you tell me please if there is any way to determine the FULL markup or
generated HTML for a panel.
I'm interested in the markup of the panel which also includes markups for
ALL it's inclusions / children.

May be there is a way to enable some logging or putting a breakpoint
somewhere...

Thank you,
Calin Pavel


Autocomplete select options

2017-01-10 Thread Calin Pavel

Hi everybody,

Does anybody know if it is possible in Wicket to select Autocomplete 
options by moving with arrows keys up / down without pressing ENTER?
I want to have highlighted option automatically placed in the 
autocomplete input.


Thank you,
Calin Pavel

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