I'm facing a problem, I hope they can help me, I'm developing a web application running on tomcat using Spring-mvc and data access with JdbcTemplate, the database is Oracle 11g. Within this scenario as a prache, I have two environments, in the development environment everything works perfectly, access to data, pages etc. At the production environment I can not connect to the database in any way, testing by external tools (tnsping, plsql) connects right when squeeze the tomcat and I try to access the page, I get 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: listener does not currently know of SID given in connect descriptor at oracle.net.ns.NSProtocol.connect (NSProtocol.java:399)
The data access settings are saved in tomcat's context and server.xml, following the list of settings:
context.xml
<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 two settings mentioned above are from the development environment, in the production environment I only change the attributes, url, username and password of the resource.
Already check firewall rules, door lock, antivirus, but nothing solved. Anyone have any suggestions or went through this?
Thanks for any help.