OrangeG
OrangeG

Reputation: 169

Adobe Coldfusion Error : Application could not be found. null <br>The error occurred on line -1

We have placed a code snippet into the application.cfc , to dispatch an email with error information in case there's something wrong with our application. We sometimes receive the error struct, as shown at the attached screenshot. Really this says almost nothing. The only thing that I can see there is the template which is /api (and sometimes it could be returned as /rest also) , however this folder does not exist on the server.

Any idea what this could be ?

enter image description here

Upvotes: 1

Views: 896

Answers (1)

GunterO
GunterO

Reputation: 419

Which version of ColdFusion are you running? Looks like 2016 or 2018.

Try to comment out this in your \cfusion\wwwroot\WEB-INF\web.xml file.

From this:

<servlet-mapping id="coldfusion_mapping_16">
    <servlet-name>CFRestServlet</servlet-name>
    <url-pattern>/api/*</url-pattern>
</servlet-mapping>

To this:

<!--
<servlet-mapping id="coldfusion_mapping_16">
    <servlet-name>CFRestServlet</servlet-name>
    <url-pattern>/api/*</url-pattern>
</servlet-mapping>
-->

the actual mapping (coldfusion_mapping_16) could be different. Look for the "/api/*".
Search for the "/rest/*" section, and comment it out as well.
Don't forget to restart the ColdFusion service.
This should fix the problem.

EDIT: Searched a bit for this problem, and found a similar issue with some background info & solutions: ColdFusion 2016: Can you have a folder in your web root named 'api' or 'rest'?

Upvotes: 1

Related Questions