im failing to connect a sql server db to a spring boot application
i have this in application.properties but the table dont update

159 Replies
⌛
This post has been reserved for your question.
Hey @✞rumy✞! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
can you test the connection
are you using intellij ultimate or no
yes i am
so you can check with the database view
if you are connected to the database
if you havent you can connect to the database with this db view

are thry supposed to appear in tables?
wrong view
i mean the intellij database view
on the right side of intellij
where you got maven view too
wait im trying xd

you need to add the icon
i forgot how
lol
i think in the view tab
click file view
the 3 lines
-
-
-
and in view
tool windows
database
and it should appear
right or left
which thing
the 3 lines
top left
next to project name
aa okay

doesnt appear
((
Enable the Database Tools and SQL plugin
This functionality relies on the Database Tools and SQL plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.
The Database Tools and SQL plugin is not available in IntelliJ IDEA Community Edition.
Press Ctrl+Alt+S
to open settings and then select Plugins.
Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.
try what this guide says
its not available in the community edition?
cause thats what i have
:SkullPixel:
well if u said no here that would save us a lot of time
l0l
oh sorry (( i thought i had it
anyway
then, what db service can i use for free
idk i use the ultimate version
you sure you dont need to put the username and password things
in your config
i tried that as well
did you add the
dependency
in pom
for your database type
yes, but it says vulnerability found in dependency
ok show the connection properties
in the database tool

do you get any error when you start the application
saying cant connect
i get login failed
u gotta put the proper login then

what does it say in connection parameters
and the login page

its windows auth
change it to
uhhhhhhhhh
login and password

sql auth?
yea
try that

u should pick the option
create new connection tho
ok wait
let me check something
oki
but since i have community can i use sql server?
or i should pick another
actually
in username type your windows account username
and in password your windows password
i dont have a password
for my pc
then dont type anything there
just the login
oki
and run the app and see if you get the same error
what do i do int the db login?
just login like you normally do

disaster
ok lets ask special forces of java help@dan1st | Daniel cuz i gtg
cant auth to microsoft sql server
thru windows authentication
i think its missing the exe
Both on the same device or on different devices?
oki, but thank u a lot still
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
both on the same
Are you connecting via JDBC or differently?
noo idea
How are you connecting to SQL server? From what application?
intellij
Can you check the answers here? https://stackoverflow.com/q/6087819/10871900
sqljdbc_auth.dll so i downloaded this but idk where to put it in my files
I think you need it in the java.library.path
Can you edit the JVM arguments used for the JDBC driver?
what does that mean im sorry im a beginner 😭
What are the options for configuring the JDBC driver?
im sorry i dont know where to search that ((
Can you shwo the dialog where you configured the DB connection?
i dont have the db option in tools
i have the free version
?
not the one in view?
idk what you mean with in view
There was something where you configured what DB to connect to, right?
aplication.properties?

Are you connecting to the DB from a Java application?
intellij
Either it's IntelliJ connecting to the DB or it's the application connecting to the DB
YOur screenshot looks like the latter
thats wrong?
should i modify smth?
First take the sqljdbc_auth.dll and copy it to some directory and save the path of that directory
then open the run configuration in IntelliJ
oki
and now?
which step?

expand the "Application" thing
i copied the path where isaved that
okay
Can you show what you see now?

can you click on the thing that appeared?

Click on "Modify options"

there should be something like "VM arguments" or "JVM arguments"

i added
vm options
enter
-Djava.library.path=THE_PATH_YOU_COPIED
ofc replace THE_PATH_YOU_COPIED
with the path of the folder of the DLL fileokay done
then restart the application
restart?
run the application again
aa oki


this is the path i put
oh waitt
put it in a folder without spaces
and update it in the VM options
okay
im waiting to see if it has errors again


What do you have in your VM options?
-Djava.library.path=C:\Users\kiko\Desktop\proiect\sqljdbc_12.10
it seems like you need to download mssql_jdbcauth-12.4.2.x64.dll
Also you could try adding
;authenticationScheme=NTLM
to the JDBC URL in the application.properties but idk whether that would change anythingthats not free right?
?
mssql_jdbcauth-12.4.2.x64.dll
I thought it would be freely available but I don't know MSSQL
I think you can just add this dependency: https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc_auth/12.4.2.x64
there s an error

it belongs inside the
<dependencies>
section
along with the other dependencies
press Ctrl twice and enter
mvn compile
this should download the dependency automatically
and then you can reload the project in IntelliJ
Can you show the full output?
oh I see
You can just download the DLL file from here: https://repo.maven.apache.org/maven2/com/microsoft/sqlserver/mssql-jdbc_auth/12.4.2.x64/

just put the file in the same directory as the other DLL and don't run it
and now?

then run your application again
Wasn't there another DLL before?
sqljdbc_auth I think
it was the other one i downloaded
yeah put it in the same directory as sqljdbc_auth

both DLLs in the same folder that's als used for the java.library.path


wait both?

one folder with the two DLL files in it
i only downloaded one
the mssql-jdbc-auth one and the sqljdbc_auth one
though I'm not sure whether the second one is actually needed
wait where do i put it?
in some folder without any spaces
doesn't matter where
and then you update the java.library.path accordingly
i cant find it
find what?

cant find the java.library
java.library.path is the thing in the VM options
oh
wait so what do i put there?

is it where it should be?
in some folder, doesn't matter which one
okay, now run?
now you copy the path of that folder with the DLL file, edit the VM ptions and edit the java.library.path accordingly
but if they re in the same folder
Can you show me?
.
its in the same place like the previous one
Can you show the java.library.path=?
-Djava.library.path=C:\Users\kiko\Desktop\proiect\sqljdbc_12.10
the DLL is in the enu folder
so it would need to be
-Djava.library.path=C:\Users\kiko\Desktop\proiect\sqljdbc_12.10\enu
aa my bad
i think i should use another db xd
but thank you so much for the help
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@619481763382558731>.