Best way to debug?

19 views
Skip to first unread message

Göran

unread,
Oct 17, 2009, 7:14:38 PM10/17/09
to ColdBox Platform
What is the best way to debug an application that shows no useful
error messages?
I had a working app on openBD, Tomcat, vmWare Ubuntu Server and
migrated it to a real server and got this errors. It should be
identical installations. The only big difference is that the real
server is on a 64-bit OS.

I got this message:

Oops! Exception Encountered
Application Execution Exception
Error Type: Application : [N/A]
Error Messages:

Tag Context:
ID: CFFUNCTION
LINE: 54
Template: /opt/tomcat/webapps/openbd/Application.cfc
ID: CFIF
LINE: 64
Template: /opt/tomcat/webapps/openbd/Application.cfc
ID: CFSET
LINE: 65
Template: /opt/tomcat/webapps/openbd/Application.cfc
ID: CFFUNCTION
LINE: 106
Template: /opt/tomcat/webapps/openbd/coldbox/system/coldbox.cfc
ID: CFLOCK
LINE: 116
Template: /opt/tomcat/webapps/openbd/coldbox/system/coldbox.cfc
ID: CFTRY
LINE: 117
Template: /opt/tomcat/webapps/openbd/coldbox/system/coldbox.cfc
ID: CFIF
LINE: 157
Template: /opt/tomcat/webapps/openbd/coldbox/system/coldbox.cfc
ID: CFELSE
LINE: 160
Template: /opt/tomcat/webapps/openbd/coldbox/system/coldbox.cfc
ID: CFSET
LINE: 163
Template: /opt/tomcat/webapps/openbd/coldbox/system/coldbox.cfc
ID: CFFUNCTION
LINE: 365
Template: /opt/tomcat/webapps/openbd/coldbox/system/controller.cfc
ID: CFIF
LINE: 420
Template: /opt/tomcat/webapps/openbd/coldbox/system/controller.cfc
ID: CFELSE
LINE: 433
Template: /opt/tomcat/webapps/openbd/coldbox/system/controller.cfc
ID: CFIF
LINE: 436
Template: /opt/tomcat/webapps/openbd/coldbox/system/controller.cfc
ID: CFELSE
LINE: 442
Template: /opt/tomcat/webapps/openbd/coldbox/system/controller.cfc
ID: CFINVOKE
LINE: 444
Template: /opt/tomcat/webapps/openbd/coldbox/system/controller.cfc
ID: CFFUNCTION
LINE: 11
Template: /opt/tomcat/webapps/openbd/handlers/ehSecurity.cfc
ID: CFIF
LINE: 15
Template: /opt/tomcat/webapps/openbd/handlers/ehSecurity.cfc
ID: CFFUNCTION
LINE: 57
Template: /opt/tomcat/webapps/openbd/model/managers/Security.cfc
ID: CFSET
LINE: 61
Template: /opt/tomcat/webapps/openbd/model/managers/Security.cfc
ID: CFFUNCTION
LINE: 13
Template: /opt/tomcat/webapps/openbd/model/managers/User.cfc
ID: CFSET
LINE: 15
Template: /opt/tomcat/webapps/openbd/model/managers/User.cfc
ID: CFFUNCTION
LINE: 584
Template: /opt/tomcat/webapps/openbd/transfer/com/Transfer.cfc
ID: CFSCRIPT
LINE: 587
Template: /opt/tomcat/webapps/openbd/transfer/com/Transfer.cfc
ID: CFFUNCTION
LINE: 124
Template: /opt/tomcat/webapps/openbd/transfer/com/sql/SQLManager.cfc
ID: CFSCRIPT
LINE: 132
Template: /opt/tomcat/webapps/openbd/transfer/com/sql/SQLManager.cfc
ID: CFFUNCTION
LINE: 100
Template: /opt/tomcat/webapps/openbd/transfer/com/sql/
TransferGateway.cfc
ID: CFQUERY
LINE: 120
Template: /opt/tomcat/webapps/openbd/transfer/com/sql/
TransferGateway.cfc

Göran

unread,
Oct 17, 2009, 9:08:18 PM10/17/09
to ColdBox Platform
To test one frame work at a time I started to debug Transfer, and have
instanziated a transfer object and imediatley got an error. But not on
my 32-bit OS.


Open BlueDragon Internal Server Error
The page you were executing caused an internal Open BlueDragon server
error
Request /usertest.cfm
File Trace /opt/tomcat/webapps/openbd/usertest.cfm
|
+-- /opt/tomcat/webapps/openbd/transfer/com/Transfer.cfc
|
+-- /opt/tomcat/webapps/openbd/transfer/com/dynamic/
DynamicManager.cfc
|
+-- /opt/tomcat/webapps/openbd/transfer/com/dynamic/
TransferPopulator.cfc
|
+-- /opt/tomcat/webapps/openbd/transfer/com/sql/
SQLManager.cfc
|
+-- /opt/tomcat/webapps/openbd/transfer/com/sql/
TransferSelecter.cfc
|
+-- /opt/tomcat/webapps/openbd/transfer/com/sql/
QueryExecution.cfc

Type Internal
Function(s) get
Tag Context CFSET: Line=26; Column=1
|
+-- CFFUNCTION: Line=95; Column=1
|
+-- CFTRY: Line=105; Column=2
|
+-- CFIF: Line=110; Column=3
|
+-- CFLOCK: Line=111; Column=4
|
+-- CFSCRIPT: Line=112; Column=4
|
+-- CFFUNCTION: Line=68; Column=1
|
+-- CFSCRIPT: Line=71; Column=2
|
+-- CFFUNCTION: Line=42; Column=1
|
+-- CFSCRIPT: Line=46; Column=2
|
+-- CFFUNCTION: Line=82; Column=1
|
+-- CFSCRIPT: Line=86;
Column=2
|
+-- CFFUNCTION: Line=42;
Column=1
|
+-- CFSCRIPT: Line=46;
Column=2
|
+-- CFFUNCTION:
Line=64; Column=1
|
+-- CFLOOP:
Line=78; Column=2
|
+--
CFQUERY: Line=80; Column=3
Source

77: </cfscript>
78: <cfloop from="1" to="#len#" index="counter">
79: <cfset evaluation = queryCollection[counter] />
80: <cfquery name="queryValue" datasource="#getDataSource().getName
()#" username="#getDataSource().getUsername()#"
password="#getDataSource().getPassword()#">
81: <cfset eLen = ArrayLen(evaluation) />

^ Snippet from underlying CFML source

Luis Majano

unread,
Oct 17, 2009, 9:36:30 PM10/17/09
to col...@googlegroups.com
Hmm have you posted on the Transfer list. I don't know if transfer
runs on open bd

--
Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Göran

unread,
Oct 17, 2009, 9:50:23 PM10/17/09
to ColdBox Platform
I developed my app on a vmWare Ubuntu Server with OpenBD, Apache,
Tomcat, and everything is working perfect including Transfer. But when
i migrate it to our production server I got this transfer errors. I
will check the transfer list.

Göran

unread,
Oct 17, 2009, 11:56:24 PM10/17/09
to ColdBox Platform
I need to find a quick solution to this problem. What would be easiest
to do, replace transfer with cfquerys or another ORM, and if - which
ORM?

br...@bradwood.com

unread,
Oct 18, 2009, 12:13:44 AM10/18/09
to col...@googlegroups.com

So I see the stack trace, but where's the error message? I'm not
familiar with Transfer, but what is line 120 of TransferGateway.cfc
doing? What if you put a try catch around it and cfdump the error
struct? It looks like a cfquery tag from the stack. Are you
datasources configured correctly? Are the passwords correct? Run a
trace on the database. Is the query itself erroring or is the SQL never
making it past the JDBC drivers?

We really can't help you without you doing some legwork and finding out
what the actual error is. That, and the fact that the error looks like
it has nothing to do with ColdBox and this is a ColdBox list. All I can
suggest are try/catches, cfdumps, and the ColdBox logger plugin.

Good Luck.

~Brad

-------- Original Message --------
Subject: [coldbox:3379] Best way to debug?
From: Göran <go...@mobilevillage.se>
Date: Sat, October 17, 2009 6:14 pm
To: ColdBox Platform <col...@googlegroups.com>


What is the best way to debug an application that shows no useful
error messages?
I had a working app on openBD, Tomcat, vmWare Ubuntu Server and
migrated it to a real server and got this errors. It should be
identical installations. The only big difference is that the real
server is on a 64-bit OS.

I got this message:

Oops! Exception Encountered
Application Execution Exception
Error Type: Application : [N/A]
Error Messages:

Tag Context:
ID: CFFUNCTION
LINE: 54
Template: /opt/tomcat/webapps/openbd/Application.cfc

...

Göran

unread,
Oct 18, 2009, 7:59:07 AM10/18/09
to ColdBox Platform
Yes I have checked and tested the db sources, I can run cfquerys. I
will try your sugestions, thanks!

OpenBD says the error is on line 80:

CFQUERY: Line=80; Column=3
Source

77: </cfscript>
78: <cfloop from="1" to="#len#" index="counter">
79: <cfset evaluation = queryCollection[counter] />
80: <cfquery name="queryValue" datasource="#getDataSource
().getName
()#" username="#getDataSource().getUsername()#"
password="#getDataSource().getPassword()#">
81: <cfset eLen = ArrayLen(evaluation) />

Göran

unread,
Oct 18, 2009, 8:15:24 AM10/18/09
to ColdBox Platform
Ok! I tried the try/catch round usertest.cfm and got nothing useful:

Snippet (cfdump):

struct
column 1
detail [empty string]
errorcode [empty string]
extendedinfo [empty string]
line 80
message [empty string]

tagname CFQUERY
template /opt/tomcat/webapps/openbd/transfer/com/sql/
QueryExecution.cfc
type Application

Luis Majano

unread,
Oct 18, 2009, 1:14:12 PM10/18/09
to col...@googlegroups.com
Well looks like open bd needs better error handlng to show more
meaningful stuff. Try Railo

br...@bradwood.com

unread,
Oct 19, 2009, 12:08:49 AM10/19/09
to col...@googlegroups.com
Or ahem... Adobe ColdFusion. There's a reason you pay for it. lol

Seriously though, that error message is about as useless as it gets.
This is what I do when I have to debug blindly: Take the erroring code,
and a working example. Now, slowly start changing the broken code to
match the working code line by line until it starts working. STOP! The
last think you changed was (one of) the problem(s).

For you, first dump every piece of information necessary for you to
reproduce the cfquery (user name, password, SQL, data source, etc) and
paste it all into an empty test file with nothing but the final values
plugged in and see if that works. Your goal is to strip the erroring
code down to the bare bones so you can reproduce the error in the
simplest possible way. (The OpenBD people will also appreciate this
when you post this bug to their mailing list. hint hint) If the query
still fails all by itself (and still refuses to give you a useful error
message) then slowly change everything to look like one of your working
cfquery examples until it starts working.

The error is probably some arcane JDBC error or something. Also, did
you run that trace I suggested? Based on the rest of your stack you're
probably using MySQL and I really don't know what your options are.
This might help:
http://dev.mysql.com/doc/refman/5.0/en/making-trace-files.html

I can try to help you more, but seriously this thread needs to move on
over to the OpenBD list. One of them might already be aware of what
your problem is and can help you fix it.
http://www.openbluedragon.org/mailinglist.cfm

br...@bradwood.com

unread,
Oct 19, 2009, 12:09:04 AM10/19/09
to col...@googlegroups.com
Or ahem... Adobe ColdFusion. There's a reason you pay for it. lol

Seriously though, that error message is about as useless as it gets.
This is what I do when I have to debug blindly: Take the erroring code,
and a working example. Now, slowly start changing the broken code to
match the working code line by line until it starts working. STOP! The
last think you changed was (one of) the problem(s).

For you, first dump every piece of information necessary for you to
reproduce the cfquery (user name, password, SQL, data source, etc) and
paste it all into an empty test file with nothing but the final values
plugged in and see if that works. Your goal is to strip the erroring
code down to the bare bones so you can reproduce the error in the
simplest possible way. (The OpenBD people will also appreciate this
when you post this bug to their mailing list. hint hint) If the query
still fails all by itself (and still refuses to give you a useful error
message) then slowly change everything to look like one of your working
cfquery examples until it starts working.

The error is probably some arcane JDBC error or something. Also, did
you run that trace I suggested? Based on the rest of your stack you're
probably using MySQL and I really don't know what your options are.
This might help:
http://dev.mysql.com/doc/refman/5.0/en/making-trace-files.html

I can try to help you more, but seriously this thread needs to move on
over to the OpenBD list. One of them might already be aware of what
your problem is and can help you fix it.

~Brad

Göran

unread,
Oct 23, 2009, 5:43:27 AM10/23/09
to ColdBox Platform
Follow up. I skiped to run the trace and debugging and went for my
first thought.
The cause of the error was as I suspected first, the 64-bit Java
verison on our production server. The only difference on dev and prod
server was the Java versions. So the simple solution was to download a
32-bit java bin, compile it and change the catalina path in Tomcat. So
now Transfer is working, case closed.

Thanks for your help!

br...@bradwood.com

unread,
Oct 23, 2009, 12:11:00 PM10/23/09
to col...@googlegroups.com

I'm glad you got that working, but it's too bad you had to sacrifice
your 64-bit Java. I'm really curious if the OpenBD or Transfer people
know this is an issue. They might have had a work around-- or at least
want to fix it.

Matt Quackenbush

unread,
Oct 23, 2009, 12:29:42 PM10/23/09
to col...@googlegroups.com
AFAIK, Transfer does not "officially" support OpenBD at all.

br...@bradwood.com

unread,
Oct 23, 2009, 12:55:25 PM10/23/09
to col...@googlegroups.com
Well then, that could be a problem :)

~Brad

Reply all
Reply to author
Forward
0 new messages