Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Oracle DB via Java and Tomcat

 
Alex Dzhus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am trying to use Oracle DB 12c via Java and Tomcat.
The problem is that I can not configurate correct connection via connection pool and declaration in "server.xml" file.
So, when I use this code in a Java class:

Everything works fine.
But when I use this code in a Java class:

This code in <context.xml>

and this code in <server.xml>

I get an exception "java.sql.SQLException: ORA-01017: invalid username/password; logon denied"  in line
The username and the password are the same in first and second codes. please advise what is going wrong ?
 
Alex Dzhus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in line
symboll "2" is a mistake here, it is not set in real perogram.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!