java.sql.SQLException: Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]

Atlassian JIRA | Tim Colson (yahoo) | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Just tried installing JIRA 2.6.1 Enterprise -- installed ok, but after creating a project, creating a bug in that project, and finally trying to add that project to my dashboard -- it seems to have melted down. :-( Now I cannot even log into JIRA. Upon startup, I found this trace in the tomcat stdout.log which I realize uses "POSITION" as a fieldname -- something which is VERBOTEN in HSQLDB 1.7.2RC5 and above. POSITION is a reserved token in SQL apparently. FYI -- it can still be used if the field is fully qualified with the tablename, ex.PORTLETCONFIGURATION.POSITION, but it would be better to change the fieldname. I use the name "ORDINAL" -- Check webster.com for the def'n: "1 : a number designating the place (as first, second, or third) occupied by an item in an ordered sequence" In the meantime -- is there a way I can workaround this? Cheers, Timo 2004-04-28 08:00:59,829 ERROR [jira.action.admin.DataExport] Error exporting: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration (Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]) org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration (Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]) at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:295) at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1024) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:595) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:134) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:782) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:767) at org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:705) at com.atlassian.jira.action.admin.DataExport.execute(DataExport.java:58) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at com.atlassian.core.action.DefaultActionDispatcher.execute(DefaultActionDispatcher.java:34) at com.atlassian.jira.service.services.export.ExportService.run(ExportService.java:90) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:51) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387) java.sql.SQLException: Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration] at org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:226) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:328) at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:290) at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1024) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:595) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:134) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:782) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:767) at org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:705) at com.atlassian.jira.action.admin.DataExport.execute(DataExport.java:58) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at com.atlassian.core.action.DefaultActionDispatcher.execute(DefaultActionDispatcher.java:34) at com.atlassian.jira.service.services.export.ExportService.run(ExportService.java:90) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:51) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387) 2004-04-28 08:00:59,869 WARN [service.services.export.ExportService] Exception running export service Error in action: com.atlassian.jira.action.admin.DataExport@a0560e, result: error Error exporting: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration (Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]) com.atlassian.core.AtlassianCoreException: Error in action: com.atlassian.jira.action.admin.DataExport@a0560e, result: error Error exporting: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration (Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]) at com.atlassian.core.action.ActionUtils.checkForErrors(ActionUtils.java:53) at com.atlassian.jira.service.services.export.ExportService.run(ExportService.java:91) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:51) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387)

    Atlassian JIRA | 1 decade ago | Tim Colson (yahoo)
    java.sql.SQLException: Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]
  2. 0

    Spring 4 and Hibernate 4 - GenericJDBCException: could not prepare statement

    Stack Overflow | 3 years ago | Kyle Walker
    org.springframework.orm.hibernate4.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into Customer (customerId, address, dateOfBirth, email, firstName, lastName, middleName, phone) values (null, ?, ?, ?, ?, ?, ?, ?)]; SQL state [IM001]; error code [-20]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement
  3. 0

    Struts 1.3.10 javax.servlet.UnavailableException :: 4programmers.net

    4programmers.net | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginDao' defined in ServletContext resource [/WEB-INF/beans.xml]: Invocation of init method failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring 4 and Hibernate 4 - could not prepare statement - Tech Forum Network

    techforumnetwork.com | 1 year ago
    org.springframework.orm.hibernate4.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into Customer (customerId, address, dateOfBirth, email, firstName, lastName, middleName, phone) values (null, ?, ?, ?, ?, ?, ?, ?)]; SQL state [IM001]; error code [-20]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement
  6. 0

    TestInfoTrunkCleaner: .SQLException: Table not found in statement [INSERT INTO test_info SELECT * FROM test_info_trunk]

    YouTrack | 8 years ago
    org.springframework.jdbc.UncategorizedSQLException: Error preparing statement; uncategorized SQLException for SQL [INSERT INTO test_info SELECT * FROM test_info_trunk]; SQL state [S0002]; error code [-22]; Table not found in statement [INSERT INTO test_info SELECT * FROM test_info_trunk]; nested exception is java.sql.SQLException: Table not found in statement [INSERT INTO test_info SELECT * FROM test_info_trunk]

    9 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Unexpected token in statement [SELECT ID, PORTALPAGE, PORTLET_ID, COLUMN_NUMBER, POSITION FROM portletconfiguration]

      at org.hsqldb.jdbc.jdbcUtil.throwError()
    2. HSQLDB
      jdbcConnection.prepareStatement
      1. org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source)
      2. org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
      3. org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
      3 frames
    3. Commons DBCP
      PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement
      1. org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:226)
      2. org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:328)
      2 frames
    4. org.ofbiz.core
      GenericDelegator.findAll
      1. org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:290)
      2. org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1024)
      3. org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:595)
      4. org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:134)
      5. org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:782)
      6. org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:767)
      7. org.ofbiz.core.entity.GenericDelegator.findAll(GenericDelegator.java:705)
      7 frames
    5. com.atlassian.jira
      DataExport.execute
      1. com.atlassian.jira.action.admin.DataExport.execute(DataExport.java:58)
      1 frame
    6. webwork.dispatcher
      GenericDispatcher.executeAction
      1. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131)
      1 frame
    7. com.atlassian.core
      DefaultActionDispatcher.execute
      1. com.atlassian.core.action.DefaultActionDispatcher.execute(DefaultActionDispatcher.java:34)
      1 frame
    8. com.atlassian.jira
      ServiceRunner.execute
      1. com.atlassian.jira.service.services.export.ExportService.run(ExportService.java:90)
      2. com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:51)
      3. com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50)
      3 frames
    9. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:147)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387)
      2 frames