I am trying to make a sample JDBC program i which i have to create table but i am facing this issue i tried many solution present on web all i have to come to know that serv
Try changing your JDBC Connection string from the following:
"jdbc:oracle:thin:localhost:1521:xe"
to the following:
"jdbc:oracle:thin:@localhost:1521:xe"
You need to understand when to use :
and /
, based on the usage of SID or SERVICE NAME
INSTANCE SID by ":"
jdbc:oracle:thin:@localhost:1521:SID
SERVICE NAME by "/"
jdbc:oracle:thin:@localhost:1521/SERVICE_NAME
Hope this helps!
Try changing from:
"jdbc:oracle:thin:localhost:1521:xe"
to:
"jdbc:oracle:thin:@//localhost:1521/XE"