Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

JavaDB problems

I build a very small test case with a mysql table in Input and a JavaDB table four output.
I just insert have one field (integer) in my javadb output table.
I have a silly error message about a syntax error:
Exception in component tJavaDBOutput_1
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "(" at line 1, column 39.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at test.injection_0_1.injection.tMysqlInput_1Process(injection.java:1067)
at test.injection_0_1.injection.runJobInTOS(injection.java:1909)
at test.injection_0_1.injection.main(injection.java:1826)
Caused by: java.sql.SQLException: Syntax error: Encountered "(" at line 1, column 39.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 11 more
Caused by: ERROR 42X01: Syntax error: Encountered "(" at line 1, column 39.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
... 5 more

what's wrong with the generated code ?
Labels (4)
7 Replies
Anonymous
Not applicable
Author

may be these linea cause the error ?
stmtCreate_tJavaDBOutput_1
.execute("CREATE TABLE \""
+ tableName_tJavaDBOutput_1
+ "\"(\"ID\" INT(10,0) not null ,primary key(\"ID\"))");
Anonymous
Not applicable
Author

hi
i think you're right 0683p000009MACn.png

("CREATE TABLE \ ""
+ tableName_tJavaDBOutput_1
+ "\"(\"ID\" INT(10,0) not null ,primary key(\"ID\"))")
...
You've a "duplicate double quote after 'CREATE TABLE' ... delete one !
++
Anonymous
Not applicable
Author

but it is a code generated by Talend !
to be sure, I have destoryed all the " to produce this code
stmtCreate_tJavaDBOutput_1
.execute("CREATE TABLE
+ tableName_tJavaDBOutput_1
+ " (ID INT(10,0) not null ,primary key(ID))");
but always this stack error:
connecting to socket on port 3684
connected
Exception in component tJavaDBOutput_1
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "(" at line 1, column 39.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at test.injection_0_1.injection.tMysqlInput_1Process(injection.java:1077)
at test.injection_0_1.injection.runJobInTOS(injection.java:1971)
at test.injection_0_1.injection.main(injection.java:1881)
Caused by: java.sql.SQLException: Syntax error: Encountered "(" at line 1, column 39.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 11 more
Caused by: ERROR 42X01: Syntax error: Encountered "(" at line 1, column 39.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) disconnected
... 5 more
it seems that the syntax generated by Talend is not correct: create table foo (ID INT(10,0) not null ,primary key(ID))
Anonymous
Not applicable
Author

all is correct when creating the output by typing tne name and types.
If it is done with drag and drop, code is not correct 😞
Anonymous
Not applicable
Author

seems to be a bug so ....
++
Anonymous
Not applicable
Author

yes, it is the drag and drop of an integer field to a JavaDB output which is the origin of the bug
Anonymous
Not applicable
Author

same issue with varchar(65536)