Sharing session between applications: error when renaming in application.cfc (ColdBox 4, ACF 2016)

瀏覽次數:57 次
跳到第一則未讀訊息

daltec

未讀,
2018年5月4日 上午11:40:562018/5/4
收件者:ColdBox Platform
Hello all, I wish to share session data between some apps that reside on different subdomains. In the past I would make sure each application's application.cfc had the same app name, and this has been working for a while. These are legacy apps and do not use ColdBox.

I set up ColdBox 4 running on ACF 2016 on my dev machine, and changing the application name from the default "this.name = hash( getCurrentTemplatePath() );" to "this.name = 'mysite;" works fine. However, when I upload the same code to production (also ACF 2016), I get the following error:

Element CBBOOTSTRAP is undefined in a Java object of type class [Ljava.lang.String;. 


The error occurred in application.cfc: line 50

48 : public boolean function onRequestStart( string targetPage ){ 49 : // Process ColdBox Request 50 : application.cbBootstrap.onRequestStart( arguments.targetPage ); 51 : 52 : return true;

Changing the application name back to "this.name = hash( getCurrentTemplatePath() );" means the app runs fine (but session is not shared).

Any clues? I've read several posts that deal with this general issue, but none that directly address this particular error. I am not using any mappings or anything -- everything is
right there in the webroot (changing that is a topic for another day!).

In case it helps, here is my production server:

Server Details
Server Product ColdFusion
Version 2016,0,03,300466
Edition Enterprise  
Operating System Windows Server 2012 R2  
OS Version 6.3  
Update Level /C:/ColdFusion2016/cfusion/lib/updates/chf20160003.jar  
Adobe Driver Version 5.1.4 (Build 0001)  
Tomcat Version 8.0.32.0  


JVM Details
Java Version 1.8.0_72  
Java Vendor Oracle Corporation  
Java Vendor URL http://java.oracle.com/  
Java Home C:\ColdFusion2016\jre  
Java File Encoding Cp1252  
Java Default Locale en_US  



And on dev, it's ACF 2016,0,06,308055 on OS X 10.12.6. My JVM is 1.8.0_25. I'd appreciate any help at all! I have tried changing several lines of code, but I keep getting that same error and it all seems to stem from changing the application name from the default.

Thanks in advance!!

Brad Wood

未讀,
2018年5月4日 中午12:25:182018/5/4
收件者:col...@googlegroups.com
Try running applicationStop().  I assume what's happened is you've changed the app name midstream and lost your old application scope without running the onApplicationStart() to put everything back.

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+unsubscribe@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/3e91b02e-d273-4d54-baaf-7f99caa8157e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

daltec

未讀,
2018年5月4日 中午12:41:492018/5/4
收件者:ColdBox Platform
Thanks Brad! I restarted ColdFusion itself and am still getting the same error. I've also reinited the app via the URL several times. Is there something else I need to be doing? Thanks, I appreciate the help!

daltec

未讀,
2018年5月4日 下午5:46:362018/5/4
收件者:ColdBox Platform
Just to follow on, I  have not done any "installation" or anything on our production server -- I just copied the whole shooting match from dev up to the repository, and from there to production. The entire coldbox structure was copied and is in webroot, but is there perhaps something I may have missed? I am just at a loss as to why it would work on one server, but totally fail on another, when all I am doing is just trying to change the application name.

Thanks a lot!


On Friday, May 4, 2018 at 12:25:18 PM UTC-4, Brad Wood wrote:
回覆所有人
回覆作者
轉寄
0 則新訊息