> -----Original Message-----
> From: Dwaipayan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 06, 2001 4:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re:java error in database access
> 
> 
> my problem concerning JdbcOdbcDriver was not solved.a 
> friend(Randy it was u!) suggested that this driver is not 
> thread safe/has problems with multithreading.(that's hebrew 
> to me,coz i am a first time server programmer)

It means that if you attempt concurrent connections (that's multiple
connections at the same time) to the database, you will crash.

> 
> incidentally i got the following server window msgs when 
> using jdbcodbcdriver.can any 1 tell me what it means!!(my 
> index page has 3 frames having first.html,second.html & 
> third.html.the login textboxes are in third.html which lead 
> to login.jsp on submit.my app is named project)
> [ 
> 2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( 
> /project + /jsp/first.
> html + null) Connection reset by peer: socket write error
> 2001-07-06 12:50:26 - Ctx( /project ): 404 R( /project + 
> /jsp/login.js + null) n
> ull
> 2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( 
> /project + /jsp/third.
> html + null) Connection reset by peer: socket write error
> ]
> 
These are harmless and unrelated.  Check out
http://www.aswethink.com/employees/randy/tomcat/IOException.html to find out
more about them.

> however i also tried with a type 4 driver:i-net Seropto(tm) 
> optional package driver(ver1.0 for Oracle 8.0 
> server).classname--com.inet.ora.OraDriver.it is said to 
> support the following:
> Oracle Server, Java and JDBC Versions
> --------------------------------------
>       Java Versions: 1.2.x or higher
>       JDBC Version:  2.0
> 
>       Oracle Server Version: 8.0.4.0
> i have Oracle8.0.4 personal edition,jdk1.2.2.i have included 
> the jar files for both the driver and jdbc2.0 optional 
> package in c:\tomcat\lib\.
> i modified th login.jsp used for jdbc-odbc driver as follows:
> [
> <%@ page session="true" import="java.sql.*,java.io.*" %>
> 
> 
> <% 
> String s1=request.getParameter("user");//username
> String s2=request.getParameter("pwd");//password
> String upwd=null;
> FileOutputStream fos=null;
> PrintStream prs=null;
> 
> try{
>       fos=new FileOutputStream("error.txt");
>       prs=new PrintStream(fos);
>       //DriverManager.setLogStream( System.out );
> if(s1.length()==8 &&  s2.length()==6)
> {
>       out.println("loading driver");
>                  
> Class.forName("com.inet.ora.OraDriver").newInstance();
>               out.println(" driver loaded");
>               DriverManager.registerDriver(new 
> com.inet.ora.OraDriver());
>                       out.println("driver registered");
>                 Connection 
> con=DriverManager.getConnection("jdbc:inetora","scott","tiger");
>                               out.println("got connection");
>                 Statement ps=con.createStatement();
>                // ps.setString(1,s1);
>                 ResultSet rs=ps.executeQuery("SELECT password 
> FROM login WHERE username'"+s1+"'");
>                 if(rs!=null)
>               {
>                       while(rs.next())
>                                       {
>                               upwd=rs.getString("password");
>                       }
>               }
> 
>               con.close(); 
>               if(upwd!=null)
>               {
>               
>                       if(s2.equals(upwd))
>                       {       
>                                               
> out.println("Welcome Back to this site "+s1);
>                       }
>                          
>                         
>                                       else
>                       {
>            
>                                               
> out.println("Incorrect password");
>                       }
>            
>                               }
>                               else
>                       {     
>                                       out.println("Incorrect 
> username ");
>               }
>                 
>                 
>                 
>                 
> 
> 
> }
> else
> {
> 
>       out.println("Invalid no. of characters in username/password");
> }
> }
> catch(Exception ex){
> ex.printStackTrace(prs);
> out.println(ex.getMessage());
> out.println(ex);}
> 
>  %>
> 
> 
> 
> 
> 
> ]
> 
> i got the following output in the browser:
> loading driver driver loaded driver registered Connection 
> refused: no further information com.inet.ora.SQLException: 
> Connection refused: no further information 
> what the hell??
> 
It would seem like one of three things is happening:
        1.  You database is set up to not accept connections from your
computer (probably not possible in Personal Edition)
        2.  You probably need to specify more information for your database
driver to be able to connect to Oracle (after all, its software, its up to
us to add the magic).  Check your driver documentation for more information
        3.  You database is refusing connections for licensing issues.  I
don't know anything about Personal Edition, but it seems possible that you
are only allowed to have a certain number of open connections.  If you have
one for SQL*Plus, and maybe another for some management application, then
you might be out of connections.


> please offer a solution.
This is a help forum, not a do your work for you forum.  The more effort you
put into solving your own problems, the more helpful you will find people,
and the more you will learn.

        Randy

Reply via email to