The exception is as follows:
Org. Apache. commons. DBCP. sqlnestedexception: cannot create poolableconnectionfactory (IO exception: the network adapter cocould not establish the connection)
At org. Apache. commons. DBCP. basicdatasource. createdatasource (basicdatasource. Java: 1225)
At org. Apache. commons. DBCP. basicdatasource. getconnection (basicdatasource. Java: 880)
Caused by: Java. SQL. sqlexception: Io exception: the network adapter cocould not establish the connection
At oracle. JDBC. dbaccess. dberror. throwsqlexception (dberror. Java: 180)
At oracle. JDBC. dbaccess. dberror. throwsqlexception (dberror. Java: 222)
At oracle. JDBC. dbaccess. dberror. throwsqlexception (dberror. Java: 335)
Main reasons:
1. The datasource configuration of the server. xml file may be incorrect.
(1 ). if data on the local machine is used, the configuration in the local data source is: username = "pcisv62" Password = "11" url = "JDBC: oracle: thin :@Localhost: 1521:Orcl"
(2 ). if the data on the server is used, the configuration in the data source is: username = "pcisv62" Password = "11" url = "JDBC: oracle: thin :@Dbserver: 1521:Corev6"
(Dbserver is the name of the server, and corev6 is the SID of Oracle on the server)
2. The configuration of the tnsnames. ora file of Oracle may be incorrect.
Oracle installation directory e: \ oracle \ ora92 \ Network \ ADMIN tnsnames. ora:
Local Configuration:
Orcl =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host =Host Name) (Port = 1521 ))
)
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME =Orcl)
)
)
Or Server Configuration:
Corev6_dbserver =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host =Dbserver) (Port = 1521 ))
)
(CONNECT_DATA =
(SID =Corev6)
(Server = dedicated)
)
)