java.sql.SQLException

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.

  • Confluence 2.0.1, Oracle 8.1.7, when trying to delete space from Space Admin, getting error report: Cause: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended Stack Trace: [hide] org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended java.sql.SQLException: ORA-00933: SQL command not properly ended at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:182) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:500) at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:942) at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:532) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1037) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2946) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:205) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:875) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133) at net.sf.hibernate.loader.Loader.doList(Loader.java:1033) at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
    via by Daniel Ostermeier,
  • ODI Desginer don't open
    via by 699138,
  • Confluence 2.0.1, Oracle 8.1.7, when trying to delete space from Space Admin, getting error report: Cause: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended Stack Trace: [hide] org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: ORA-00933: SQL command not properly ended java.sql.SQLException: ORA-00933: SQL command not properly ended at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:182) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:500) at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:942) at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:532) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1037) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2946) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:205) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:875) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133) at net.sf.hibernate.loader.Loader.doList(Loader.java:1033) at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
    via by Daniel Ostermeier,
  • Hibernate will produce wrong sql syntax when using zero-length arrays as parameters for variables in in-clauses. Example: Session s = hibSessionFactory.openSession(); Query q = s.createQuery("from testInQuery.TestTable where id in (:ids)"); q.setParameterList("ids", new Integer[0]); q.list(); produced sql by hibernate: select testtable0_.ID as ID from TESTTABLE testtable0_ where (id in()) Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:70) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:1525) at org.hibernate.loader.Loader.list(Loader.java:1505) at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:883) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:791) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at testInQuery.AbstractDatabase.main(AbstractDatabase.java:35) Caused by: java.sql.SQLException: ORA-00936: missing expression at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420) at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896) at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118) at org.hibernate.loader.Loader.getResultSet(Loader.java:1204) at org.hibernate.loader.Loader.doQuery(Loader.java:368) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:208) at org.hibernate.loader.Loader.doList(Loader.java:1522)
    via by Roland Scheel,
  • When using iterate and NOT iterating through all items, the cursor stays open. When repeating this several times the "maximum open cursors exceeded" - exception occurs. This problem occured in the following situation: We have an import tool, which reads one line from an import-file and queries the database for colliding/overlapping objects. The objects are loaded whit iterate. The first object which doesn't fit the new input throws an exception and so leaves the iterate-loop. There is no function to close the iterator explicitly. This would solve the problem (once the developer is aware of it). My current workaround ist to use query.list().iterator() instead of query.iterate(). But this is only applicable with small resultsets. I'll do an update of Hibernate soon and see if it still occurs. The attached test crashes after 300 iterations. 300 is the open cursor limit for my DB. org.hibernate.exception.GenericJDBCException: could not execute query using iterate at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:420) at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:318) at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:177) at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1177) at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:46) at de.iccs.test.HibernateAbortIterateTest.testAbortIterate(HibernateAbortIterateTest.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.sql.SQLException: ORA-01000: maximum open cursors exceeded at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420) at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896) at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139) at org.hibernate.loader.Loader.getResultSet(Loader.java:1669) at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:397) ... 20 more
    via by Frederic Leitenberger,
    • java.sql.SQLException: ORA-00933: SQL command not properly ended at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420) at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896) at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118) at org.hibernate.loader.Loader.getResultSet(Loader.java:1197) at org.hibernate.loader.Loader.doQuery(Loader.java:366) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:206) at org.hibernate.loader.Loader.doList(Loader.java:1515) at org.hibernate.loader.Loader.list(Loader.java:1498) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:268) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:788) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at org.hibernate.console.HQLQueryPage.getList(HQLQueryPage.java:30) at org.hibernate.eclipse.console.views.QueryPageViewer$ContentProviderImpl.getElements(QueryPageViewer.java:80) at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:765) at org.eclipse.jface.viewers.TableViewer.getRawChildren(TableViewer.java:1046) at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:707) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:822) at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:762) at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:712) at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:701) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1171) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1108) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1169) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1128) at org.eclipse.jface.viewers.TableViewer.inputChanged(TableViewer.java:662) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:248) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1324) at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:174) at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:153) at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:111) at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:83) at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:52) at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:57) at javax.swing.AbstractListModel.fireIntervalAdded(Unknown Source) at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:50) at org.hibernate.console.KnownConfigurations$3.queryPageCreated(KnownConfigurations.java:167) at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:266) at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:247) at org.hibernate.eclipse.console.views.KnownConfigurationsView$5.run(KnownConfigurationsView.java:143) at org.hibernate.eclipse.console.views.KnownConfigurationsView$3.doubleClick(KnownConfigurationsView.java:91) at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:637) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1021) at org.eclipse.core.runtime.Platform.run(Platform.java:757) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:40) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:635) at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:857) at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:964) at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:219) at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:216) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:275) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:315) at org.eclipse.core.launcher.Main.basicRun(Main.java:268) at org.eclipse.core.launcher.Main.run(Main.java:942) at org.eclipse.core.launcher.Main.main(Main.java:926)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    76 more bugmates