title: error : java.sql.SQLException: ORA-01017: invalid username/password; logon denied
body: <p>I entered 10 questions in database, with their answers. I started project, I logged in candidate id. After that I gave admit id, it was accepted. After that I tried to open this page(this page is meant to open the test page, which will open questions), and I got error message - java.sql.SQLException: ORA-01017: invalid username/password; logon denied 
  As far I know, there is no error in coding of project. So I had not posted the coding. Error is somewhere in database connectivity. 
  (I had seen other topics with this error, but not found help).</p>
  
  <pre><code> {   if(minutes==0 &amp;&amp; seconds==0)
      {
         alert('Oops ! ! Time up '+
              'Test Submitted Successfully');
          VerbForm.submit();
      }
  seconds=60;
  minutes--;
  window.setTimeout("timer()", 1000 );   
  </code></pre>
  
  <p>}<br>
  } </p>
  
  <p><br>
     </p>
  
  " name="forma">   
      <b>Time Remaining:</b> <br>" style="border:0px solid white; background: #F0EFE2">:" style="border:0px solid white; background: #F0EFE2">   
  
     
  
     
  
  timer();   
  
     
  
  <pre><code>        &lt;/div&gt;
  
  
  
    &lt;div id="site_content"&gt;
  
    &lt;div id="content"&gt;
  
      &lt;%
      try{
      int i=1;
      Random rand =new Random();
      int newrand=rand.nextInt(9);
      session.setAttribute("verbrandom",String.valueOf(newrand));
      Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","java","12345");
       String admitid=session.getAttribute("admitid").toString();
      int aid=Integer.parseInt(admitid); 
      PreparedStatement ps1=con.prepareStatement("select verbkey from result where admitid=?");
      ps1.setInt(1,aid);
      ResultSet rs1=ps1.executeQuery();
      rs1.next();
      if(rs1.getInt("verbkey")==1)
                     {
                      response.sendRedirect("AlreadyExam.jsp");
                     }
             else
             {
      PreparedStatement ps=con.prepareStatement("select * from verbal where qid&gt;? order by qid");
      ps.setInt(1,newrand);
      ResultSet rs=ps.executeQuery();
          while(rs.next() &amp;&amp; i&lt;=10)
          {
      %&gt;
  
      &lt;form action="VerbalResult.jsp" align="left" name="VerbForm"&gt;
  
  
  
          &lt;P&gt;&lt;b&gt;&lt;%=i%&gt;. &lt;%=rs.getString("question")%&gt;&lt;/b&gt;&lt;BR&gt;&lt;BR&gt;
  </code></pre>
  
  <p>" value="&lt;%=rs.getString("option1")%>">&nbsp;&nbsp;A.&nbsp;&nbsp;&lt;%=rs.getString("option1")%>&nbsp;
  " value="&lt;%=rs.getString("option2")%>">&nbsp;&nbsp;B.&nbsp;&nbsp;&lt;%=rs.getString("option2")%><br><br>
  " value="&lt;%=rs.getString("option3")%>">&nbsp;&nbsp;C.&nbsp;&nbsp;&lt;%=rs.getString("option3")%>&nbsp;
  " value="&lt;%=rs.getString("option4")%>">&nbsp;&nbsp;C.&nbsp;&nbsp;&lt;%=rs.getString("option4")%><br><br>
              </p></p>
  
  <pre><code>             &lt;%
                  i++;
                       } rs.close();
                          ps.close();        
                          } 
                       con.close();
                       rs1.close();
                       ps1.close();
  
  
      }
      catch(NullPointerException e)
                            {
          response.sendRedirect("CandidateLogin.jsp");
      }
              %&gt;
  
  &lt;p&gt;&lt;input style="padding-top: 25px; font: 100% arial; border: 1px solid; width: 170px; margin: 0 0 0 212px; height: 33px; padding: 2px 0 3px 0;cursor: pointer;background: #7D0F0F; color: #FFF;"  class="submit" type="submit" onclick="DoneTest()" name="TestButton" value="Submit Verbal Test"&gt;&lt;/p&gt;
  </code></pre>