Confused: java.lang.NullPointerException CF9

167 views
Skip to first unread message

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 11:01:14 AM7/20/13
to ColdFusion Technical Talk

Can anyone give me some pointers as to where to look for the source or
maybe the solution to this problem please?

I'm confused - I am getting java.lang.NullPointerException error on a site
on a shared server, but not getting the error on other sites on that same
server. So presumably the error is something to do with the code on that
site.

But the error isnt happening on my dev environment, so maybe it's not my
code after all.

I've looked at all the notes I can find about this and can't see anyone
with my environment who's reporting that same error so I can compare notes
- at least as far as I can tell.

Our setup is:

Windows2003
CF9: 9,0,2,282541 Enterprise
Database: MSSQLServer2005

Here's my stack trace if it helps:

coldfusion.runtime.EventHandlerException: Event handler exception. at
coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:266)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349)
at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
coldfusion.filter.PathFilter.invoke(PathFilter.java:94) 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:62) 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) Caused by:
java.lang.NullPointerException



--
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356249

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 11:09:30 AM7/20/13
to ColdFusion Technical Talk

Without seeing any code we're just grasping at straws. My first guess is
that you have a mapping that's not set correctly, and a call to a CFC (or
perhaps an include) is not finding its target.

Sent from a mobile something
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356250

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 11:12:42 AM7/20/13
to ColdFusion Technical Talk

Thanks Matt. I dont use mappings so that rules that out. So I'll
check all my CFC calls and see if that points me to it.

Thanks.

My confusion came because none of the googling i did led to that as the
source. It's all about drivers and server versions and JVM etc. But none
of the other sites on that same box exhibit the problem.

If anyone has any other ideas as to what I can examine I'd be grateful.
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356251

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 12:12:46 PM7/20/13
to ColdFusion Technical Talk

Mike,

Your confusion is understandable. A NullPointerException is a generic error
(in a way) that is too specific - or perhaps I should say "symptomatic"
instead of being "causal". It's rather like saying "the patient has a
fever". Sure it's technically correct but it doesn't give you much more than
that. Why does he have a fever? Is he in love? Does he have pneumonia?
Dyspepsia? Was he bitten by Tse tse fly? You almost always have to dig a
bit deeper to understand the source of this error. I've seen it cause by
Javacasting, Db driver errors, the cfimage tag etc.

-Mark



Mark Kruger - CFG
CF Webtools
www.cfwebtools.com
www.coldfusionmuse.com
O:�402.932.3318
E:�mkr...@cfwebtools.com
Skype:�markakruger
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356252

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 3:13:21 PM7/20/13
to ColdFusion Technical Talk

> Can anyone give me some pointers as to where to look for the source or
> maybe the solution to this problem please?
>
> ...
>
> coldfusion.runtime.EventHandlerException: Event handler exception. at
> coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:266)
> at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349)
> at
> coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
> at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
> coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at
> coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at
> coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
> ...

I would look in your Application.cfc's onRequestStart event handler.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356253

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 3:17:00 PM7/20/13
to ColdFusion Technical Talk

I'm thinking something with the Application.cfc, based in the stack. Maybe
posting that we can help a bit further.

Can your host take a look at the exception.log to see if any additional
errors are being logged.

Byron Mann
Lead Engineer & Architect
HostMySite.com
On Jul 20, 2013 11:01 AM, "Mike K" <afpwe...@gmail.com> wrote:

>
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356254

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 8:50:55 PM7/20/13
to ColdFusion Technical Talk

One possibility in my Application.cfc onRequestStart method is
Timezone.cfc. I'm using that to convert time from UTC to my timezone.
But the timezone.cfc file I'm using is dated 2005. I seem to recall
there were changes made to the java related to time, and some people had
issues with timezone.cfc. But it's been rock solid for me and I'm using
it on lots of sites without problems.

Does anyone know if this could be the source of the problem? (Obviously
I'm going to get a new version and see if the problem goes away but I'd
rather know if there are still issues with timezone.cfc)

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com


On Sun, Jul 21, 2013 at 5:17 AM, Byron Mann <byron...@gmail.com> wrote:

>
> I'm thinking something with the Application.cfc, based in the stack. Maybe
> posting that we can help a bit further.
>
> Can your host take a look at the exception.log to see if any additional
> errors are being logged.
>
> Byron Mann
> Lead Engineer & Architect
> HostMySite.com
> On Jul 20, 2013 11:01 AM, "Mike K" <afpwe...@gmail.com> wrote:
>
--


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356255

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 10:11:51 PM7/20/13
to ColdFusion Technical Talk

I'd try sticking a <cfabort> at the end of OnRequestStart to see if you
get that far and then place it in the middle, then the middle again up
or down depending on the error being there or not, rinse and repeat etc
to find what is causing the error.

Kym
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356256

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 10:26:34 PM7/20/13
to ColdFusion Technical Talk

Hey Kym!! I thought you were going to the beach to put your feet up and
watch the sunrise nowadays. What are you doing here??

But thanks for the suggestion. As always, giving me a sensible, workable
solution that I ought to have done myself. But too stupid to do it.


On Sun, Jul 21, 2013 at 12:11 PM, Kym Kovan <dev-...@mbcomms.net.au>wrote:

>
> I'd try sticking a <cfabort> at the end of OnRequestStart to see if you
> get that far and then place it in the middle, then the middle again up
> or down depending on the error being there or not, rinse and repeat etc
> to find what is causing the error.
>
> Kym
>
>
> --
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356257

hofar...@houseoffusion.com

unread,
Jul 20, 2013, 11:17:11 PM7/20/13
to ColdFusion Technical Talk

On 21/07/2013 12:26 PM, Mike K wrote:
>
> Hey Kym!! I thought you were going to the beach to put your feet up and
> watch the sunrise nowadays. What are you doing here??

I'm only semi-retired and anyway writing code is my hobby :-)

I pack up and move north next weekend and for those folks living north
of the equator down here in Oz "moving north" means heading to the sun
and even hotter weather :-)

>
> But thanks for the suggestion. As always, giving me a sensible, workable
> solution that I ought to have done myself. But too stupid to do it.

Probably working all night again...


--

Yours,

Kym Kovan
mbcomms.net.au


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356258

hofar...@houseoffusion.com

unread,
Jul 22, 2013, 9:15:32 PM7/22/13
to ColdFusion Technical Talk

It looks like this problem is solved, because while it's been intermittent,
I haven't had the error for a couple of days.

So that means the problem was the timezone.cfc CFC by Paul Hastings. It's
an excellent component, but the version I had was old. It's been rock
solid for years and years, but something changed in the JVM and it gave
errors.

However the fix was easy - just download a current version and replace the
old version on the site.
The new version has updates from August 2010 and adds new methods too.

Problem apparently solved.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET <http://asp.net/> hosting from
AUD$15/month


On Sun, Jul 21, 2013 at 10:50 AM, Mike K <afpwe...@gmail.com> wrote:

> One possibility in my Application.cfc onRequestStart method is
> Timezone.cfc. I'm using that to convert time from UTC to my timezone.
> But the timezone.cfc file I'm using is dated 2005. I seem to recall
> there were changes made to the java related to time, and some people had
> issues with timezone.cfc. But it's been rock solid for me and I'm using
> it on lots of sites without problems.
>
> Does anyone know if this could be the source of the problem? (Obviously
> I'm going to get a new version and see if the problem goes away but I'd
> rather know if there are still issues with timezone.cfc)
>
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> Adobe Certified Advanced ColdFusion Developer
> AFP Webworks
> http://afpwebworks.com
>
>
>
>
--
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356277
Reply all
Reply to author
Forward
0 new messages