Error in connecting oracle 11G in localhost using JDBC

前端 未结 2 1441
心在旅途
心在旅途 2021-01-23 17:01
import java.sql.*;

public class one {

    public static void main(String[] args)

    {
            Connection conn=null;
             


        
相关标签:
2条回答
  • 2021-01-23 17:15

    The connection string is malformed. It should be "jdbc:oracle:thin://@localhost:1521/ecom" Notice the transposition of // and @.

    0 讨论(0)
  • 2021-01-23 17:22

    1) Please be sure database host name, port number, or database instance name are correct. 2) Be sure the TNSListener has been started ( run lsnrctl start)

    0 讨论(0)
提交回复
热议问题