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