Copy link to clipboard
Copied
Greetings,
I’m having a problem setting up the server portion of the CFBuilder plugin for VS Code. FWIW, I am running CF2023 using CommandBox on my MacBook Air.
What I’m trying to do is set up the sever section of the plugin. In the local server settings, I enter what I thought was the path to server, but I get the following message: Invalid server home
When I go into the terminal and type box server info --verbose it gives me
Server Home:
/Users/larryclyons/.CommandBox/server/E898FE23BF702162F22CB024B4F4187B-dataTables_CF5090/adobe-2023.0.15.330825
which I assume is the path to the server. Or so I thought.
I’m not sure what I’m doing wrong in this case, Any suggestions on getting this resolved will be very appreciated.
Hello Larry,
Can you please try adding as mentioned below and let us know if it works.
/Users/larryclyons/.CommandBox/server/E898FE23BF702162F22CB024B4F4187B-dataTables_CF5090/adobe-2023.0.15.330825/WEB-INF/cfusion
Please make sure you select Appliction Server as Other
Thanks & Regards
Ravi
Hey Larry, I totally appreciate that the problem is solved for you with Ravi's solution using "other".
As for my proposed solution, and what failed for you, I think I know why. I offer this as much for others who may find this thread.
I found I was able to experience your challenge if the closing slash on the "server home" field was missing. The response is immediate, while editing a CFB "server" configured this way. (Curiously, the slash is NOT needed if empty jvm.config is there when you f
...Copy link to clipboard
Copied
Hey, Larry. Long time, no talk. I offer the solution here:
Briefly, you'd want to point cfb at the WEB-INF/cfusion/ within that Commandbox server location (the closing slash is important), then most important note that cfb is expecting to find a jvm.config file there (which Commandbox does not require).
Just create an empty jvm.config there, which gets around the cfb problem--without ill-effect on Commandbox. Let us know how it goes.
Copy link to clipboard
Copied
Hello Larry,
Can you please try adding as mentioned below and let us know if it works.
/Users/larryclyons/.CommandBox/server/E898FE23BF702162F22CB024B4F4187B-dataTables_CF5090/adobe-2023.0.15.330825/WEB-INF/cfusion
Please make sure you select Appliction Server as Other
Thanks & Regards
Ravi
Copy link to clipboard
Copied
Ravi, that's interesting to hear. I see we were writing about the same time, so maybe you'd not seen my reply to him.
Are you saying that if one chooses that "other" option, then cfb would NOT look for the jvm.config file? If so, that's helpful to hear. (I'm reading and replying to this on a phone.)
Larry, do let us know if either option works for you. Ravi's is certainly one less step :-), though sadly neither is an obvious one.
Copy link to clipboard
Copied
I have new info on these two options.
First, yes, if one does the "other" option as Ravi posed then I can confirm there's no need then of the empty jvm.config I'd mentioned. That said, I've also confirmed that if you go that route, you'll find that when you right-click on the server name (in the servers view of cfb), you will only see the option to edit or delete that server.
But if instead you define the server using the default config choice (of "cf+tomcat bundle"), again that not only WORKS with Commandbox (as long as you add the empty jvm.config) but FWIW you WILL see the other menu items (when you right-click on the server name) one would normally see, including starting/stopping the server, launching the cf admin, etc. While I appreciate that may seem not too important for a Commandbox server instance (as its status tray ui element offers that and more), I do want to at least note the difference here, in case it may well lead to some other changed behavior within cfb (which I have not yet further explored).
Larry, if you (or others) try one option vs the other, I hope you'll at least consider setting up a server connection using the other approach (it's ok to have more than one pointing to a given CF instance, configured these different ways, I have found). It will be interesting to learn if the "other"option Ravi proposes causes any loss of some capability that the traditional ("cf+tomcat bundle") would have enabled.
Copy link to clipboard
Copied
Thanks Charlie and Ravi. I was able to define a server using your suggestions. I created an empty jvm.config file and placed it in the server root. When I defined the server, I still got the iInvalid server response, until I noticed that the server was using the default config choice (of "cf+tomcat bundle"). When I changed that to Other, I was able to define the server and get it working properly.
I'll try the other option later today and let everyone know how that goes.
Copy link to clipboard
Copied
Well, you do seem to be saying you've now tried both. But both should have avoided that error.
To be clear, the empty jvm.config does need to be in the WEB-INF/cfusion/bin (of a Commandbox cf instance folder), to avoid that error when using the default "cf + tomcat".
It's NOT needed if you switch to the "other" option. But then that causes the lack of the couple of menu items I'd mentioned...and it may well lead to other issues. That's what I hoped we may get clarification on, over time.
Copy link to clipboard
Copied
Hi Charlie,
I should have clarified things.
First off Ravi's solution works. I used the "Other" option, and set the sever home to [whatever]/WEB-INF/cfusion.
( [whatever] refers to the full path — it was easier not to keep typing it).
No jvm.config file.
That worked.
Then I deleted the newly created server definition. Next I created an empty jvm.config file in [whatever]/WEB-INF/cfusion/bin.
Unfortunately that did not work. CfB still returned an Invalid server home.
Since Ravi's solution worked and works well for my needs so far I'll be going with his solution.
Copy link to clipboard
Copied
Hey Larry, I totally appreciate that the problem is solved for you with Ravi's solution using "other".
As for my proposed solution, and what failed for you, I think I know why. I offer this as much for others who may find this thread.
I found I was able to experience your challenge if the closing slash on the "server home" field was missing. The response is immediate, while editing a CFB "server" configured this way. (Curiously, the slash is NOT needed if empty jvm.config is there when you first attempt this. The problem is when the file is NOT there, and you create a server with the server home having no slash, and THEN you create the empty jvm.config. Again, just add the slash then and it should work.)
If you're willing to give it another shot, I'd appreciate hearing if that solved things also. BTW, you had said you "deleted the newly created server definition", but as I noted above it's ok to have two or more "Servers" configured to point to the same instance (for whatever reason). 🙂
And while this closing slash does NOT matter for Ravis's approach (which is nice), as I said there are those feature differences I observed, at least in the menu offered for the server, and there may be still others. So it may help for some to know of both options here.
Indeed, I have added the discoveries from this thread as a new post on the Ortus forum thread from a couple of years ago that I referred to in my first answer. Someone may find that discussion and not this one. Finally, also edited my first reply above to make the need of the closing slash more clear, for future readers here.
Hope all this helps someone.
Copy link to clipboard
Copied
Thanks Charlie I’ll give it a try in the morning.
OK a bit later than the morning, but here goes.
First off I tried it both ways, with the slash in the Server Home path and without. The JVM.config file was already in the /cfusion/bin/ directory. I was able to get it to work with the jvm.config file in cfusion/bin/and the back slash on cfusion in place.
As mentioned earlier, the Other option also worked.
Copy link to clipboard
Copied
Good to hear your confirmation of things.
If you (or others) stick with the "other" route and later find something in cf doesn't work as expected (something which could be related to this server configuration), at least you have this second/default option to consider.
Again, you can define more than one "server" pointing to the same instance. You'd just need to edit which one your cfb "project" points to.
Hope all just goes well for you, whichever option you go with.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Larry, I think you'll find that problem is caused by the fact that the URL opened by CFB (for such a commandbox server) has 2 slashes after the port, such as http://127.0.0.1:9523//CFIDE/administrator/index.cfm. Of course, it should be only 1. And as soon as you set it to be 1, then the images work, as does the login to the admin.
I will add that I have explored the settings available within the CFB server configuration and I don't see what's causing it (or rather, nothing I tried to fix it got it to just show the single slash, which is indeed odd). At least this is a workaround.
And of course, you can just use the commandbox status tray to launch the cf admin instead.
But though for now it seems to ONLY affect the launch of the admin from within CFB and that "servers" view, it does make me wonder if some other feature may be ill-affected by this. Often it's little things like that which people ignore--only to have it bite them later but they don't think of it or they fail to mention it to others trying to help them. 🙂
And granted, the problem does NOT happen with the "other" approach--since it never shows the means to launch the CF admin anyway (from the CFB "servers" view). But I stll have my concerns that that may have still other differences that affect other CFB behavior.
I have my doubts that Adobe is doing much testing with CFB as configured to talk to a commandbox cf instance...and then I suspect most commandbox CF users are not likely using CFB (if they use vscode at all). There are of course the other, older/more-established CFML extensions like kamasamk's and ilya's...and then the Commandbox folks are likley more focused on the Boxlang CFB extension (and how that may be made to play nicely with CFML apps run via boxlang servers instead of CF.)
Interesting times. Anyway, we've laid out plenty for folks to consider, if interested.
Copy link to clipboard
Copied
Thanks all. I'm helping the kid to move back into her college dorm this weekend, but as soon as I'm back in town I'll give these solutions a try and post the results here.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now