Re: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

2012-12-19 Thread JamesXWang
Hi Guys,

It's my fault. It isn't a bug of wicket. After another 2 hours debugging I
finally found the root cause in the code of my app. There is a private
static class XXX{} in a very deep hierachy of one of my util class. And that
private class XXX hasn't implements the Serializable.

But if Wicket can throw a more friendly serializing exception like (the
class xxx or field fff can't be serialized) will be great helpul - given
that, this kind of missing serializing private class issue will be fixed in
few minutes instead of two days.

Thanks,
James




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654915.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: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

2012-12-18 Thread JamesXWang
Hi Martin,

I've tried the wicket 6.3 quickstart but can't reproduce it. But after more
deep debug I've found the root cause on my app - 

1. On my html there is a Sortable list.

2. I've implemented some code to extends
org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider

3. then on the method - 
@Override
protected void populateItem(final Item item) {..}

I've added item.add() to get list data

4. if I set a WebMarkupContainer wmc.setVisible(false); and call
item.add(wmc) then will cause the serializable exception.

Does it a bug of Wicket or do I need call some api after setVisible(false)?

Thanks!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654880.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: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

2012-12-18 Thread JamesXWang
ok, thanks. I will upgrade it right now and let you know the result soon.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654874.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: Error serializing object class com.mapp.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

2012-12-18 Thread JamesXWang
I am using Wicket6.1 and logback. The logback keep writing this serializing
error to its DB. Do you know why this exception happenned? I've double
checked my wicket pages relevant code but found nothing about this
exception. Seems everything should be able to be serialized.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-myapp-LoginPage-object-Page-class-com-myapp-LoginPage-id-0-render-tp4654853p4654872.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



Error serializing object class com.ibooklog.web.login.LoginPage [object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]

2012-12-17 Thread JamesXWang
Hi All,

There are many exception logs happenned in my wicket 6.1 application. It
said that "Error serializing object class com.ibooklog.web.login.LoginPage
[object=[Page class = com.myapp.LoginPage, id = 0, render count = 1]]"

I've tried several solutions but can't not fix it. Anyone has idea how to
fix this kind of issue?

public class LoginPage extends WebPage {

private static final long serialVersionUID = -906466003858668L;
final static Logger logger = LoggerFactory.getLogger(LoginPage.class);
@SpringBean(name = "loginService")
protected ILoginService loginSvc;
LoginForm loginForm = new LoginForm("loginForm");
SignupForm signupForm = new SignupForm("signupForm");
final FeedbackPanel signupFeedback = new
FeedbackPanel("signupFeedback");
final FeedbackPanel loginFeedback = new FeedbackPanel("loginFeedback");

public LoginPage() {
...


public interface ILoginService extends IService, Serializable{
...

@Component("loginService")
@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
public class LoginService extends AbstractBaseService implements
ILoginService {
...

Thanks in advanced.

BR,
James
12/17/2012



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-serializing-object-class-com-ibooklog-web-login-LoginPage-object-Page-class-com-myapp-LoginPag-tp4654853.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



a weird exception when update Panel

2012-12-03 Thread JamesXWang
Hi Folks,

On one of my v6.1 wick page there is a set of tabs and a main panel. When
user click on a new tab it will trigger an ajax behavior and create a
different panel to update the main panel. Sometimes I've seen below
exception if I click the tab quickly once the page is loaded. But it didn't
happen everytime. Even it happened I refresh the page and wait for few
second, then click the tabs again the page will work well without any
exception.

On the main panel java I've tried to override the getStatelessHint() to
return false but it help nothing of this weird exception. 

Any one have the idea how to fix it? Many thanks in advance!

Exception detail below - 

Unexpected RuntimeException

Last cause: Cannot find behavior with id '1' on component
'com.myapp.web.common.LogsPanel:includeMainPanel:includeMain' in page '[Page
class = com.myapp.web.home.HomePage, id = 6, render count = 1]'. Perhaps the
behavior did not properly implement getStatelessHint() and returned 'true'
to indicate that it is stateless instead of returning 'false' to indicate
that it is stateful.

Stacktrace

Root cause:

org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior
with id '1' on component
'com.myapp.web.common.LogsPanel:includeMainPanel:includeMain' in page '[Page
class = com.myapp.web.home.HomePage, id = 6, render count = 1]'. Perhaps the
behavior did not properly implement getStatelessHint() and returned 'true'
to indicate that it is stateless instead of returning 'false' to indicate
that it is stateful.
at org.apache.wicket.Behaviors.getBehaviorById(Behaviors.java:303)
at org.apache.wicket.Component.getBehaviorById(Component.java:4479)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:246)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/a-weird-exception-when-update-Panel-tp4654448.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



the Wicket.Ajax.get + AbstractDefaultAjaxBehavior can't work on v6.1.0. I worked well in v1.5.6 at before.

2012-10-09 Thread JamesXWang
Hi Folks,

Here are the app code based on Wicket 1.5.6 -
1. MyPage.java

@Override
public void renderHead(HtmlHeaderContainer container) {
super.renderHead(container);
String fliedBookListenerUrl = "var fliedBookListenerUrl='" +
fliedBookListener.getCallbackUrl() + "';";
   
container.getHeaderResponse().render(JavaScriptHeaderItem.forScript(fliedBookListenerUrl,
"wicket-ajax-fliedBookListenerUrl"));
...}

2. mypage.js

function callWicket() {
var wcall = wicketAjaxGet(fliedBookListenerUrl, function() { 
//logic here.
}.bind(this), function() { }.bind(this));
}

3. MyPage.java
fliedBookListener = new AbstractDefaultAjaxBehavior() {
@Override
protected void respond(final AjaxRequestTarget target) {
   ...//logic here
   }
}

They work well at before. But after I upgrade to Wicket 6.1.0 yesterday they
broken. 
I've added below code to MyWicketApplication.init(),
getResourceSettings().setThrowExceptionOnMissingResource(false);
getRequestCycleSettings().addResponseFilter(new
AjaxServerAndClientTimeFilter());
getDebugSettings().setAjaxDebugModeEnabled(true);

I've also changed wicketAjaxGet to Wicket.Ajax.get.

When I debug I found that the Wicket.Ajax.get() was called but it can't get
into the AbstractDefaultAjaxBehavior.respond().

Anyone know the root cause and the solution or alternative api?

Many thanks in advanced.

- JamesWang



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/the-Wicket-Ajax-get-AbstractDefaultAjaxBehavior-can-t-work-on-v6-1-0-I-worked-well-in-v1-5-6-at-befo-tp4652813.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