Velocity Engine - Error Calling Server

I have a couple of projects that have extensive reports so decided to use the Velocity Engine to facilitate this. The smart client works brilliantly, however the web client, which is essential for iPads fails with a flashing error “Error calling server” this is local on my development machine.

The question is where do I start to look for what the error is and has anyone else experienced errors of this sort with the velocity plugin

Servoy Code used:

/**
 * @properties={typeid:24,uuid:"BB4D25AD-B62A-4CA2-B908-0D9FB6C90DA6"}
 */
function gmContext() {
	var context = new Object();	
	context.report = 'Click Digital'
	context.content = 'Sample Content'		
	return context;
}


/**
 * @properties={typeid:24,uuid:"1B9F3545-1A29-45A9-9B46-BB1EC41CC864"}
 */
function test() {
	htmlArea = plugins.VelocityReport.renderTemplate("igzample.html", gmContext());	
}

Error Log:

ava.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp 
    	at com.mysql.jdbc.ResultSet.getNativeTimestamp(ResultSet.java:3848) 
    	at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:5488) 
    	at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5146) 
    	at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250) 
    	at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250) 
    	at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250) 
    	at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250) 
    	at com.servoy.j2db.dataprocessing.Zv.createBufferedDataSet(Zv.java:554) 
    	at com.servoy.j2db.dataprocessing.Zv.Za(Zv.java:989) 
    	at com.servoy.j2db.dataprocessing.Zv.Za(Zv.java:1001) 
    	at com.servoy.j2db.dataprocessing.Zv.Za(Zv.java:57) 
    	at com.servoy.j2db.dataprocessing.Zv.performQuery(Zv.java:1250) 
    	at com.servoy.j2db.debug.ProfileDataServer.performQuery(ProfileDataServer.java:284) 
    	at com.servoy.j2db.dataprocessing.RowManager.getRows(RowManager.java:494) 
    	at com.servoy.j2db.dataprocessing.FoundSet.createRecord(FoundSet.java:3101) 
    	at com.servoy.j2db.dataprocessing.FoundSet.getRecord(FoundSet.java:2290) 
    	at com.servoy.j2db.dataprocessing.FoundSet.getRecord(FoundSet.java:2261) 
    	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.getRecordAndTestSize(AlwaysRowSelectedSelectionModel.java:333) 
    	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:168) 
    	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:148) 
    	at com.servoy.j2db.dataprocessing.SwingFoundSet.setSelectedIndex(SwingFoundSet.java:134) 
    	at com.servoy.j2db.dataprocessing.TableAndListEventDelegate$1.run(TableAndListEventDelegate.java:153) 
    	at com.servoy.j2db.dataprocessing.TableAndListEventDelegate.fireTableAndListEvent(TableAndListEventDelegate.java:180) 
    	at com.servoy.j2db.dataprocessing.SwingFoundSet.fireFoundSetEvent(SwingFoundSet.java:149) 
    	at com.servoy.j2db.dataprocessing.FoundSet.fireDifference(FoundSet.java:4629) 
    	at com.servoy.j2db.dataprocessing.FoundSet.refreshFromDBInternal(FoundSet.java:530) 
    	at com.servoy.j2db.dataprocessing.FoundSet.browseAll(FoundSet.java:315) 
    	at com.servoy.j2db.dataprocessing.FoundSet.loadAllRecords(FoundSet.java:281) 
    	at com.servoy.j2db.FormController.loadAllRecordsImpl(FormController.java:2889) 
    	at com.servoy.j2db.FormController$3.run(FormController.java:3823) 
    	at com.servoy.j2db.server.headlessclient.WebClient$1.run(WebClient.java:531) 
    	at com.servoy.j2db.server.headlessclient.WebClient.executeEvents(WebClient.java:552) 
    	at com.servoy.j2db.server.headlessclient.WebClient$1.run(WebClient.java:543) 
    	at com.servoy.j2db.server.headlessclient.WebClient.executeEvents(WebClient.java:552) 
    	at com.servoy.j2db.server.headlessclient.WebClientsApplication$7.respond(WebClientsApplication.java:458) 
    	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1287) 
    	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358) 
    	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465) 
    	at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) 
    	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) 
    	at com.servoy.j2db.server.servlets.Zt.doGet(Zt.java:11) 
    	at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
    	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:127) 
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) 
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) 
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) 
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) 
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
    	at java.lang.Thread.run(Thread.java:680)

HTML Used

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>TEST</title>
	$baseHREF
	<style type="text/css" media="print">
	div.header { display: none }
	div.header { display: block; position: running(header); }

	@page {
		size: legal portrait;
		@bottom-right { content: "Page " counter(page) " of " counter(pages);
			font-family: Helvetica, Arial, Sans-Serif; font-size: 10pt; }
		@bottom-left { content: "Generated with the VelocityReport Plugin $!plugin.version for Servoy";
			font-family:helvetica, arial, sans-serif; font-size: 10pt; }
		margin: 1.2in .4in .4in .4in;
	    @top-left { content: element(header); }
	}
	table {
		-fs-table-paginate: paginate;
	}
	td.RecordObject {
	    text-align:center;
		margin-top:0 auto;
	    page-break-inside: avoid;
	}
	</style>
	<link rel="stylesheet" type="text/css" media="all" href="css/styles.css"/>
</head>

<body width="100%">

<div class="header">
  <h1>$report</h1>

  <table width="100%" border="0" align="left">
    <tr>
      <td>Date</td>
      <td>Debtor</td>
      <td>Detail</td>
      <td>Trading Receipts</td>
      <td>Book Debt</td>
    </tr>
    <tr>
      <td>$content</td>
      <td>$content</td>
      <td>$content</td>
      <td>$content</td>
      <td>$content</td>
    </tr>
  </table>
  <p> </p>
  <p> </p>
</div>
</body>
</html>

That error has anything to do with VelocityReport.
It is a standard error with MySQL when when of your column is filled with an invalid time stamp or date.
I’ve seen it a few times, and each time it was because there was a default date/datetime/timestamp value wrongly set in MySQL, so check that.

Apart from that, in VelocityReport, did you set the velocityreport.serverURL server plugin properties?

Hope this helps,

ptalbot:
That error has anything to do with VelocityReport.
It is a standard error with MySQL when when of your column is filled with an invalid time stamp or date.
I’ve seen it a few times, and each time it was because there was a default date/datetime/timestamp value wrongly set in MySQL, so check that.

Apart from that, in VelocityReport, did you set the velocityreport.serverURL server plugin properties?

Hope this helps,

Thats exactly what I thought was the problem and stripped out all the dates etc I will go and have another look at that…

Also I set the URL in the admin and will have another look at this too

Will contact you direct re charts - I need to get the chart creator app you have developed

Many thanks Patrick

Gordon