- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有以下邪恶表格(列表)。表单的要点是输入评论消息并在提交时将其保存到数据库。
List<List<String>> modalHTML = new ArrayList<>();
List<Integer> modalIDlist = new ArrayList<>();
List<Integer> modalCounter = new ArrayList<>();
//...
final ListView listview = new ListView("modalListview", modalCounter) {
@Override
protected void populateItem(ListItem item) {
Integer index = (Integer)item.getModelObject();
final Label labelDiv = new Label("modalHTML1", modalHTML.get(index).get(0));
labelDiv.setEscapeModelStrings(false);
final Label labelDiv2 = new Label("modalHTML2", modalHTML.get(index).get(1));
labelDiv2.setEscapeModelStrings(false);
item.add(labelDiv);
item.add(labelDiv2);
//Create Form
final TextArea<String> textAreaComment = new TextArea<>("textAreaComment", Model.of(""));
final TextField<String> ffFileNameComment = new TextField<>("TfFileNameComment", Model.of(""));
final TextField<String> tfFileAdressComment = new TextField<>("TfFileAdressComment", Model.of(""));
if(isUser) {
tfFileNameComment.add(new AttributeModifier("style", "display: none;"));
TfFileAdressComment.add(new AttributeModifier("style", "display: none;"));
}
final HiddenField<String> hiddenIDfield = new HiddenField<>("hiddenIDfield", Model.of(modalIDlist.get(index)+""));
final Form<?> commentForm = new Form<Void>("commentForm") {
@Override
protected void onSubmit() {
String text = (String)textAreaComment.getModelObject();
String id = (String)hiddenIDfield.getModelObject();
System.out.println("Comment eingegeben: "+text+ " - id: "+id);
//write comment
try {
app.getUserDb().addComment(Integer.parseInt(id), user_name, text);
} catch (Exception e) {
System.out.println("Error form submit");
}
};
};
commentForm.add(textAreaComment);
commentForm.add(hiddenIDfield);
commentForm.add(tfFileNameComment);
commentForm.add(tfFileAdressComment);
item.add(commentForm);
}
};
add(listview);
行:
app.getUserDb().addComment(Integer.parseInt(id), user_name, text);
导致了这个问题。加载页面时,控制台中将出现 NotSerializedException 错误(页面仍在加载中)。当我删除此行时,不会发生错误。
18:53:09.051 [http-nio-8080-exec-5] WARN org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream - error delegating to writeObject : ."classpasth".WorkflowJDBC, path: /children
18:53:09.054 [http-nio-8080-exec-5] ERROR org.apache.wicket.serialize.java.JavaSerializer - Error serializing object class ."classpasth".BSWModuleOverview [object=[Page class = ."classpasth".BSWModuleOverview, id = 2, render count = 1]]
org.apache.wicket.WicketRuntimeException: A problem occurred while trying to collect debug information about not serializable object
at org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:282) ~[wicket-core-7.1.0.jar:7.1.0]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:78) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.pageStore.AbstractPageStore.serializePage(AbstractPageStore.java:133) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.pageStore.DefaultPageStore.createSerializedPage(DefaultPageStore.java:281) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:61) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:403) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:193) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:76) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:74) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:270) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.Application$3.onDetach(Application.java:1786) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:120) [wicket-util-7.1.0.jar:7.1.0]
at org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144) [wicket-util-7.1.0.jar:7.1.0]
at org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:113) [wicket-util-7.1.0.jar:7.1.0]
at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:645) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:594) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:297) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) [wicket-core-7.1.0.jar:7.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.7]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.7]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) [spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.7]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.7]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:9.0.7]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.7]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494) [catalina.jar:9.0.7]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) [catalina.jar:9.0.7]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.7]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651) [catalina.jar:9.0.7]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:9.0.7]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.7]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:407) [tomcat-coyote.jar:9.0.7]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.7]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754) [tomcat-coyote.jar:9.0.7]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376) [tomcat-coyote.jar:9.0.7]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_171]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.7]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Caused by: java.io.NotSerializableException: ."classpasth".WorkflowJDBC
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at java.util.ArrayList.writeObject(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at java.util.LinkedHashMap.internalWriteEntries(Unknown Source) ~[?:1.8.0_171]
at java.util.HashMap.writeObject(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at java.util.ArrayList.writeObject(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream.writeObjectOverride(CheckingObjectOutputStream.java:675) ~[wicket-core-7.1.0.jar:7.1.0]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:271) ~[wicket-core-7.1.0.jar:7.1.0]
... 79 more
Caused by: java.io.NotSerializableException: ."classpasth".WorkflowJDBC
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at java.util.ArrayList.writeObject(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at java.util.LinkedHashMap.internalWriteEntries(Unknown Source) ~[?:1.8.0_171]
at java.util.HashMap.writeObject(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at java.util.ArrayList.writeObject(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[?:1.8.0_171]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[?:1.8.0_171]
at org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:260) ~[wicket-core-7.1.0.jar:7.1.0]
... 79 more
18:53:09.065 [http-nio-8080-exec-5] WARN org.apache.wicket.pageStore.AbstractPageStore - Page [Page class = ."classpasth".BSWModuleOverview, id = 2, render count = 1] cannot be serialized. See previous logs for possible reasons.
18:53:09.065 [http-nio-8080-exec-5] WARN org.apache.wicket.pageStore.DefaultPageStore - Page [Page class = ."classpasth".BSWModuleOverview, id = 2, render count = 1] cannot be serialized. See previous logs for possible reasons.
谁能帮我找出我做错了什么?
最佳答案
在开发模式下,Wicket 会打印非常详细的 NotSerializedException
错误消息。它打印一个树状结构,指向不可序列化的确切成员字段。
如果您向我们提供了真实的类名和完整的错误消息,那么我们将能够告诉您到底是什么问题!
关于Java Wicket 表单 : Error serializing object class 'myClassName' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51159562/
过去,我为我的表单构建了如下标签: : 我还需要使用wicket:label吗?标签?我没有使用 wicket:label在 wicket 7 中,它似乎工作正常。我可能不理解使用 wicket:la
是否可以为 MarkupContainer 生成标记?动态地,即不为其存储 HTML 文件? 我考虑将标记作为纯字符串从数据库中读取,以提供类似 CMS 的功能。 最佳答案 有趣的问题,我不确定这是否
是否有适用于 Wicket 1.5 的有效、支持和维护的脚手架解决方案?我知道 Wicketopia 位于两个不同地点 sourceforge和 github但这仍然针对 wicket 1.4,带来了
我想了解一些关于 wicket 支持泛型模型的信息。我了解了模型、 Prop 模型和 Prop 复合模型。 但是 Model 类呢?如果我这样做会发生什么: Label label = new Lab
如何在 Wicket 中实现多选下拉。我能够使用 bootstrap 创建多选下拉 View ,但我无法获得如何将所选选项与下拉组件的 IModel 相关联? Wicket 有没有可能?我不想使用 L
我正在使用 wicket 1.4.9 并实现了 spring + wicket auth-role 并根据页面上的角色使用@AuthorizeInstantiation。我有多个自定义角色。 我已经按
如何在 Wicket 1.5 中执行以下操作? page.getRequestCycle().setRequestTarget(new RedirectRequestTarget("http://ww
我想用密码保护 Wicket 中的网页,以便用户只有在他/她登录后才能访问它。 我还希望该页面显示登录页面,然后在登录用户试图访问的原始页面后。 这是如何用 wicket 完成的?我已经创建了一个登录
我使用的是 wicket 1.5,但在 getClientInfo() 方法中看不到 (WebRequest)RequestCycle.get().getRequest() 我在另一个地方看到了这段代
我刚刚尝试了 Apache Wicket“Hello, world”应用程序,我注意到在呈现的 HTML 输出中,Wicket 暴露了它的内部属性。 这是呈现的 HTML 在浏览器的“查看源代码”中的
我找不到像 wicket:include 之类的 wicket 标签?谁能建议我什么?我想在 html 文件中包含/注入(inject)原始源代码?如果没有这样的实用程序,有什么建议来开发它吗? 更新
在页面中查找特定(已知 wicket id)Wicket 组件的方法是什么? 最佳答案 您的选择是: get()搜索一个组件的方法 特定路径上的组件。 安 iterator()在拥有他所有 child
我正在为 wicket 页面编写测试。我的页面上有三个下拉菜单。根据从下拉列表中选择的值,面板会被渲染(面板包含一个数据表)。 如何更改 wicket 测试中下拉菜单的值,以便我可以针对所选值的不同组
在我的 wicket 应用程序中,有一些页面供用户使用,具体取决于他们的角色和不同的标准。在我的数据库中,我存储了用作该用户背景的图像路径。每个用户都有一个独特的页面。我知道我可以添加读取图像,如果我
如何在 Wicket 中定义我自己的反馈消息? 例如:如果我提供了一个错误的用户名,我想得到一个错误信息,如“用户名不正确,请尝试再次登录”。而不是使用默认的错误消息。 一个例子会是什么样的? 最佳答
假设我想要 3 个不同的 *.html 用于 WebPage。 F.e. page_small.html、page_tablet.html、page_desktop.html。我如何解析 screen
我无法确定 Wicket 应用程序中 RuntimeException 的原因。我设置了许多断点,但是当我提交表单时,只有在加载表单时,没有一个断点被触发。这是堆栈: WicketMessage: N
我刚刚编写了我的第一个 Wicket 组件 :) 它包含一个 ListView 和一些 Radio 输入字段。现在我想对所选值是否进入模型进行单元测试。 由于 WicketTester.newForm
我的类属性有两个 CSS 类值。 HTML 开头是这样的: 我想动态地把它改成这样: 目前我正在这样做: component.add(new SimpleAttributeModifier("cl
我有一个使用 PropertyModel 的文本字段,如下所示: TextField ageField = new TextField("age", new
我是一名优秀的程序员,十分优秀!