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

[CF8] java.lang.NullPointerException

New Here ,
Oct 02, 2007 Oct 02, 2007

Copy link to clipboard

Copied

Hello,

On my CF8 web host, I sometimes get strange java.lang.nullpointerexceptions errors. All my code works flawless since the year 2000. The same pages do work but sometimes, maybe 1 out of 30 try's, the error appears again. First I thought it was a session problem or a problem with Application.cfm. But I stripped those down and it even happens with simple queries. I think it has to do with queries or MySQL 5.

Has anyone encountered this error? The system says "The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code." But I have all my values defined and it is not a programming error. It is more like a server configuration error I guess.



The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.

Null Pointers are another name for undefined values.
500

ROOT CAUSE:
java.lang.NullPointerException
at com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178)
at coldfusion.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)
at coldfusion.sql.Executive.executeQuery(Executive.java:1229)
at coldfusion.sql.Executive.executeQuery(Executive.java:1008)
at coldfusion.sql.Executive.executeQuery(Executive.java:939)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:325)
at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521)
at cfhetkoor2ecfm251397670.runPage(E:\westlandkoorconcordia.nl\wwwroot\hetkoor.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
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.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.NullPointerException
at com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178)
at coldfusion.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)
at coldfusion.sql.Executive.executeQuery(Executive.java:1229)
at coldfusion.sql.Executive.executeQuery(Executive.java:1008)
at coldfusion.sql.Executive.executeQuery(Executive.java:939)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:325)
at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521)
at cfhetkoor2ecfm251397670.runPage(E:\westlandkoorconcordia.nl\wwwroot\hetkoor.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
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.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)
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Text

Views

49.5K

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
New Here ,
Jun 22, 2008 Jun 22, 2008

Copy link to clipboard

Copied

Previously, I was using ColdFusion 6.1 and I'm sure an older version of mySQL. I transferred hosting to dailyrazor with ColdFusion 8 as my host and am getting the error:

quote:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.

Null Pointers are another name for undefined values.
500

ROOT CAUSE:
java.lang.NullPointerException



When I refresh the page the error goes away for a while. Then it comes back after a while. It happens on all sorts of pages and it never happened before I migrated the site to the new host.

quote:

Originally posted by: dennis longnecker
Anyone have any insights into this? I am using dailyrazor as my host and am getting the error, exactly as described. Once in a while..refresh works fine...

java.lang.NullPointerException
at com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178)
at coldfusion.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)
at coldfusion.sql.Executive.executeQuery(Executive.java:1276)
at coldfusion.sql.Executive.executeQuery(Executive.java:1008)
at coldfusion.sql.Executive.executeQuery(Executive.java:939)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:325)
at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521)



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
Guest
Jun 28, 2008 Jun 28, 2008

Copy link to clipboard

Copied

We are experiencing the same issue on Crystaltech shared ColdFusion hosting. From reviews of the Crystaltech forum, this issue seems to have cropped up since the upgrade to CF8.1? This is a serious issue. It is crippling for sites with heavy data input capabilities, because the error forces the user to re-enter all the information from the submitting page. I've created a workaround cftry/cfcatch, but this only works effectively for display pages. Any form submission page which generates the error loses all the form data. Unacceptable.

Adobe? Hello? Help us out here.

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
Explorer ,
Jul 17, 2008 Jul 17, 2008

Copy link to clipboard

Copied

I am having this same error
=================================
java.lang.NullPointerException at com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178) at coldfusion.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214) at... etc... etc..
=================================

Is there any help on this topic? Adobe? Please?

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
Guest
Aug 11, 2008 Aug 11, 2008

Copy link to clipboard

Copied

We are having the same issues in our shop. We are running CF 8 on Solaris using Oracle as the database. The error and the inconsistency of the error is exactly how you describe. It started happening immediately after the upgrade.

Has Adobe provided any guidance on this yet?

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
New Here ,
Sep 08, 2008 Sep 08, 2008

Copy link to clipboard

Copied

i have the same problem on a daily razor server. every now and then it throws a 500 error for no reason. saying there is a problem with either some system code or programming code.

then when i refresh its fine :S

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
Explorer ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

Hey all,

The only way I found to solve this problem thus far was to go into the Data Source Menu in the CF Admin and UNCHECK the "Maintain Connections" check box (in the Advanced settings). I know it is said this may cause other issues but I have not see any since I made the change to several virtual host account DSN's. So far it's worked great for me. You'll be the better judge in each of your different circumstances. I hope this helps cause nothing else I've tried to this point has.

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
Community Expert ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

In the settings page in the Coldfusion Administrator for that particular datasource, choose to Show Advanced Settings. In the Connection String field, enter: autoReconnectForPools=true

Press Submit to register the change. Does it solve the problem?


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
Community Beginner ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

I already had something in the connection string, so I tried to add another, with a semi-colon in between and am getting:

zeroDateTimeBehavior=convertToNull;autoReconnectForPools=true

Warning: gyro4_content: java.sql.SQLException: The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'convertToNull;autoReconnectForPools=true' is not in this set.

Is a semi-colon not the value for multiple entries?

If I uncheck this value, it 'solves' the problem, but I was reading about the possible performance issues with it:

"Maintain connections across client requests"

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
Community Expert ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

zeroDateTimeBehavior='convertToNull';autoReconnectForPools=true

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
Community Expert ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

Oh, and ensure "Maintain connections across client requests" is checked.


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
Community Beginner ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

The Plesk control panel still doesn't like that:

zeroDateTimeBehavior='convertToNull';autoReconnectForPools=true

Warning: gyro4_content: java.sql.SQLException: The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value ''convertToNull';autoReconnectForPools=true' is not in this set.

I'll have to check into whats different about plesk.

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
Explorer ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

Try an ampersand....I believe these are like URL params:

zeroDateTimeBehavior=convertToNull&autoReconnectForPools=true

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 ,
Jun 19, 2008 Jun 19, 2008

Copy link to clipboard

Copied

try zeroDateTimeBehavior=convertToNull&autoReconnectForPools=true ?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

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
Community Expert ,
Jun 20, 2008 Jun 20, 2008

Copy link to clipboard

Copied

.. if it still complains, then slap it with

autoReconnectForPools=true;zeroDateTimeBehavior=convertToNull
or
autoReconnectForPools=true&zeroDateTimeBehavior=convertToNull

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
Community Beginner ,
Jun 20, 2008 Jun 20, 2008

Copy link to clipboard

Copied

DOesn't accept the first format..same error message as before. When I try the second one, my code bombs because of the null date issue, so it is not converting it to null.

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
Community Expert ,
Jun 20, 2008 Jun 20, 2008

Copy link to clipboard

Copied

Do you mean that

zeroDateTimeBehavior=convertToNull

and

autoReconnectForPools=true

work, but

autoReconnectForPools=true&zeroDateTimeBehavior=convertToNull

fails?


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
Community Beginner ,
Jun 20, 2008 Jun 20, 2008

Copy link to clipboard

Copied

zeroDateTimeBehavior=convertToNull fixes a error with zerodate's, but I have the connection issue.

autoReconnectForPools=true fixes the connection problem, but I have the zerodate issue.

autoReconnectForPools=true&zeroDateTimeBehavior=convertToNull I have both the connection isse and the zerodate problem. Its like its not doing either...but then it doesn't complain about it as a value either.

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
Community Expert ,
Jun 21, 2008 Jun 21, 2008

Copy link to clipboard

Copied

Quite odd. What if you apply no connection string in the administrator, but do the following instead.

Open the file {CF_installation_dir}/lib/neo-datasource.xml in a text editor. (Make a back-up). Locate the URL(s) which correspond to the datasources to which you want to apply the connection string.

Suppose one such URL is

jdbc:mysql://127.0.0.1:3306/my_orders?

Modify the line to

jdbc:mysql://127.0.0.1:3306/my_orders?autoReconnectForPools=true&zeroDateTimeBehavior=convertToNull

Restart Coldfusion.


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
New Here ,
Jul 16, 2008 Jul 16, 2008

Copy link to clipboard

Copied

Well, I have decided to stop with ColdFusion. Always troubles. Isn't it for these errors, then there is trouble with the hosting company's (control panel) or finding the right hosting company.

The developing with CF time may be lower, but errors like these and setup of the DB and environment at the hoster take much longer. Probably the latter is the hosters fault, but with my host (who uses Helm and CF8) I always have to beg them to make CF8 things for me, like DSN's and Sandbox security, because I cannot do it myself in the control panel. And even then, I will get strange errors like the null exception error. Also, CF hangs many more times then ASP and PHP on the same servers (at my Host).

Not anymore. I have switched to PHP.

Goodbye all!

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
New Here ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

Same problem for us - detailed description is at (created before I found this thread):

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=1391203&high...

Unchecking "maintain connections" is not a viable solution for us. We have a very heavy database environment.

Does anyone else have a solution?

Has anyone with a support contract reported it to Adobe? What's their answer.

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
New Here ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

It is unbelievable that Macromedia or Adobe hasn't done anything about this bug. This serious bug is now almost a year present!

ColdFusion is worthless while this bug stays in it. Even the most simple query throws the error now and then. Like someone else said, usually after a period of inactivity.

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
New Here ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

By the way, my nick says junior member, but I am here since 1998 (under antoher nick, for which I don't have the email address/password anymore).

Anyway, after 1 year waiting for a solution from Adobe that didn't come, finally, after 10 years, I abandoned ColdFusion and I switched to PHP.

So Adobe, what are you gonna do? Fix this bug? If not, maybe it is better to stop with ColdFusion at all?

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
Explorer ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

I completely understand the frustration. It is a pain and to date I have yet to see a fix or any real help. This issue and an alternative to Dreamweaver (that's not CFEclipse) is what I have been asking Adobe to help CF developers out with for some time. I miss Homesite. 😉

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
Community Expert ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

Let's follow another strategy. Run the following query on the MySQL database

show variables;

What value do you get for wait_timeout and for interactive_timeout ? Each has a default value of 28800, that is, 8 hours, converted into seconds.

Is either of the values much lower for your MySQL server? If so, increase it or have it increased. You can do so, for example, by adding the line

wait_timeout=28800

or the line

interactive_timeout=28800

or both to the [mysqld] section of the my.ini configuration file. Restart the MySQL server for the changes to take effect.



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
New Here ,
Sep 09, 2008 Sep 09, 2008

Copy link to clipboard

Copied

quote:

What value do you get for wait_timeout and for interactive_timeout ? Each has a default value of 28800, that is, 8 hours, converted into seconds.




This is a new server using Red Hat, default installation and values - both wait_timeout and internactive_timeout are 100 (not 28800). I'll change these values and do some testing and report back.

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