Project: talendesb
Issue TESB-2207: create.sql in add-ons/sam/db won't work with Apache Derby
Activating the sam-server-war in Tomcat, using most recent release version of Derby (10.8.1.2), per Renat's first screencast (http://www.screenr.com/DxHs) is raising a syntax exception as the webapp tries to create the EVENTS table: (seen in Tomcat's catalina.out log file:) org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [CREATE TABLE EVENTS ( ID BIGINT NOT NULL, EI_TIMESTAMP TIMESTAMP, EI_EVENT_TYPE VARCHAR(255), ORIG_CUSTOM_ID VARCHAR(255), ORIG_PROCESS_ID VARCHAR(255), ORIG_HOSTNAME VARCHAR(128), ORIG_IP VARCHAR(64), ORIG_PRINCIPAL VARCHAR(255), MI_PORT_TYPE VARCHAR(255), MI_OPERATION_NAME VARCHAR(255), MI_MESSAGE_ID VARCHAR(255), MI_FLOW_ID VARCHAR(64), MI_TRANSPORT_TYPE VARCHAR(255), CONTENT_CUT BOOLEAN, MESSAGE_CONTENT CLOB(2147483647), PRIMARY KEY (ID))]; nested exception is java.sql.SQLSyntaxErrorException: Syntax error: BOOLEAN. The other two tables create without a problem. To try to determine whether this is a Tomcat or a Derby problem, I directly ran create.sql from Derby's ij query tool and got the same problem (again, the other two tables in create.sql will work) using the steps listed here[1]: gmazza@gmazza-work:~/dataExt3/underthehood/db-derby-10.8.1.2-bin/bin$ ij ij version 10.4 ij> ls > select * from events; IJ ERROR: Unable to establish connection ij> connect 'jdbc:derby:/home/gmazza/derbyDBs/TESTDB;create=true'; ij> run 'create.sql'; ij> CREATE TABLE EVENTS ( ID BIGINT NOT NULL, EI_TIMESTAMP TIMESTAMP, EI_EVENT_TYPE VARCHAR(255), ORIG_CUSTOM_ID VARCHAR(255), ORIG_PROCESS_ID VARCHAR(255), ORIG_HOSTNAME VARCHAR(128), ORIG_IP VARCHAR(64), ORIG_PRINCIPAL VARCHAR(255), MI_PORT_TYPE VARCHAR(255), MI_OPERATION_NAME VARCHAR(255), MI_MESSAGE_ID VARCHAR(255), MI_FLOW_ID VARCHAR(64), MI_TRANSPORT_TYPE VARCHAR(255), CONTENT_CUT BOOLEAN, MESSAGE_CONTENT CLOB(2147483647), PRIMARY KEY (ID)); ERROR 42X01: Syntax error: BOOLEAN. ij> CREATE TABLE EVENTS_CUSTOMINFO ( ID BIGINT NOT NULL, EVENT_ID BIGINT NOT NULL, CUST_KEY VARCHAR(255), CUST_VALUE VARCHAR(255), PRIMARY KEY (ID)); 0 rows inserted/updated/deleted ij> CREATE TABLE TAB_SEQUENCE (ID_VALUE int generated always as identity, DUMMY char(1)); 0 rows inserted/updated/deleted ij> INSERT INTO TAB_SEQUENCE (DUMMY) values(null); 1 row inserted/updated/deleted [1] http://www.jroller.com/gmazza/entry/apache_derby_setup This problem prevents the bottom (non-SOAP/WSDL) links on the main sam-server-war HTML page to fail to work.
Story points: 1