I create a datasource like
cfconfig datasource save name=mydatasource dbdriver=mssql host=myserver\myinstance port= database=mydb username=myusername password=mycomplexsecretpassword
When I open my website I get the error [Macromedia][SQLServer JDBC Driver]Unable to connect. Invalid URL. If you are using an IPv6 address, please ensure that the address is bounded by left and right brackets. Ex: jdbc:datadirect:driver://[fe70::201:54ff:fe87:afd2%ce1]:50000;databaseName=DBNAME
I call cfconfig export .CFConfig.001.json. In the resulting file there's a line "dsn":"jdbc:macromedia:sqlserver://myserver
myinstance:;databaseName=mydb;SelectMethod=direct;sendStringParametersAsUnicode=false;querytimeout=0;MaxPooledStatements=100",
I go to CFAdmin and save the datasource as is. I call my website again and it works.
When I again export cfconfig the colon (:) after the instance name is gone.
SQLServer does not allow to use instance name and port. Seems, the colon bust be omitted then, too.
Can you confirm the version of CFConfig you have installed? This sounds like something that I fixed months ago.
This returns
Dependency Hierarchy for (1.0.0)
└─┬ commandbox-cfconfig (0.10.11-alpha)
└─┬ cfconfig-services (0.20.10-alpha)
├── lucee-password-util (1.0.3)
├── coldbox ()
├── testbox ()
├─┬ JSONPrettyPrint (1.2.6)
│ ├── coldbox ()
│ └── testbox ()
├─┬ adobe-password-util (1.0.8)
│ └── propertyFile (1.1.0)
├── semver (1.1.3)
└── propertyFile (1.1.0)
I tried an update according to your page: https://cfconfig.ortusbooks.com/using-the-cli/installation
This printed in * cfconfig-services (be) ─> new version: 0.20.33-alpha and did some updating. I quit box an started again and was greeted by an error.
I tried to reinstall cfconfig using
and eventually got
Where do I find the JVM args box.exe uses?
Yes, that version of CFConfig is rather old. Sorry for the confusion on the update instructions, I didn't realize those outdated instructions where in the docs. I just updated it to:
That said, what you ran still should have worked fine. What was the original error you ran into? Are you on the latest version of CommandBox.
As far as the error you show above I am completely confused as I've never seen that error before in the CLI. Occasionally people will get that for Lucee web server and Micha has never been able to figure out why it happens, but I've never seen it from the CLI at all and I don't know how to fix it. There's a good chance it has nothing to do with missing JVM args. That error message in Lucee isn't always correct. Maybe try wiping your CommandBox install to start fresh. There may be some bad bytecode cached or something. Just guessing, really.
Thanks for the pointer. I deleted some of the folders from c:\users\xxx\.Commandbox but this did not help, so I eventually deleted the whole folder and started new. Seems to work again.
The datasource seems to be created correctly. That's important for this ticket.
I'm now struggeling with a situation when I have two datasources, but I will come back on another ticket or on the slack channel.
Thanks for now.