Welcome to the Ranch, Omkar!
The URL you've provided (
https://localhost:1158/em) is the address of the Enterprise Manager (hence the "em" in that URL) -- it is an application that you can use to manage your database. It has nothing to do with the
JDBC connect
string, neither the port, nor the "em" should appear there.
Various possible formats of Oracle JDBC connect string are described
here.
I believe that the correct connect string in your case (based on the TNSNAMES) would be
jdbc:oracle:thin:@//localhost:1521/orcl, but I may be wrong.