0
I’m facing a problem, I hope you can help me, I am developing a web application running on Tomcat using Spring-mvc and data access with Jdbctemplate, the database is Oracle 11g. Within this scenario as of Prache, I have two environments, in the development environment everything works perfectly, access to data, pages etc. In production environment can not connect in the database in any way, testing by external tools (tnsping, Plsql) connects right, when I run Tomcat and try to access the page, I have the following error message:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
)] with root cause oracle.net.ns.Netexception: Listener refused the Connection with the following error: ORA-12505, TNS:Istener does not Currently know of SID Given in connect Descriptor at oracle.net.ns.NSProtocol.connect(Nsprotocol.java:399)
The settings and data access are saved in the context and in the server.xml of Tomcat, follow the list of settings:
xml context.
<ResourceLink name="jdbc/OracleDB"
global="jdbc/OracleDB"
auth="Container"
type="javax.sql.DataSource" />
Server.xml within the Globalnamingresources node
<Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver"
global="jdbc/OracleDB" maxActive="100" maxIdle="20" maxWait="10000"
minIdle="5" name="jdbc/OracleDB" password="SGC" type="javax.sql.DataSource"
url="jdbc:oracle:thin:@NB-ATROMBETONE:1521:xe" username="SGC" />
The above two settings are from the development environment, in the production environment I change only the attributes, url, username and password of Resource.
Already check firewall rules, lock doors, antivirus, but nothing solved. Does anyone have any suggestions or has been through it?
I appreciate any help.
the database is cataloged in the oracle Tnsnames on the machine where the deployment took place?
– Caputo
Hello friend, thanks for the iteration, answering your question, is yes, on the same pc I can test the connection by tnsping and Plsql, both work normally.
– Andre Trombetone