XdevCalendarTemplate: VT <-> MySQL DB probleme

Description

Initial behaviour:
--------------------------------------------------------------
I place an XdevCalendarTemplate on my window.
Over the context I choose "Create needed VTs".
Now I have the two needed VTs in my project. Because there is no export funtion I have to create the representing tables by hand. I made two SQL-Scripts (they are also attached) which should do the excat mapping:

MySQL_CalendarActivity.sql

DROP TABLE IF EXISTS CalendarActivity;

CREATE TABLE CalendarActivity
(
id INT UNSIGNED NULL DEFAULT NULL AUTO_INCREMENT,
start TIMESTAMP NULL DEFAULT NULL,
end TIMESTAMP NULL DEFAULT NULL,
summary VARCHAR(80) NULL,
description VARCHAR(2000) NULL,
location VARCHAR(80) NULL,
category_id INT UNSIGNED NULL DEFAULT NULL,
recur_frequency INT UNSIGNED NULL DEFAULT NULL,
recur_interval INT UNSIGNED NULL DEFAULT NULL,
color VARCHAR(20) NULL,
wholeday TINYINT(1) NULL DEFAULT 0,
editable TINYINT(1) NULL DEFAULT 1,
PRIMARY KEY (id)
)
ENGINE=InnoDB
CHARSET utf8
COLLATE utf8_bin;

MySQL_CalendarCategory.sql

DROP TABLE IF EXISTS CalendarCategory;

CREATE TABLE CalendarCategory
(
id INT UNSIGNED NULL DEFAULT NULL AUTO_INCREMENT,
name VARCHAR(80) NULL,
parent INT UNSIGNED NULL DEFAULT NULL,
color VARCHAR(20) NULL,
PRIMARY KEY (id)
)
ENGINE=InnoDB
CHARSET utf8
COLLATE utf8_bin;

The checkbox "load on startup" is checked.

Then I launch the application.
--------------------------------------------------------------

Real behaviour:
--------------------------------------------------------------
The following exception appears:

Jun 28, 2013 9:42:32 AM xdev.util.logging.XdevLoggerImpl error
SEVERE:
xdev.ui.calendar.CalendarPersistenceException: Error while reading activities from virtual table.
at xdev.ui.calendar.VirtualTableCalendarPersistence.<init>(SourceFile:610)
at Fenster.pnb.<init>(pnb.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:374)
at java.lang.Class.newInstance(Class.java:327)
at xdev.Application.startApplicationImpl(Application.java:542)
at xdev.Application.startApplication(Application.java:504)
at xdev.Application.main(Application.java:294)
Caused by: xdev.db.DBException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
.start,
.end,
.summary,
.description,
.location,
.category_id,
.r' at line 2
at xdev.db.jdbc.JDBCConnection.queryJDBCImpl(JDBCConnection.java:278)
at xdev.db.jdbc.JDBCConnection.queryJDBC(JDBCConnection.java:231)
at xdev.db.jdbc.JDBCConnection.queryJDBC(JDBCConnection.java:220)
at xdev.db.jdbc.JDBCConnection.query(JDBCConnection.java:159)
at xdev.db.jdbc.JDBCConnection.query(JDBCConnection.java:141)
at xdev.db.jdbc.JDBCConnection.query(JDBCConnection.java:1)
at xdev.vt.VirtualTable.queryAndFill(VirtualTable.java:8020)
at xdev.vt.VirtualTable.queryAndFill(VirtualTable.java:8010)
at xdev.vt.VirtualTable.queryAndFill(VirtualTable.java:7949)
at xdev.ui.calendar.VirtualTableCalendarPersistence.<init>(SourceFile:606)
... 10 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
.start,
.end,
.summary,
.description,
.location,
.category_id,
.r' at line 2
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
at xdev.db.jdbc.JDBCConnection.queryJDBCImpl(JDBCConnection.java:267)
... 19 more

--------------------------------------------------------------

Expected behaviour:
--------------------------------------------------------------
The exception is not thrown.
--------------------------------------------------------------

Environment

None

Activity

Show:
Sebastian
September 12, 2013, 8:18 AM

Test Successful. XdevCalendarTemplate works fine with generated tables in a MySQL database.

JW
July 17, 2013, 2:12 PM

See linked Issue for further investigation.

Fixed

Assignee

JW

Reporter

A