Error key doesn't exist

728 views
Skip to first unread message

Mehdi B

unread,
Apr 23, 2015, 1:45:12 PM4/23/15
to lu...@googlegroups.com
Got this strange error now while code runs without any issue on CF11

Message
stringkey [DEFAULTLANG] doesn't exist
StackTrace
stringkey [DEFAULTLANG] doesn't exist at lucee.runtime.type.util.StructSupport.invalidKey(Unknown Source):-1 at lucee.runtime.type.StructImpl.get(Unknown Source):-1 at app.core_cfc$cf.udfCall1(C:\lucee\tomcat\webapps\ROOT\app\core.cfc:202):202 at app.core_cfc$cf.udfCall(C:\lucee\tomcat\webapps\ROOT\app\core.cfc):-1 at lucee.runtime.type.UDFImpl.implementation(Unknown Source):-1 at lucee.runtime.type.UDFImpl._call(Unknown Source):-1 at lucee.runtime.type.UDFImpl.call(Unknown Source):-1 at lucee.runtime.ComponentImpl._call(Unknown Source):-1 at lucee.runtime.ComponentImpl._call(Unknown Source):-1 at lucee.runtime.ComponentImpl.call(Unknown Source):-1 at lucee.runtime.listener.ModernAppListener.call(Unknown Source):-1 at lucee.runtime.listener.ModernAppListener._onRequest(Unknown Source):-1 at lucee.runtime.listener.MixedAppListener.onRequest(Unknown Source):-1 at lucee.runtime.PageContextImpl.execute(Unknown Source):-1 at lucee.runtime.PageContextImpl.execute(Unknown Source):-1 at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(Unknown Source):-1 at lucee.loader.servlet.CFMLServlet.service(Unknown Source):-1 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727):727 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303):303 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241):241 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220):220 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122):122 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504):504 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170):170 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103):103 at mod_cfml.core.invoke(core.java:132):132 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950):950 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116):116 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421):421 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074):1074 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611):611 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314):314 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61 at java.lang.Thread.run(Thread.java:745):745

Lice 202 is called onRequestStart 

if( !structKeyExists( request, "lang" ) ) {
    
        request.lang = application.defaultLang;
}

I'm using framework one here and initialising the application. This variable is defaulted higher using on    public void function setupApplication()

param name = "application.defaultLang" default="fr"; 

So the variable should here have a default param and not throwing such error.

I've even setting in setupapplication 

      application.defaultLang="fr"

And still getting the error? 

The issue is solved if I set the param in onRequestStart.

It's like I'm unable to fetch default application variable.


This worked fine ON CF11 while lucee is throwing this error and tried my best to track it. Seem default param can't be used onRequestStart.

Any one faced this before? 

Jesse Shaffer

unread,
Apr 23, 2015, 2:06:36 PM4/23/15
to lu...@googlegroups.com
Haven't seen/used setupApplication - is that something added in ACF11?  If so, you might add a customized onApplicationStart for lucee:

public function onApplicationStart() {
   
if (!isNull(server.lucee)) {
        setupApplication
();
   
}
}

Or more simply, just rename your setupApplication to onApplicationStart...

Mehdi B

unread,
Apr 23, 2015, 2:13:07 PM4/23/15
to lu...@googlegroups.com
I'm using FW/1 here and it's in core.cfc framework startup.

Nope works fine in ACF10 and 11 so now mainly issue when running the same code. I ended up blaming the code there for default not run.

Michael Offner

unread,
Apr 23, 2015, 2:18:47 PM4/23/15
to lu...@googlegroups.com
Can you show the complete file?

Micha
--
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/9c070976-1fd1-459a-9b53-545495d98f29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mehdi B

unread,
Apr 23, 2015, 2:43:58 PM4/23/15
to lu...@googlegroups.com
I'm afraid I can't. Unless in private. 

It's a long file based on framework one core file. 

I already pointed the 2 function involved here. 

Mehdi
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.

Sean Corfield

unread,
Apr 23, 2015, 3:12:53 PM4/23/15
to lu...@googlegroups.com
I doubt this is really a Lucee issue so you’ll do better to bring this up on the FW/1 mailing list. Despite it working on ACF10/11, I suspect it’s likely to be a bug in your Application.cfc that just happened to work on ACF :)

Sean (author of FW/1 and successful user of FW/1 on Lucee :)

— 


Julian Halliwell

unread,
Apr 23, 2015, 3:28:34 PM4/23/15
to lu...@googlegroups.com
Try moving the code from onRequestStart() to setupRequest(). That's
where request initialisation operations should take place in FW/1.

Mehdi B

unread,
Apr 23, 2015, 4:04:16 PM4/23/15
to lu...@googlegroups.com
Notice the code check if the language is changed or setup so application.defaultlanguage is set.

We check session then url once none exists ( in this case the application just started) we grab the default value that is setup. I think this routine should remain onrequestStart as it language could be changed any time. While placing it on setup it would online be checked in init().

OK Sean been thinking about either posting here or in FW/1. As I back checked on CF11 it worked fine and I tried to remove a lot of back calls. Will be posting back in FW/1 group.

By the way Thanks for the great job on FW/1

Gert Franz

unread,
Apr 23, 2015, 4:29:34 PM4/23/15
to lu...@googlegroups.com
Quick question. Where is the application.defaultIang defined? In the body of the application.cfc? If so, I know what the problem is.

Gert

Sent from somewhere on the road
--
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.

Mehdi B

unread,
Apr 23, 2015, 6:17:17 PM4/23/15
to lu...@googlegroups.com
Application.cfc will extend app.core where we define the default in setup function before onrequeststat..

We default many other variables too but this one is triggering an error.

Mehdi

Sean Corfield

unread,
Apr 23, 2015, 6:22:45 PM4/23/15
to lu...@googlegroups.com
Folks, take this to the FW/1 list. This is not a Lucee issue, in my opinion.

Sean

Dawesi

unread,
Jun 6, 2016, 12:26:50 AM6/6/16
to Lucee, se...@corfield.org
I'm getting similar on Lucee admin page:

key [EN] doesn't exist (existing keys:)
StacktraceThe Error Occurred in
/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/resources/text.cfm: line 32 
called from /Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/web.cfm: line 136 
called from /Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/server.cfm: line 2 
Reply all
Reply to author
Forward
0 new messages