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

getting Element DIST_NAME is undefined in FORM

Participant ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

I am getting below intermittent error in the coldfusion exception logs. when run the code, its working fine but for some users the below error is throwing. as per the exception.log from CF administrator. ( The variable form.DIST_NAME is exist and works fine when i run the file from the browser).

coldfusion.runtime.UndefinedElementException: Element DIST_NAME is undefined in FORM.

          at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1724)

          at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1677)

          at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1812)

          at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1805)

          at cfordersearchresultsReporting2ecfm1172240657._factor2(/opt/coldfusion9/apps/www/olpsales/ordersearchresultsReporting.cfm:105)

          at cfordersearchresultsReporting2ecfm1172240657._factor8(/opt/coldfusion9/apps/www/olpsales/ordersearchresultsReporting.cfm:103)

          at cfordersearchresultsReporting2ecfm1172240657.runPage(/opt/coldfusion9/apps/www/olpsales/ordersearchresultsReporting.cfm:1)

          at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)

          at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)

          at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

          at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363)

          at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)

          at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

          at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)

          at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)

          at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

          at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

          at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

          at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

          at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

          at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)

          at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)

          at coldfusion.CfmServlet.service(CfmServlet.java:200)

          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:286)

          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)

Views

1.4K

Translate

Translate

Report

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
Guide ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

It'll be because the element DIST_NAME is undefined in FORM.

Why not put in a structKeyExists with some error handling? There's nothing anyone on here will really be able to tell you.

Votes

Translate

Translate

Report

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
LEGEND ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

It'll be because the element DIST_NAME is undefined in FORM.

Why not put in a structKeyExists with some error handling? There's nothing anyone on here will really be able to tell you.

Well: quite.  As dismissive as this sounds, it's about as sensible a comment as one can make based on the question.

I am getting below intermittent error in the coldfusion exception logs. when run the code, its working fine but for some users the below error is throwing. as per the exception.log from CF administrator. ( The variable form.DIST_NAME is exist and works fine when i run the file from the browser).

OK, so what you've established is that via the path through the logic that you think is taking place, there is no problem.  So there's probably no need to investigate that path.

You need to find the path through the logic that does have the problem, and deal with that.

Putting a try/catch around the code and logging some metrics as to what the request is doing, what its referer was and the like might cast some light on the scene.

But there's no point in dwelling on the part of the code that is working OK, and telling us about that bit.  That's not the bit you need to concern yourself with.

First verify all the references to ordersearchresultsReporting.cfm in your code or on your website, or on Google (in case it's been indexed at some point), and work out what other logical path(s) can be taken to that file, and test all of those.  Clearly one of them ain't working.

--

Adam

Votes

Translate

Translate

Report

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
LEGEND ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

What's probably happening is that someone has the ordersearchresultsReporting.cfm page bookmarked.  Owain's suggestion of using a structkeyexists will work.  Or, since there is always more than one way to do something, you could check the value of the cgi.http_referrer variable.

Votes

Translate

Translate

Report

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
Participant ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

yes I know that people may be added link to favourites. but users sent the screenshot of the error and in that i can clearly able to see the referrer  which is the form page only (i mean from the previous page).

Votes

Translate

Translate

Report

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
LEGEND ,
Apr 09, 2012 Apr 09, 2012

Copy link to clipboard

Copied

LATEST

If the http referrer is not the problem, it might be something that I have actually observed.  We had a situation for awhile where the form would be submitted and processed.  Then there would be another page request, but without the form scope.  You would have to check your http logs to see if that is happening in your case.

We never figured out what was causing that, but it appears to not be happening anymore.

If you just want to solve the problem, Owain's suggestion is still valid.

Votes

Translate

Translate

Report

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
Documentation