java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected

Pentaho BI Platform Tracking | Carlos Lopez | 8 months 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

    When creating an analyzer cube and the mondrian schema is being loaded to display the available cubes we fire queries to detect database information; one of the queries that is being fired is this: {noformat} select version(); {noformat} http://mondrian.pentaho.com/api/src-html/mondrian/spi/impl/JdbcDialectImpl.html#line.1129 This query generates different errors depending on the database used. Here is a sample of the stacktrace shown in the logs when customers are using Oracle as their data warehouse: {noformat} 2016-08-05 14:07:50,785 DEBUG [mondrian.rolap.RolapSchemaPool] get: catalog=mondrian:/oFoodMarts, connectionKey=null{}, jdbcUser=null, dataSourceStr=jndiOracle, dataSource=null, jdbcConnectionUuid=null, useSchemaPool=true, useContentChecksum=true, map-size=0, md5-map-size=0 2016-08-05 14:07:50,837 DEBUG [mondrian.rolap.RolapSchemaPool] get(key=9b4f21c83511b81f718bb2fb3093c411) returned null 2016-08-05 14:07:50,873 DEBUG [mondrian.server.MondrianServerImpl] addConnection , id=1, statements=1, connections=1 2016-08-05 14:07:50,873 DEBUG [mondrian.server.MondrianServerImpl] addStatement , id=1, statements=1, connections=2 2016-08-05 14:07:50,874 DEBUG [mondrian.server.monitor] ConnectionStartEvent(1) 2016-08-05 14:07:50,874 DEBUG [mondrian.server.monitor] StatementStartEvent(1) 2016-08-05 14:07:53,365 DEBUG [mondrian.spi.impl.JdbcDialectImpl] NOT Using IMPALA dialect. java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:459) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:400) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:999) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:539) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:235) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:543) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:199) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1216) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1500) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1717) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:2013) at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1709) at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) at mondrian.spi.impl.JdbcDialectImpl.isDatabase(JdbcDialectImpl.java:1144) at mondrian.spi.impl.ImpalaDialect$1.acceptsConnection(ImpalaDialect.java:52) at mondrian.spi.impl.JdbcDialectFactory.createDialect(JdbcDialectFactory.java:122) at mondrian.spi.DialectManager$ChainDialectFactory.createDialect(DialectManager.java:329) at mondrian.spi.DialectManager$ChainDialectFactory.createDialect(DialectManager.java:329) at mondrian.spi.DialectManager$CachingDialectFactory.createDialect(DialectManager.java:428) at mondrian.spi.DialectManager$DialectManagerImpl.createDialect(DialectManager.java:288) at mondrian.spi.DialectManager.createDialect(DialectManager.java:108) at mondrian.spi.DialectManager.createDialect(DialectManager.java:81) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:228) at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:188) at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:216) at mondrian.rolap.RolapSchemaPool.createRolapSchema(RolapSchemaPool.java:294) at mondrian.rolap.RolapSchemaPool.getByChecksum(RolapSchemaPool.java:270) at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:158) at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:72) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:161) at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:91) at mondrian.olap.DriverManager.getConnection(DriverManager.java:113) at mondrian.olap.DriverManager.getConnection(DriverManager.java:69) at mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:162) at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.<init>(FactoryJdbc4Plus.java:323) at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.<init>(FactoryJdbc41Impl.java:118) at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32) at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:97) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.pentaho.platform.plugin.services.connections.mondrian.MDXOlap4jConnection.connect(MDXOlap4jConnection.java:100) at org.pentaho.platform.plugin.services.connections.mondrian.MDXOlap4jConnection.setProperties(MDXOlap4jConnection.java:219) at org.pentaho.platform.engine.services.connection.PentahoConnectionFactory.getConnection(PentahoConnectionFactory.java:124) at com.pentaho.analyzer.service.impl.OlapConnectionManagerImpl.createConnection(SourceFile:147) at com.pentaho.analyzer.service.impl.OlapConnectionManagerImpl.createConnection(SourceFile:75) at com.pentaho.analyzer.service.impl.a.getConnection(SourceFile:55) at com.pentaho.analyzer.service.impl.OlapMetaDataManager.getConnection(SourceFile:67) at com.pentaho.analyzer.service.impl.AnalysisAreaManager.createOlapConnection(SourceFile:109) at com.pentaho.analyzer.content.controller.p.a(SourceFile:86) at com.pentaho.analyzer.content.controller.p.a(SourceFile:118) at com.pentaho.analyzer.content.AnalyzerContentGenerator.createContent(SourceFile:152) at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutput.generateContent(GeneratorStreamingOutput.java:236) at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutput.write(GeneratorStreamingOutput.java:163) at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutputProvider.writeTo(GeneratorStreamingOutputProvider.java:54) at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutputProvider.writeTo(GeneratorStreamingOutputProvider.java:33) at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at org.pentaho.platform.web.servlet.JAXRSServlet.service(JAXRSServlet.java:109) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.pentaho.platform.web.servlet.JAXRSServlet.service(JAXRSServlet.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:185) at com.pentaho.platform.web.http.filters.PentahoEnterpriseWebContextFilter.doFilter(SourceFile:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:87) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:191) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.pentaho.platform.web.http.security.PentahoBasicProcessingFilter.doFilterHttp(PentahoBasicProcessingFilter.java:115) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.pentaho.platform.web.http.filters.HttpSessionPentahoSessionIntegrationFilter.doFilter(HttpSessionPentahoSessionIntegrationFilter.java:263) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.pentaho.ui.servlet.SystemStatusFilter.doFilter(SourceFile:87) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.pentaho.platform.web.http.filters.WebappRootForwardingFilter.doFilter(WebappRootForwardingFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.pentaho.platform.web.http.filters.PentahoPathDecodingFilter.doFilter(PentahoPathDecodingFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 2016-08-05 14:07:53,487 DEBUG [mondrian.spi.impl.JdbcDialectImpl] NOT Using NETEZZA dialect. java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:459) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:400) {noformat} The same query in MS SQL Server would throw the following error: {noformat} 'version' is not a recognized built-in function name. {noformat}

    Pentaho BI Platform Tracking | 9 months ago | Carlos Lopez
    java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
  2. 0

    When creating an analyzer cube and the mondrian schema is being loaded to display the available cubes we fire queries to detect database information; one of the queries that is being fired is this: select version(); http://mondrian.pentaho.com/api/src-html/mondrian/spi/impl/JdbcDialectImpl.html#line.1129 This query generates different errors depending on the database used. Here is a sample of the stacktrace shown in the logs when customers are using Oracle as their data warehouse: {noformat} 2016-08-05 14:07:50,785 DEBUG [mondrian.rolap.RolapSchemaPool] get: catalog=mondrian:/oFoodMarts, connectionKey=null{}, jdbcUser=null, dataSourceStr=jndiOracle, dataSource=null, jdbcConnectionUuid=null, useSchemaPool=true, useContentChecksum=true, map-size=0, md5-map-size=0 2016-08-05 14:07:50,837 DEBUG [mondrian.rolap.RolapSchemaPool] get(key=9b4f21c83511b81f718bb2fb3093c411) returned null 2016-08-05 14:07:50,873 DEBUG [mondrian.server.MondrianServerImpl] addConnection , id=1, statements=1, connections=1 2016-08-05 14:07:50,873 DEBUG [mondrian.server.MondrianServerImpl] addStatement , id=1, statements=1, connections=2 2016-08-05 14:07:50,874 DEBUG [mondrian.server.monitor] ConnectionStartEvent(1) 2016-08-05 14:07:50,874 DEBUG [mondrian.server.monitor] StatementStartEvent(1) 2016-08-05 14:07:53,365 DEBUG [mondrian.spi.impl.JdbcDialectImpl] NOT Using IMPALA dialect. java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:459) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:400) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:999) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:539) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:235) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:543) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:199) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1216) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1500) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1717) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:2013) at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1709) 2016-08-05 14:07:53,487 DEBUG [mondrian.spi.impl.JdbcDialectImpl] NOT Using NETEZZA dialect. java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:459) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:400) {noformat} The same query in MS SQL Server would throw the following error: {noformat} 'version' is not a recognized built-in function name {noformat} The purpose of this improvement is to allow Mondrian to capture the Database Product Name using the proper version function for each database supported

    Pentaho BI Platform Tracking | 8 months ago | Carlos Lopez
    java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
  3. 0

    JDBC - Convert SQL string to satisfy Java

    Stack Overflow | 2 years ago | AndrewD
    java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Not able to create the standalone agent in ODI 12c

    Oracle Community | 2 years ago | apu
    com.oracle.cie.servicetable.external.ServiceTableException: Failed to query contents of table SERVICETABLE. ORA-00942: table or view does not exist
  6. 0

    Oracle Database Source -Error with SQL Status File

    GitHub | 2 years ago | dvohra
    java.sql.SQLSyntaxErrorException: ORA-00911: invalid character

  1. bpbhat77 1 times, last 10 months ago
8 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.SQLSyntaxErrorException

    ORA-00923: FROM keyword not found where expected

    at oracle.jdbc.driver.T4CTTIoer.processError()
  2. Oracle jdbc
    OracleStatementWrapper.executeQuery
    1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:459)
    2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:400)
    3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:999)
    4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:539)
    5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:235)
    6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:543)
    7. oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:199)
    8. oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1216)
    9. oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1500)
    10. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1717)
    11. oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:2013)
    12. oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1709)
    12 frames