Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3948

Exception when you use Form Binding with <timebox> and java.sql.Timestamp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • 8.0.2
    • 8.0.5, 8.5.0, 8.5.1.2
    • Databind, General
      • Java 1.8
      • ZK 8.5.1.2 EE
      • Hibernate 4.2.1
      • Spring 3.2.8.RELEASE

      Migrating from ZK6.5.8.1 to a newer ZK version we are detecting a lot of bugs,
      related with the form binding.

      Exception:

      Jun 07, 2018 11:06:57 AM org.zkoss.bind.impl.ParamCall call
      SEVERE: 
      org.zkoss.zk.ui.UiException: Cannot create a proxy object:[class java.sql.Time], an empty constructor is needed.
      	at sun.reflect.GeneratedConstructorAccessor2909.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.zkoss.lang.Classes.newInstance(Classes.java:76)
      	at org.zkoss.lang.Exceptions.wrap(Exceptions.java:205)
      	at org.zkoss.zk.ui.UiException$Aide.wrap(UiException.java:70)
      	at org.zkoss.bind.proxy.ProxyHelper.createProxyIfAny(ProxyHelper.java:135)
      	at org.zkoss.bind.proxy.BeanProxyHandler.invoke(BeanProxyHandler.java:196)
      	at org.zkoss.bind.proxy.FormProxyHandler.invoke(FormProxyHandler.java:159)
      	at com.dc.dpss.db.hibernate.WorkAssignmentLog_$$_jvstb1d_17b.getStartTime(WorkAssignmentLog_$$_jvstb1d_17b.java)
      	at sun.reflect.GeneratedMethodAccessor2060.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:103)
      	at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
      	at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
      	at org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:99)
      	at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:121)
      	at org.zkoss.zel.impl.parser.AstValue.getValue(AstValue.java:188)
      	at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
      	at org.zkoss.zkmax.bind.impl.ValueExpressionImplEx.getValue(ValueExpressionImplEx.java:52)
      	at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41)
      	at org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx$LazyBindXelExpression.evaluate(BindEvaluatorXImplEx.java:124)
      	at org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx.parseExpressionX(BindEvaluatorXImplEx.java:210)
      	at org.zkoss.bind.impl.AccessInfo.create(AccessInfo.java:76)
      	at org.zkoss.bind.impl.PropertyBindingImpl.<init>(PropertyBindingImpl.java:67)
      	at org.zkoss.bind.impl.SavePropertyBindingImpl.<init>(SavePropertyBindingImpl.java:56)
      	at org.zkoss.bind.impl.BinderImpl.newSavePropertyBinding(BinderImpl.java:1051)
      	at org.zkoss.bind.impl.BinderImpl.addPropertySaveBindings0(BinderImpl.java:1254)
      	at org.zkoss.bind.impl.BinderImpl.addPropertySaveBindings(BinderImpl.java:920)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processPropertyPromptBindings(AnnotateBinderHelper.java:390)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processPropertyBindings(AnnotateBinderHelper.java:261)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processComponentBindings0(AnnotateBinderHelper.java:132)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processAllComponentsBindings(AnnotateBinderHelper.java:87)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processAllComponentsBindings(AnnotateBinderHelper.java:93)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processAllComponentsBindings(AnnotateBinderHelper.java:93)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processAllComponentsBindings(AnnotateBinderHelper.java:93)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.processAllComponentsBindings(AnnotateBinderHelper.java:93)
      	at org.zkoss.bind.impl.AnnotateBinderHelper.initComponentBindings(AnnotateBinderHelper.java:73)
      	at org.zkoss.bind.AnnotateBinder.initAnnotatedBindings(AnnotateBinder.java:74)
      	at org.zkoss.zkmax.bind.impl.AnnotateBinderEx.initAnnotatedBindings(AnnotateBinderEx.java:42)
      	at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:228)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:617)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:942)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:889)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:776)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:836)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:794)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:740)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.createComponents(UiEngineImpl.java:1143)
      	at org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:346)
      	at org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:307)
      	at org.zkoss.zk.ui.Executions.createComponents(Executions.java:176)
      	at com.dc.dpss.ui.jms.events2.WorkAssignmentDetailVM.edit(WorkAssignmentDetailVM.java:166)
      	at sun.reflect.GeneratedMethodAccessor2027.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.zkoss.bind.impl.ParamCall.call(ParamCall.java:149)
      	at org.zkoss.bind.impl.BinderImpl.handleNotifyChange(BinderImpl.java:1863)
      	at org.zkoss.bind.impl.BinderImpl.doExecute(BinderImpl.java:2031)
      	at org.zkoss.bind.impl.BinderImpl.doCommand(BinderImpl.java:1758)
      	at org.zkoss.bind.impl.BinderImpl.access$1300(BinderImpl.java:132)
      	at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1605)
      	at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1558)
      	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3168)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3138)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3080)
      	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1846)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1618)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1321)
      	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611)
      	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:487)
      	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:495)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
      	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      	at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:110)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.InstantiationException: org.javassist.tmp.java.sql.Time_$$_jvstb1d_17c
      	at java.lang.Class.newInstance(Class.java:427)
      	at org.zkoss.bind.proxy.ProxyHelper.createProxyIfAny(ProxyHelper.java:133)
      	... 131 more
      Caused by: java.lang.NoSuchMethodException: org.javassist.tmp.java.sql.Time_$$_jvstb1d_17c.<init>()
      	at java.lang.Class.getConstructor0(Class.java:3082)
      	at java.lang.Class.newInstance(Class.java:412)
      	... 132 more
      
      

      Zul code

      <div form="@id('fx') @load(vm.workAssignmentLog) @save(vm.workAssignmentLog, before='save')">
          <timebox 
      	  id="startTime"
      	  value="@bind(fx.startTime)"
      	  width="150px" 
      	  onChange="@command('checkDate')" 
      	  format="HH:mm"
      	  constraint="no empty" 
      	  onClick="@command('beginTime')" />
      </div>
      

      Hibernate Domain Model

      	@Temporal(TemporalType.TIME)
      	@Column(name = "start_time", nullable = false, length = 8)
      	public Date getStartTime() {
      		return this.startTime;
      	}
      
      	public void setStartTime(Date startTime) {
      		this.startTime = startTime;
      	}
      

      Also, see ZK-3944

      All this code worked correctly before with ZK6.5.8.1 EE

      Thanks.

            Unassigned Unassigned
            sarco sarco
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: