java.sql.SQLSyntaxErrorException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • DB/Schemifier Problem
    via by Daniel Koller,
  • Spark+Hive的example运行问题 - SegmentFault
    via by Unknown author,
  • SQLException: Number of values not same
    via Stack Overflow by PeakGen
    ,
  • A constraint on the SQ_JOB table was added in 1.99.3 that doesn't have corresponding upgrade code. {code} 7:20:49.070 AM INFO org.apache.sqoop.server.ServerInitializer Sqoop server has been correctly terminated 7:57:52.844 AM INFO org.apache.sqoop.core.PropertiesConfigurationProvider Starting config file poller thread 7:57:52.847 AM INFO org.apache.sqoop.tools.tool.UpgradeTool Initializing the RepositoryManager with immutable option turned off. 7:57:52.853 AM INFO org.apache.sqoop.repository.RepositoryManager Setting system properties: {derby.stream.error.file=/var/log/sqoop2/derbyrepo.log} 7:57:52.888 AM INFO org.apache.sqoop.repository.JdbcRepositoryContext [repo-ctx] handler=org.apache.sqoop.repository.derby.DerbyRepositoryHandler, conn-url=jdbc:derby:/var/lib/sqoop2/repository/db;create=true, driver=org.apache.derby.jdbc.EmbeddedDriver, user=null, password=*****, jdbc-props={}, tx-isolation=READ_COMMITTED, max-conn=10 7:57:53.836 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler DerbyRepositoryHandler initialized. 7:57:53.843 AM INFO org.apache.sqoop.repository.JdbcRepositoryProvider JdbcRepositoryProvider initialized 7:57:53.843 AM INFO org.apache.sqoop.repository.JdbcRepositoryProvider JdbcRepository initialized. 7:57:53.843 AM INFO org.apache.sqoop.repository.RepositoryManager Creating or updating respository at bootup 7:57:54.491 AM INFO org.apache.sqoop.repository.JdbcRepository Creating repository schema objects 7:57:55.478 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(CREATE TABLE SQOOP.SQ_SYSTEM (SQM_ID BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, SQM_KEY VARCHAR(64), SQM_VALUE VARCHAR(64) )) Update count: 0 7:57:55.605 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_CONNECTION ADD SQN_ENABLED BOOLEAN DEFAULT TRUE) Update count: 0 7:57:55.658 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_JOB ADD SQB_ENABLED BOOLEAN DEFAULT TRUE) Update count: 0 7:57:55.680 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_CONNECTION ADD SQN_CREATION_USER VARCHAR(32) DEFAULT NULL) Update count: 0 7:57:55.703 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_CONNECTION ADD SQN_UPDATE_USER VARCHAR(32) DEFAULT NULL) Update count: 0 7:57:55.721 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_JOB ADD SQB_CREATION_USER VARCHAR(32) DEFAULT NULL) Update count: 0 7:57:55.738 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_JOB ADD SQB_UPDATE_USER VARCHAR(32) DEFAULT NULL) Update count: 0 7:57:55.760 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_SUBMISSION ADD SQS_CREATION_USER VARCHAR(32) DEFAULT NULL) Update count: 0 7:57:55.777 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_SUBMISSION ADD SQS_UPDATE_USER VARCHAR(32) DEFAULT NULL) Update count: 0 7:57:55.800 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_SUBMISSION ALTER COLUMN SQS_EXTERNAL_ID SET DATA TYPE VARCHAR(50)) Update count: 0 7:57:55.814 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_CONNECTOR ALTER COLUMN SQC_VERSION SET DATA TYPE VARCHAR(64)) Update count: 0 7:57:55.862 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(CREATE TABLE SQOOP.SQ_DIRECTION (SQD_ID BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, SQD_NAME VARCHAR(64))) Update count: 0 7:57:55.893 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(RENAME COLUMN SQOOP.SQ_FORM.SQF_OPERATION TO SQF_DIRECTION) Update count: 0 7:57:55.919 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(RENAME COLUMN SQOOP.SQ_JOB.SQB_CONNECTION TO SQB_FROM_CONNECTION) Update count: 0 7:57:55.935 AM INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler QUERY(ALTER TABLE SQOOP.SQ_JOB ADD COLUMN SQB_TO_CONNECTION BIGINT) Update count: 0 7:57:55.954 AM INFO org.apache.sqoop.repository.JdbcRepositoryTransaction Attempting transaction commit 7:57:55.958 AM ERROR org.apache.sqoop.tools.tool.UpgradeTool Can't finish upgrading RepositoryManager, Driver and ConnectionManager: org.apache.sqoop.common.SqoopException: DERBYREPO_0003:Unable to run specified query - ALTER TABLE SQOOP.SQ_JOB DROP CONSTRAINT SQOOP.FK_SQB_SQN at org.apache.sqoop.repository.derby.DerbyRepositoryHandler.runQuery(DerbyRepositoryHandler.java:2633) at org.apache.sqoop.repository.derby.DerbyRepositoryHandler.createOrUpgradeRepository(DerbyRepositoryHandler.java:424) at org.apache.sqoop.repository.JdbcRepository$1.doIt(JdbcRepository.java:131) at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:90) at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:61) at org.apache.sqoop.repository.JdbcRepository.createOrUpgradeRepository(JdbcRepository.java:127) at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:123) at org.apache.sqoop.tools.tool.UpgradeTool.runToolWithConfiguration(UpgradeTool.java:39) at org.apache.sqoop.tools.ConfiguredTool.runTool(ConfiguredTool.java:35) at org.apache.sqoop.tools.ToolRunner.main(ToolRunner.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.sqoop.tomcat.TomcatToolRunner.main(TomcatToolRunner.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Tool.main(Tool.java:225) Caused by: org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed at org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:113) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313) at org.apache.sqoop.repository.derby.DerbyRepositoryHandler.runQuery(DerbyRepositoryHandler.java:2609) ... 19 more Caused by: java.sql.SQLSyntaxErrorException: ALTER TABLE failed. There is no constraint 'SQOOP.FK_SQB_SQN' on table '"SQOOP"."SQ_JOB"'. 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.EmbedPreparedStatement.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at org.apache.commons.dbcp.PoolingConnection.makeObject(PoolingConnection.java:285) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1179) at org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:107) ... 22 more Caused by: java.sql.SQLException: ALTER TABLE failed. There is no constraint 'SQOOP.FK_SQB_SQN' on table '"SQOOP"."SQ_JOB"'. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 38 more Caused by: ERROR 42X86: ALTER TABLE failed. There is no constraint 'SQOOP.FK_SQB_SQN' on table '"SQOOP"."SQ_JOB"'. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.sql.compile.TableElementList.validate(Unknown Source) at org.apache.derby.impl.sql.compile.AlterTableNode.bindStatement(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) ... 32 more 7:57:55.966 AM INFO org.apache.sqoop.core.PropertiesConfigurationProvider Shutting down configuration poller thread {code}
    via by Abraham Elmahrek,
  • Java/JDBC Not Connecting to DB
    via Stack Overflow by TopChef
    ,
    • java.sql.SQLSyntaxErrorException: Syntax error: Encountered "(" at line 1, column 53. 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.EmbedPreparedStatement.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at persistencetier.DatabaseConn.server_Connection(DatabaseConn.java:157) at presentationtier.InstanceController.<init>(InstanceController.java:106) 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:526) at java.lang.Class.newInstance(Class.java:374) at sun.reflect.misc.ReflectUtil.newInstance(ReflectUtil.java:51) at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:736) at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:780) at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:185) at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:568) at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2356) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2172) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2830) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2795) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2782) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2771) at presentationtier.StartController.aolAction(StartController.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279) at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1451) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:28) at javafx.event.Event.fireEvent(Event.java:171) at javafx.scene.Node.fireEvent(Node.java:6866) at javafx.scene.control.Button.fire(Button.java:179) at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:193) at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:336) at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:329) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:64) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33) at javafx.event.Event.fireEvent(Event.java:171) at javafx.scene.Scene$MouseHandler.process(Scene.java:3369) at javafx.scene.Scene$MouseHandler.process(Scene.java:3209) at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3164) at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1582) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2267) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:250) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:173) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:292) at com.sun.glass.ui.View.handleMouseEvent(View.java:530) at com.sun.glass.ui.View.notifyMouse(View.java:924) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17) at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Syntax error: Encountered "(" at line 1, column 53. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 92 more

    Users with the same issue

    jf-ast
    1 times, last one,
    stigkj
    1 times, last one,
    andyglick
    1 times, last one,
    davidvanlaatum
    1 times, last one,
    muffinmannen
    81 times, last one,
    1 more bugmates