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

ORA-00900: invalid SQL statement (ColdFusion/Java)

Participant ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

I found a bunch of topics on this subject, but none seem to exactly be doing what is going on for me.

I have a ColdFusion/Java routine that displays funding requests that need to be approved. When you click on the action button, you can either approve or disapprove. When the user presses the button, I get the error message via e-mail with a copy of the trace. It shows me the statement that isn't valid. I copy it and run it in SQL*Plus on my Production database. It returns the row expected. How can that be? Confused.

Here is the trace [link]https://dl.dropboxusercontent.com/u/3594970/1244Err.txt

Oracle 11g on a Windows server

Views

830

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

correct answers 1 Correct answer

Participant , Oct 08, 2014 Oct 08, 2014

Removed the extra characters (PM User in my code example) and the error went away.

Votes

Translate

Translate
Community Expert ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

The cause is self evident, and the stack trace repeats it more than a dozen times: invalid SQL statement.

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 ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

Understood... I copied the statement and ran in SQL*Plus and it returned the proper results.  How can that be an invalid statement?   It ran successfully prior to last week and now, after solving the getBuiltInScopes() issue, this was hiding behind it.   Adding my e-mail address in Application.cfc got me this stack trace, which wasn't happening prior. 

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 ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

Could you show us the code? The SQL statement is of course different from the Coldfusion query code.

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 ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

<cfquery name="getapprovaldetails" datasource="#datasource#">PM User

SELECT * FROM auth_fundreqdoc WHERE docid = #url.docid#

</cfquery>

In the stack trace, it shows the proper docid.  The Pm User up there is a person's name.  I removed it here and changed it to xxxxx in the stack trace.

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 ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

I just checked an older copy of the code.  That PM User name may be the issue.  It's not in the older code, but it's in this other version.  I will remove it and see if that clears things up.

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 ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

LouieWarren wrote:

The Pm User up there is a person's name.

An obvious error. It shouldn't be there.

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 ,
Oct 08, 2014 Oct 08, 2014

Copy link to clipboard

Copied

LATEST

Removed the extra characters (PM User in my code example) and the error went away.

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