I'm trying to use CommandBox to install a SQL Serv...
# sql
b
I'm trying to use CommandBox to install a SQL Server connector for my ACF2021 instance and I get the following:
CommandBox> install sqlserver
× | Installing package [forgebox:sqlserver]
|------------------------------------------------------
| Verifying package 'sqlserver' in forgebox, please wait...
| Error getting ForgeBox entry [sqlserver]  The entry slug sent is invalid or does not exist
|------------------------------------------------------
Is there a different source or am I doing something wrong?
s
There is no forgebox package called
sqlserver
- I ahven't used ACF since CF11 but does Adobe not include the SQL Server connector anymore?
r
You need to run `cfpm install sqlserver`in CommandBox.
s
ahh it's an adobe package thingy
r
It's just a passthrough to the CF 2021 package manager to install SQL Server.
You can run `cfpm listall`to list all the installed and available packages.
b
I ran the cfpm installer as suggested and it ran without error and the package shows up as installed in the CF admin. However, I still get the same error. I restarted the server a couple of times in CommandBox, but no change. Is there something else I need to do to enable it?
r
What are you trying to do that you get the same error?
b
Testing my connection to a datasource.
r
The driver installed correctly though?
b
It appears to have, yes.
r
What is the error?
b
java.sql.SQLException: No suitable driver available for Test_OSAUpload. The sqlserver package is not installed. You can install the package through the CLI package manager (C:/Users/bjh1_wadmin/.CommandBox/server/020836140BD9C512151AF5D303416459-Box/adobe-2021.0.04.330004/WEB-INF/cfusion/bin/cfpm.bat) by running the command : install sqlserver.
Sorry, I was thinking I had already posted that.
r
Did you run the
cfpm install sqlserver
command from the webroot of that server?
Otherwise, you can do what the error suggests and run the
cfpm.bat
at the location given and then run
install sqlserver
once that launches. It's essentially what CommandBox is doing.
You would run that from a command prompt, not Commandbox.
b
I ran it from the CommandBox root, which I understood would install it for any existing servers if you didn't specify one.
r
Is it listed in green, if you go to the webroot of the server and run
cfpm listall
?
b
Yes.
r
It should work then. Sorry, but I don't have any more ideas.
b
I found a possible lead. I'll let you know if it pans out. Thanks!
So the cfpm.bat wouldn't run because I didn't have Java installed. Once I installed it and set its environment variable, then cfpm.bat ran successfully. Sadly, I still get the same error. sqlserver shows up in CF admin under the installed packages, but it seems like it only partially knows that it's installed. Something I didn't mention previously that I probably should have is that I need to use the Microsoft JDBC Driver 4.0 for SQL Server driver when I create the datasource. Does that require installing a different package?
r
I don't believe that is available through the cfpm and needs to be installed manually.
👍 1