NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Visual JSF conversion exception

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jkost



Joined: 09 Nov 2008
Posts: 20

PostPosted: Sun Nov 09, 2008 10:35 pm    Post subject: Visual JSF conversion exception Reply with quote

Hi,

I 'm developing a JSF web app using Netbean's 6.1 visual jsf library.

I bind a combo box and some textfields to fields of a database table (mysql db) using DataProvider and rowSet object. The table contains a few timestamp fields which I don't map to my web page. However, this seems to affect the DataProvider because I get the following exception and the text fields and combo box do not appear on the web page.

Any ideas?

Thanks in advance for your prompt replies.

J.

Code:

9 Νοε 2008 11:29:48 μμ com.sun.faces.lifecycle.LifecycleImpl phase
WARNING: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1b8737f) threw exception
com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 6 to TIMESTAMP.
        at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
        at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 6 to TIMESTAMP.
        at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:416)
        at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:373)
        at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:713)
        at com.sun.webui.jsf.faces.DataProviderELResolver$SelectItemsData.getSelectItems(DataProviderELResolver.java:702)
        at com.sun.webui.jsf.faces.DataProviderELResolver.getValue(DataProviderELResolver.java:166)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:118)
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
        at com.sun.webui.jsf.component.Selector.getItems(Selector.java:577)
        at com.sun.webui.jsf.component.ListSelector.getOptions(ListSelector.java:212)
        at com.sun.webui.jsf.component.ListSelector.getListItems(ListSelector.java:140)
        at com.sun.webui.jsf.renderkit.widget.ListRendererBase.getListProperties(ListRendererBase.java:269)
        at com.sun.webui.jsf.renderkit.widget.ListRendererBase.getProperties(ListRendererBase.java:220)
        at com.sun.webui.jsf.renderkit.widget.DropDownRenderer.getProperties(DropDownRenderer.java:74)
        at com.sun.webui.jsf.renderkit.widget.RendererBase.encodeChildren(RendererBase.java:134)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
        at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
        at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
        at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
        ... 20 more
Caused by: java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 6 to TIMESTAMP.
        at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1298)
        at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:572)
        at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6610)
        at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5928)
        at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4883)
        at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getObject(DelegatingResultSet.java:287)
        at com.sun.sql.rowset.CachedRowSetXImpl5.populate(CachedRowSetXImpl5.java:696)
        at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:228)
        at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:865)
        at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:1325)
        at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1351)
        at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:402)
        ... 46 more
9 Νοε 2008 11:29:48 μμ com.sun.faces.lifecycle.LifecycleImpl phase
WARNING: phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1b8737f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 6 to TIMESTAMP. java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 6 to TIMESTAMP.
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:470)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)
Back to top
itreppert



Joined: 23 Dec 2008
Posts: 45

PostPosted: Tue Dec 23, 2008 4:45 pm    Post subject: Did you find a solution Reply with quote

Hi,

I have the same problem.
Did you find it out ?

Regards
Holger
Back to top
flotho



Joined: 24 Aug 2009
Posts: 8

PostPosted: Mon Sep 28, 2009 10:44 pm    Post subject: Reply with quote

Hy folks,

I know it's late ut I think it's a date problem with SQL.
You have to cast with java.sql.date and use gettime().

For me it's working well
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo