java.lang.ArrayIndexOutOfBounds resolved by restart

26 views
Skip to first unread message

Travis Peters

unread,
Feb 1, 2016, 12:01:35 PM2/1/16
to Lucee
Running Lucee 4.5.2.018-final-1446623531000 on Tomcat 8 in Windows 10

Rest requests resulted in java.lang.ArrayIndexOutOfBounds on this line:

        var p = new components.pricing();

First line of components/pricing.cfc:

component extends="application" {

Application.cfc as follows: 
component {

this.Name = "Lucee";
this.sessionManagement="Yes";
this.sessiontimeout=CreateTimeSpan(30,0,0,0);

function onRequestStart(string req){
if (listContainsNoCase(arguments.req, "rest", "/")){
var response = getPageContext().getResponse();
response.setHeader("Access-Control-Allow-Origin","*");
response.setContentType("application/json");
} else {
if (cgi.server_port_secure neq "1" && cgi.server_name neq "localhost"){
var new_url = ReplaceNoCase(cgi.request_url, "http://", "https://");
location(new_url, false);
}
}
}

}

Issue resolved by restarting the tomcat service.

Is this a known issue? 

Mark Drew

unread,
Feb 1, 2016, 12:02:33 PM2/1/16
to lucee
Why would you extend the Application.cfc in a component like that?? The pricing component isn’t part of the application lifecycle. 

Regards

Mark Drew

--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/253c1475-ff32-4efb-9dbd-a08b41833375%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Cameron

unread,
Feb 1, 2016, 12:11:52 PM2/1/16
to Lucee


On Monday, 1 February 2016 17:02:33 UTC, Mark Drew wrote:
Why would you extend the Application.cfc in a component like that?? The pricing component isn’t part of the application lifecycle. 


Indeed.

"pricing IS A application"? I doubt that very much.

I think that's something to look into, over and above whatever is actually going wrong. But I'd be more concerned about the app's architecture and a wayward array index, TBH.

Mark Drew

unread,
Feb 2, 2016, 5:12:28 AM2/2/16
to lucee
As an addendum, I don’t get the error, I just get a new component that extends Application with all the settings etc. 

If you get the error, try grabbing the stack trace as that will give us a clue to the error.  Also, I had to remove the check for SSL as I am not running SSL in my commandBox test. 

Regards

Mark Drew

On 1 Feb 2016, at 17:02, Mark Drew <mark...@gmail.com> wrote:

Why would you extend the Application.cfc in a component like that?? The pricing 
Reply all
Reply to author
Forward
0 new messages