Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[Macromedia][Oracle JDBC Driver][Oracle]ORA-01003: no statement parsed

New Here ,
May 23, 2025 May 23, 2025

I have some coldfusion servers that are connected to an oracle database and have been having some issues sending queries to the DB from the CF servers. I must also state that both the server and db are quite busy. The issue I am having is that the same query will get processed and shortly after I would receive the aforementioned error. I've done some troubleshooting with the DBA an confirmed the issue is not coming from the DB. Further research into issue led me to make some changes on the CF servers but I am still experiencing this issue. Two actions I normally execute provides a temporary solution to the problem:
1. disable all the db connections and then re-enable them.
2. Restart the nodes with the datasource connections.
The server settings I change are as follows:
1. Increase the "Max Pooled Statements" from 100 to 500. 
2. Enable "Limit Connections"
3. "Restrict connections to" 48 (Simultaneous Requests 16 * 4 nodes) not sure if this is the right approach.
I am not sure what else to do at this moment. I have attached some to photos of the CF server node stats and db connection settings. The settings are mirrored on the other servers.cf_server performance_stats.pngdb connection advance settings.png

284
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 23, 2025 May 23, 2025

My restrict connection settings was 64 but I dropped it to 48. not sure I was using the right calculations at the time.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2025 May 24, 2025

First of all, what is the ColdFusion version and update level? What is the Oracle driver version?

 

When I see "ORA-01003:No statement parsed", my immediate idea is that this is an Oracle database problem. Hence not a ColdFusion problem. So you should probably be looking for a solution in Oracle, not in ColdFusion. At least, to start with. I would therefore suggest the following.

 

At the ColdFusion end:

  1.  uncheck the "Limit Connections" checkbox and delete the 48 from "Restrict connections to";
  2.  instead of using the arbitrary value 500 for "Max Pooled Statements", do the following to obtain a more accurate value to use:
    count or estimate the (number of unique cfquery tags that use cfqueryparam + number of unique cfstoredproc tags). In any case the default value (where the field "Max Pooled Statements" is empty), which is 300, is usually sufficient. 

 

At the Oracle end:

  1.  Examine the stacktrace (of the ColdFusion error) and identify the query that is causing the problem. It will help greatly if you share the query code as well as the entire stacktrace with the forum.
  2.  Identify the version of the Oracle driver that your ColdFusion application is using. Chances are, it is outdated. Verify on the web whether there is a newer version of the driver. If there is, then update the Oracle driver in your application.

 

Remember to restart ColdFusion for any changes to take effect. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2025 May 28, 2025

Thanks for reaching BKBK and my apologies for the delayed response!

Here's the info you requested:

ColdFusion version and update level? Current Update Level is 18

teno_chin_0-1748439050663.png


What is the Oracle driver version?
I'm thinking this is the version? |Oracle|6.0.0.1408

teno_chin_2-1748440102534.png


CF Ora Package:

teno_chin_1-1748440051106.png

number of unique cfquery tags that use cfqueryparam: 318

SQL QUERY:

select to_char(evtime, 'mm/dd/yyyy hh24:mi') AS evtime, SUM(count_) AS tcnt

from traffic_stats

WHERE evtime >= (param 1)

and evtime >= (param 2)

and evtime >= (param 3)

and node = (param 4)

and type = (param 5)

group by evtime

order by evtime

params for the query:
(param 1) = [type='IN', class='java.sql.Timestamp', value='2025-05-12 05:16:00.0', sqltype='cf_sql_timestamp'] ,
(param 2) = [type='IN', class='java.sql.Timestamp', value='2025-04-08 03:21:52.0', sqltype='cf_sql_timestamp'] ,
(param 3) = [type='IN', class='java.sql.Timestamp', value='2025-05-28 12:21:56.189', sqltype='cf_sql_timestamp'] ,
(param 4) = [type='IN', class='java.lang.String', value='908086', sqltype='cf_sql_varchar'] ,
(param 5) = [type='IN', class='java.lang.String', value='LTE', sqltype='cf_sql_varchar']


STACKTRACE:

coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query.
at coldfusion.tagext.sql.QueryTag.startQueryExecution(QueryTag.java:929)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:821)
at cfact_oct_etl2ecfc1174054824$funcGET_TRAFFIC_STATUS._factor7(C:\websites\oct_core\act_oct_etl.cfc:332)
at cfact_oct_etl2ecfc1174054824$funcGET_TRAFFIC_STATUS.runFunction(C:\websites\oct_core\act_oct_etl.cfc:308)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:553)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:681)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762)
at coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:261)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:613)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:167)
at coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:384)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:555)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:448)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLException: [Macromedia][Oracle JDBC Driver][Oracle]ORA-01003: no statement parsed
 
at macromedia.jdbc.oracle.base.BaseExceptions.b(|Oracle|6.0.0.1408|:1099)
at macromedia.jdbc.oracle.base.BaseExceptions.a(|Oracle|6.0.0.1408|:976)
at macromedia.jdbc.oracle.base.BaseExceptions.a(|Oracle|6.0.0.1408|:1120)
at macromedia.jdbc.oracle.base.BaseExceptions.a(|Oracle|6.0.0.1408|:455)
at macromedia.jdbc.oracle.OracleImplResultset.a(|Oracle|6.0.0.1408|:941)
at macromedia.jdbc.oracle.OracleImplResultset.a(|Oracle|6.0.0.1408|:484)
at macromedia.jdbc.oracle.OracleImplStatement.cu(|Oracle|6.0.0.1408|:3430)
at macromedia.jdbc.oracle.base.gs.od(|Oracle|6.0.0.1408|:2505)
at macromedia.jdbc.oracle.base.gs.nW(|Oracle|6.0.0.1408|:1358)
at macromedia.jdbc.oracle.base.BasePreparedStatement.execute(|Oracle|6.0.0.1408|:2703)
at macromedia.jdbc.oracle.base.fh.execute(|Oracle|6.0.0.1408|:525)
at coldfusion.server.j2ee.sql.JRunPreparedStatement.execute(JRunPreparedStatement.java:101)
at coldfusion.sql.Executive.executeQuery(Executive.java:1629)
at coldfusion.sql.Executive.executeQuery(Executive.java:1355)
at coldfusion.sql.Executive.executeQuery(Executive.java:1285)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:425)
at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:1247)
at coldfusion.tagext.sql.QueryTag.startQueryExecution(QueryTag.java:876)
... 51 more

I'm about to uncheck the "Limit Connections" checkbox and delete the 48 from "Restrict connections to"; Then restart the nodes. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 28, 2025 May 28, 2025

Thanks for the information. This new information means that I have to revise all my previous suggestions.

 

Here are new suggestions, based on the new information:

 

1.  As you're using the Oracle driver that ships with ColdFusion, let ColdFusion decide which version to use.

I initially thought you were using a custom Oracle JDBC driver., hence my previous suggestion to update. But it turns out you're using the Oracle driver that ships with ColdFusion. In that case, you should let ColdFusion decide which driver to use. The driver version is indeed 6.0.0.1408. However, to be sure, perform the Felix-cache fix discussed below.

 

2.  Update the value of the setting "Max Pooled Statements" not to 318, but to 50!

There is something odd about this setting. You said you had set it to 500. Yet your printscreen shows that the value in effect is 300, the default. Might it be that ColdFusion is failing to pick up the updated setting? If so, could this have something to do with the Felix-cache issue discussed below?

 

Anyway, let's march on. You say that the number of unique cfquery tags that use cfqueryparam is 318. (I am assuming there are no stored-procedure tags using cfqueryparam). Each such query corresponds to a prepared statement in the pool. On this basis, ColdFusion's documentation suggests that you use the value 318 for Max Pooled Statements.

 

However, we should look at this differently. Especially because of the database issues you are experiencing.

A pool of 318 statements means that ColdFusion could possibly feel free to allocate 318 cached prepared statements per database connection. That is a lot of statements for a single connection. It is unlikely that your application will ever need all 318 queries at the same time. The end result will likely be unnecessary congestion, besides it being extremely inefficient.

 

Hence my suggestion that the statements-pool consist of a maximum of one-sixth the number of queries. That is, one-sixth of 318, which is around 50!

 

With Max Pooled Statements = 50, what could the number of pooled connections then be?

That comes next. 

 

3.  Tick the checkboxes "Limit Connections" and "Maintain Connections", and enter the value 64 for "Restrict connections to"

These settings ensure that ColdFusion will create a database connection pool with a maximum size of 64 connections. ColdFusion will in effect:

- Open new connections as needed, up to 64;

- Reuse connections if available;

- Queue requests beyond that until a connection is free.

 

You can confirm that 64 is a good rule-of-thumb value. Firstly, it exceeds 50, the Max Pooled Statements, with extra pooled connections in reserve. Secondly, there is a curiosity in ColdFusion. If you leave blank the settings  "Limit Connections" and "Restrict connections to", ColdFusion will use the following as the default value for the number of connections: the "Maximum number of simultaneous Template requests". This value is 25 by default, which has same order of magnitude as 64.

 

4.  Check the checkbox "Enable connection validation" and enter a suitable "Validation Query", for example

SELECT 1 FROM dual

 

5.  Make the query more efficient by replacing the repetitive 'evtime >='.

That is, replace

select to_char(evtime, 'mm/dd/yyyy hh24:mi') AS evtime, SUM(count_) AS tcnt
from traffic_stats
WHERE evtime >= (param 1)
and evtime >= (param 2)
and evtime >= (param 3)
and node = (param 4)
and type = (param 5)
group by evtime
order by evtime

with something like

SELECT TO_CHAR(evtime, 'mm/dd/yyyy hh24:mi') AS evtime, SUM(count_) AS tcnt 
FROM traffic_stats
WHERE evtime >= GREATEST(<CFQUERYPARAM VALUE="#param1#"  CFSQLType="CF_SQL_TIMESTAMP">, <CFQUERYPARAM VALUE="#param2#"  CFSQLType="CF_SQL_TIMESTAMP">, <CFQUERYPARAM VALUE="#param3#"  CFSQLType="CF_SQL_TIMESTAMP">)
AND node = <CFQUERYPARAM VALUE="#param4#"  CFSQLType="CF_SQL_TIMESTAMP">
AND type = <CFQUERYPARAM VALUE="#param5#"  CFSQLType="CF_SQL_TIMESTAMP">
GROUP BY evtime
ORDER BY evtime

 

6.  Update ColdFusion 2021

Your update level is 18. Change from Update 18 to Update 20 (the latest). Though this may not be directly related to the issue, it helps to have the latest ColdFusion 2021 software in place.

 

7.  Delete everything from the folder {CF_INSTANCE_HOME}/bin/felix-cache, then restart ColdFusion

After you inplement an update, delete everything from the folder {CF_INSTANCE_HOME}/bin/felix-cache, then restart ColdFusion.

 

In fact, even if you do not yet update, I would urge you to empty the felix-cache folder and then restart. Doing so has been known to fix diverse issues with no apparent link between them. There is an even stronger reason. As the release notes for Update 17 show, clearing the Felix cache has some relation to the Oracle data source. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2025 May 28, 2025

Thanks agains!

I did drop the max pooled statements from 500 to 300 because of the subsequent uptick in memory usage. I requested additional memory now so it's running optimally.

Yes, you are correct. I am not using any stored-procedure tags. I will drop the "Max Pooled Statements" down to 50 as you suggested and optimize the query as well. 

For the "Enable connection validation", will this query run each time the coldfusion sends a query or each "Interval (min)"? which is currently 7 on my server settings.

I did upgrade to Update level 20 in January but all my datasources would not connect. So I rolled back the connection. For Update level 18 I did have to delete the felix cache so I will proceed to deleting it again and make the suggested changes, then monitor the performance.
I do have to upgrade to 20 especially with the recent release statement and the vulnerabilities.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2025 May 29, 2025
quote

For the "Enable connection validation", will this query run each time the coldfusion sends a query or each "Interval (min)"? which is currently 7 on my server settings.

 

By @teno_chin

No, the validation query does not run each time ColdFusion sends a query to the database. The validation query is a test for the database connections in the connection pool. It checks if a pooled database connection ColdFusion is about to use is still alive. 

 

Using the validation query is optional. I suggest it because I think it is necessary in your situation.

 

The issues in your application seem to be related to the database connection pool. The validation query ensures the connection to be used is still valid and alive, not stale or broken.

 

In any case, the validation query is very lightweight. It should normally run in a few milliseconds. With a maximum of 64 connections in the pool, the total performance cost of the validation query should be well below 1 second. Check it:

<cfquery name="q" datasource="your_datasource_name" result="QResult">
	select 1 from dual
</cfquery>
The query ran in <cfoutput>#QResult.executionTime#</cfoutput> milliseconds

 

I strongly recommend an upgrade to ColdFusion 2021 Update 20. After you do, you should indeed delete the contents of felix-cacheI, and then restart ColdFusion.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2025 May 29, 2025

A note on my validation query test code. I should point out that the ExecutionTime, even though small, includes:

  • JDBC round trip to database and back;

  • Network latency;

  • Connection pooling lookup;

  • Execution of query and packaging of the result.


Oracle optimizes the DUAL table heavily. So the execution time of the actual SQL portion is almost negligible.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2025 May 30, 2025

Thank you! To provide an update, after I implemented the suggested changes my app ran with low errors (usually happens when I restart the server) for a few hours then the errors increase over time as per usual behavior. The only thing I did different, which was strongly against my will, is to uncheck "Maintain Connections". After doing that and restarting the server, the errors went away but subsequently increased the number of my DB's session states "ON CPU" which was expected. It went up from an avg 70% to 80%. The good thing is that I am getting a new soon so I will continute to monitor the performance. If this holds for another 24hrs. I will consider the issue resolved. Here's what the error trends look like now.

teno_chin_0-1748610830595.png


Thanks again for your support! I really appreciate it. I definitely have to upgrade to 20 now that I have IT sec advising me of my server vulnerabilities.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2025 Jun 01, 2025

I am glad to hear about the improvement. Before continuing, I have to emphasize two quick actions ("low-hanging fruit") that are known to resolve a diverse number of issues:

  1. Empty the felix-cache folder, and restart ColdFusion.
  2. Optimize the SQL of your queries (I offered an example earlier).


Now, my response to your update. As the errors go away when you uncheck "Maintain Connections", that suggests a new area to look into. It confirms my initial instinct that the root cause is probably in the Oracle database.

 

If you enable "Maintain Connections", which is the recommended practice, ColdFusion will cache connection information. ColdFusion will then stay logged in to the database and will keep the connection open. This ensures that subsequent requests that reuse the connection get quicker access to the datasource, hence improving performance. However, such connection pooling can have drawbacks for the database, as you have discovered.

 

I have a guess for what might then be happening. It is likely that the Oracle database is having trouble coping with the persistent connections. A common consequence is that Oracle's session-level settings then persist. For example, if your application modifies session-level Oracle settings, such as NLS_DATE_FORMAT, OPTIMIZER_MODE, or CURRENT_SCHEMA, without resetting them, pooled connections may carry over those changes to other user-requests. 

 

Since your application uses prepared statements, Oracle caches parsed versions of those SQL statements within the session. If the queries set session-level hints or optimizer settings, and don’t reset them, then subsequent queries may be parsed or executed suboptimally or even incorrectly.

 

For example, with varying session hints and optimizer settings within a session, Oracle may reference a previously parsed SQL statement that no longer exists in the session's memory. My guess is, that is what causes the error "ORA-01003: no statement parsed".

 

Suggestions for solution (or, at least, for testing to see which idea works):

  1.  Reset the Oracle session (with "Maintain Connections" switched on in ColdFusion):
    Find how to make sure that every request to the Oracle database resets the session. That is, every request then starts with a new session. That is actually one of the effects of disabling  "Maintain Connections". But a solution with "Maintain Connections" is preferable.
  2.  (As a last resort) Download and use the most recent Oracle JDBC driver suitable for your ColdFusion/Java version and use it instead. It just might be that ColdFusion's Macromedia JDBC driver is not an optimal match for the demands of your application.  
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2025 Jun 01, 2025
LATEST
The only thing I did different, which was strongly against my will, is to uncheck "Maintain Connections".


This is good, from a diagnostic perspective. It tells you that your JDBC connection pool is causing the error, probably from having too many concurrent connections open. If you're not the Oracle DBA, you might want to ask what's the recommended setting for this DB.

 

Of course, it's not a great permanent solution. But you might find the recommended setting for your environment is much lower than expected. You could start with, say, 20, then test that. If it works ok, try 40, then maybe 60. I've never used a higher max connection pool value than that with Oracle - although it's been a while since I've worked with Oracle. Or, maybe @BKBK gave a good minimum value and you could use that. Try it out, if you can!

 

Dave Watts, Eidolon LLC
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources