Posted At : Sep 01, 2008 21:46 PM | Posted By : Ed Tabara
Related Categories: RIA, ColdFusion, Other

If you have any concerns about Adobe products, you may use dearadobe.comsite to leave your suggestions for Adobe engineers. Also you may see top rated gripes by application. A related blog is available at blogdearadobe.com.

Comments (0)| Print| Send | 254 Views | 2% / 0% Popularity


Posted At : Aug 16, 2008 17:30 PM | Posted By : Ed Tabara
Related Categories: ColdFusion

Problem:

We have a DB table with varchar values. To make it easy i've created it with a QueryNew:

<cfset getTMP = QueryNew("id, col1, col2")>
<cfset QueryAddRow(getTMP, 2)>
<cfset QuerySetCell(getTMP, "id", "1", 1)>
<cfset QuerySetCell(getTMP, "col1", "1212-77-01", 1)>
<cfset QuerySetCell(getTMP, "col2", "1212-77-01", 1)>
<cfset QuerySetCell(getTMP, "id", "2", 2)>
<cfset QuerySetCell(getTMP, "col1", "1212-77-01ewr", 2)>
<cfset QuerySetCell(getTMP, "col2", "1212-77-01qwe", 2)>

And what is needed is to do the following query:

Select *
From getTMP
Where col1 = <cfqueryparam CFSQLTYPE="CF_SQL_VARCHAR" value="1212-77-01">
or col2 = <cfqueryparam CFSQLTYPE="CF_SQL_VARCHAR" value="1212-77-01">

What we will get is the following error:
Query Of Queries syntax error.
Encountered ". Query Of Queries runtime error.

It come that ColdFusion see the value of CFQUERYPARAM as a DATE and not as VARCHAR. Casting to varchar left and right sides of the equalities does not help at all.


Solution:

Use LIKEinstead of =in the query like this:

Select *
From getTMP
Where col1 like <cfqueryparam CFSQLTYPE="CF_SQL_VARCHAR" value="1212-77-01">
or col2 like <cfqueryparam CFSQLTYPE="CF_SQL_VARCHAR" value="1212-77-01">

Comments (5)| Print| Send | 458 Views | 4% / 36% Popularity


Posted At : Jul 17, 2008 17:12 PM | Posted By : Ed Tabara
Related Categories: ColdFusion

Given:
1) an XML having the % sign in one of the values
example:

<?xml version='1.0' encoding='utf-8' ?>
<tst>
<details>
<somename>less than 50% </somename>
</details>
</tst>

2) a script on a website (WS1) that submit that XML to other website (WS2) that is running CF8 (if the actual verion even matter)
The issue:
When submitting that XML with HTTP POST the following error is happening on WS2:

500
ROOT CAUSE:
java.lang.IllegalArgumentException
at coldfusion.filter.FormScope.parseName(FormScope.java:367)
at coldfusion.filter.FormScope.parseQueryString(FormScope.java:324)
at coldfusion.filter.FormScope.parsePostData(FormScope.java:293)
at coldfusion.filter.FormScope.fillForm(FormScope.java:243)
at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:430)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
javax.servlet.ServletException: ROOT CAUSE:
java.lang.IllegalArgumentException
at coldfusion.filter.FormScope.parseName(FormScope.java:367)
at coldfusion.filter.FormScope.parseQueryString(FormScope.java:324)
at coldfusion.filter.FormScope.parsePostData(FormScope.java:293)
at coldfusion.filter.FormScope.fillForm(FormScope.java:243)
at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:430)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:175)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


IF the % sign is taken off from the XML everything works fine and no error is generated.

NOTE 1:If the script doing the post is emulated on WS2 (so that the XML being submitted from WS2 to WS2), that "500" does not happen.

NOTE 2:The error seem to happen not on the application (because an test output followed by CFABORT just at the start of Application.cfm file does not change anything and the script on WS2 still get the error and not the test output).

NOTE 3:First the CF8 was on Java 1.5 . Then we reinstalled CF8, so it's on the default Java 6 now. But the error is still there.

ANY suggestions would be VERY appreciated!!!

Comments (11)| Print| Send | 969 Views | 9% / 79% Popularity


Posted At : Jun 23, 2008 21:00 PM | Posted By : Ed Tabara
Related Categories: ColdFusion

I don't know if this is known already or not, but this look serious to me. And its is really easy to re-create.
Here are the steps:

  1. Create a foloder that you will can access from your browser
  2. In that folder create an empty Application.cfc file
  3. Create a CFM file with in it
  4. Run that file from your browser
Voila!
You will get a lot of info.. TOO much actually :)

Comments (9)| Print| Send | 1919 Views | 18% / 64% Popularity


Posted At : May 16, 2008 11:42 AM | Posted By : Ed Tabara
Related Categories: ColdFusion, Other, Fun

So... how would you decipher the word COLDFUSION?

I would say it so:

Creativity, Operability, Longevity, Dignity, Flexibility, Usability, Simplicity, Intelligence, Optimality, Notoriety

 


Comments (2)| Print| Send | 1533 Views | 15% / 14% Popularity


Posted At : May 08, 2008 11:55 AM | Posted By : Ed Tabara
Related Categories: ColdFusion, My Projects, 1ssBlog

Currently 1ssBlog  have the following addons available:

  1. Social Tools
  2. Lyla Captcha
  3. Gravatars
  4. Entry Smiles
  5. Comment Smiles
  6. Related Entries
  7. Popularity Meter
  8. Rating System
  9. StatCounter
  10. Google Analytics


More to come with next updaters.

 


Comments (0)| Print| Send | 1611 Views | 15% / 0% Popularity


Posted At : May 07, 2008 16:24 PM | Posted By : Ed Tabara
Related Categories: ColdFusion, My Projects, Other, Caching, 1ssBlog

"Smart Caching" is my try to make the caching process a little bit more inteligent and i've made it on the example of 1ssBlog. It allow the entries to be cached and de-cached automatically based on how often they are viewed.

How it work:
We set the period of time (1 day, 1 hour or 1 minute) and the number of unique views that should happen in that period of time in order the entry to get cached automatically.
So, if we set the period to 1 hour and the number of views to 30, then as soon as an entry will be viewd 30 times in a period of the specified length, the entry will get cached. But if after some time the entry will not get enough views in a period of specified length, the entry will de removed from the cache automaticaly.

Nice and easy, huh? But it make the caching process flexible.

I would like to hear of others think about it.


Comments (2)| Print| Send | 1582 Views | 15% / 14% Popularity