Java and oracle connection

Hello
I have made tables in oracle and im tryin g 2 connect these tables to java where i have made forms. i havent downloaded any driver but i think when i installed Oracle 8.1.7 it has jdbc drivers too. now i dont know which driver it is, thin, internal, etc. im tryin to run a separate code which checks the connection. It keeps giving an error saying that the" specified driver does not exist". but i dont know wot to do coz i dont know which driver it is.
here is the code , hope somebody can help me
import java.sql.*;
import java.util.*;
public class MyConnection
     Connection con;
     MyConnection()
          try
// ******************************Connected To Jdbc-Odbc Type - 1 Driver
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","userid","password");
               con = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=servername;Database=pubs","userid","password");
// ******************************Connected To Ms-Access JDBC ODBC Driver .
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","","");
//               con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/admin.mdb","","");
// ******************************Connected To Ms-Access Type-3 Driver.
     /*          Class.forName ("acs.jdbc.Driver");
               String url = "jdbc:atinav:servername:5000:C:\\admin.mdb";
               String username="Admin";
               String password="";
               Connection con = DriverManager.getConnection(url,username,password);
// ******************************Connected To Microsoft SQL.
               Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
               con = DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433","userid","password");
// ******************************Connected To Merant.
               Class.forName("com.merant.datadirect.jdbc.sqlserver.SQLServerDriver");
               con = DriverManager.getConnection("jdbc:merant:sqlserver://servername:1433;User=userid;Password=password");
// ******************************Connected To Atinav SqlServer.
               Class.forName ("net.avenir.jdbc2.Driver");
               con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
// ******************************Connected To J-Turbo.
/*               String server="servername";
               String database="pubs";
               String user="userid";
               String password="password";
               Class.forName("com.ashna.jturbo.driver.Driver");
               con= DriverManager.getConnection("jdbc:JTurbo://"+server+"/"+database,user,password);
/*// ******************************Connected To jk Jdbc Driver.
               String url= "jdbc:jk:server@pubs:1433";
               Properties prop = new Properties();
               prop.put("user","userid");//Set the user name
               prop.put("password","password");//Set the password
               Class.forName ("com.jk.jdbc.Driver").newInstance();
               con = DriverManager.getConnection (url, prop);*/
// ******************************Connected To jNetDirect Type - 4 Driver
/*               String sConnect = "jdbc:JSQLConnect://127.0.0.1/database=pubs&user=userid&password=password";
               Class.forName ("com.jnetdirect.jsql.JSQLDriver").newInstance();     
               Connection con= DriverManager.getConnection(sConnect);
// ******************************Connected To AvenirDriver Type - 4 Driver
//               String url= "jdbc: AvenirDriver: //servername:1433/pubs";
//               java.util.Properties prop = new java.util.Properties ();
//               prop.put("user","userid");
//               prop.put("password","password");
/*               Class.forName ("net.avenir.jdbc2.Driver");     
               System.out.println(" Connected To AvenirDriver Type - 4 Driver");
               con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
// ******************************Connected To iNet Sprinta2000 Type - 4 Driver
     /*          String url="jdbc:inetdae7:servername:1433";
               String login="userid";
               String password="password";
               Class.forName("com.inet.tds.TdsDriver");
               System.out.println(" Connected To iNet Sprinta2000 Type - 4 Driver");
               con=DriverManager.getConnection(url,login,password);
// ******************************Connected To iNet Opta2000 Type - 4 Driver
/*               String url="jdbc:inetdae7:servername:1433";
               String login="sagar";
               String password="sagar";
               Class.forName("com.inet.tds.TdsDriver").newInstance();
               System.out.println(" Connected To iNet Opta2000 Type - 4 Driver");
               con=DriverManager.getConnection(url,login,password);
               DatabaseMetaData md = con.getMetaData();
               System.out.println("Driver Name            " + md.getDriverName());
               System.out.println("Driver Version         " + md.getDriverVersion());
               System.out.println("Database URL is        " + md.getURL());
               System.out.println("Database UserName is   " + md.getUserName());
               System.out.println("Connection Name        " + md.getConnection());
               System.out.println("Database Name          " + md.getDatabaseProductName());
               System.out.println("Database Version       " + md.getDatabaseProductVersion());
               System.out.println("Database ReadOnly Type " + md.isReadOnly());
               System.out.println("MaxColumnNameLength    " + md.getMaxColumnNameLength());
               System.out.println("MaxConnections         " + md.getMaxConnections());
               System.out.println("");
          catch(ClassNotFoundException cnfe)
               System.out.println(cnfe.getException());
               System.out.println("The Specified Driver Does not Exist....");
          catch(SQLException sqle)
               if(sqle.getErrorCode() == 0)
                    System.out.println("No Suitable Driver Found..");
               else if(sqle.getErrorCode() == 1017)
                    System.out.println("Wrong UserName Or Password..");
               else if(sqle.getErrorCode() == 1034)
                    System.out.println("Database not Started..");
                    System.out.println(sqle.getErrorCode());
                    System.out.println(sqle.getSQLState());
                    System.out.println(sqle);
     public static void main (String args[])
          new MyConnection();
}

hi
i did this as u told,
import java.sql.*;
import java.util.*;
public class MyConnection
     Connection con;
     MyConnection()
          try
                  Class.forName("oracle.jdbc.driver.OracleDriver");
                  con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:Orahome","scott","tiger");
// ******************************Connected To Jdbc-Odbc Type - 1 Driver
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","userid","password");
               con = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=servername;Database=pubs","userid","password");
// ******************************Connected To Ms-Access JDBC ODBC Driver .
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","","");
//               con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/admin.mdb","","");
// ******************************Connected To Ms-Access Type-3 Driver.
     /*          Class.forName ("acs.jdbc.Driver");
               String url = "jdbc:atinav:servername:5000:C:\\admin.mdb";
               String username="Admin";
               String password="";
               Connection con = DriverManager.getConnection(url,username,password);
// ******************************Connected To Microsoft SQL.
               Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
               con = DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433","userid","password");
// ******************************Connected To Merant.
               Class.forName("com.merant.datadirect.jdbc.sqlserver.SQLServerDriver");
               con = DriverManager.getConnection("jdbc:merant:sqlserver://servername:1433;User=userid;Password=password");
// ******************************Connected To Atinav SqlServer.
               Class.forName ("net.avenir.jdbc2.Driver");
               con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
// ******************************Connected To J-Turbo.
/*               String server="servername";
               String database="pubs";
               String user="userid";
               String password="password";
               Class.forName("com.ashna.jturbo.driver.Driver");
               con= DriverManager.getConnection("jdbc:JTurbo://"+server+"/"+database,user,password);
/*// ******************************Connected To jk Jdbc Driver.
               String url= "jdbc:jk:server@pubs:1433";
               Properties prop = new Properties();
               prop.put("user","userid");//Set the user name
               prop.put("password","password");//Set the password
               Class.forName ("com.jk.jdbc.Driver").newInstance();
               con = DriverManager.getConnection (url, prop);*/
// ******************************Connected To jNetDirect Type - 4 Driver
/*               String sConnect = "jdbc:JSQLConnect://127.0.0.1/database=pubs&user=userid&password=password";
               Class.forName ("com.jnetdirect.jsql.JSQLDriver").newInstance();
               Connection con= DriverManager.getConnection(sConnect);
// ******************************Connected To AvenirDriver Type - 4 Driver
//               String url= "jdbc: AvenirDriver: //servername:1433/pubs";
//               java.util.Properties prop = new java.util.Properties ();
//               prop.put("user","userid");
//               prop.put("password","password");
/*               Class.forName ("net.avenir.jdbc2.Driver");
               System.out.println(" Connected To AvenirDriver Type - 4 Driver");
               con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
// ******************************Connected To iNet Sprinta2000 Type - 4 Driver
     /*          String url="jdbc:inetdae7:servername:1433";
               String login="userid";
               String password="password";
               Class.forName("com.inet.tds.TdsDriver");
               System.out.println(" Connected To iNet Sprinta2000 Type - 4 Driver");
               con=DriverManager.getConnection(url,login,password);
// ******************************Connected To iNet Opta2000 Type - 4 Driver
/*               String url="jdbc:inetdae7:servername:1433";
               String login="sagar";
               String password="sagar";
               Class.forName("com.inet.tds.TdsDriver").newInstance();
               System.out.println(" Connected To iNet Opta2000 Type - 4 Driver");
               con=DriverManager.getConnection(url,login,password);
               DatabaseMetaData md = con.getMetaData();
               System.out.println("Driver Name            " + md.getDriverName());
               System.out.println("Driver Version         " + md.getDriverVersion());
               System.out.println("Database URL is        " + md.getURL());
               System.out.println("Database UserName is   " + md.getUserName());
               System.out.println("Connection Name        " + md.getConnection());
               System.out.println("Database Name          " + md.getDatabaseProductName());
               System.out.println("Database Version       " + md.getDatabaseProductVersion());
               System.out.println("Database ReadOnly Type " + md.isReadOnly());
               System.out.println("MaxColumnNameLength    " + md.getMaxColumnNameLength());
               System.out.println("MaxConnections         " + md.getMaxConnections());
               System.out.println("");
          catch(ClassNotFoundException cnfe)
               System.out.println(cnfe.getException());
               System.out.println("The Specified Driver Does not Exist....");
          catch(SQLException sqle)
               if(sqle.getErrorCode() == 0)
                    System.out.println("No Suitable Driver Found..");
               else if(sqle.getErrorCode() == 1017)
                    System.out.println("Wrong UserName Or Password..");
               else if(sqle.getErrorCode() == 1034)
                    System.out.println("Database not Started..");
                    System.out.println(sqle.getErrorCode());
                    System.out.println(sqle.getSQLState());
                    System.out.println(sqle);
     public static void main (String args[])
          new MyConnection();
}i tried it but i still get the same error msg. tht the specified driver does not exist.
i have in my classpath - CLASSPATH=.;[ORACLE_HOME]jdbc\lib\classes12.zip
and in my variable ORACLE_HOME AND it s value - C:\oracle\ora81
the error that i get is
C:\Program Files\JBuilder\jdk1.4\bin\javaw -classpath "C:\Documents and Settings\Administrator\jbproject\classes;C:\Program Files\JBuilder\jdk1.4\demo\jfc\Java2D\Java2Demo.jar;C:\Program Files\JBuilder\jdk1.4\demo\plugin\jfc\Java2D\Java2Demo.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\charsets.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\dnsns.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\ldapsec.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\localedata.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\im\indicim.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\jaws.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\jce.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\jsse.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\rt.jar;C:\Program Files\JBuilder\jdk1.4\jre\lib\sunrsasign.jar;C:\Program Files\JBuilder\jdk1.4\lib\dt.jar;C:\Program Files\JBuilder\jdk1.4\lib\htmlconverter.jar;C:\Program Files\JBuilder\jdk1.4\lib\tools.jar" MyConnection
null
The Specified Driver Does not Exist....

Similar Messages

  • WebDynpro java and Oracle Connection

    Hi,
    I'm trying to make a simple connection to an Oracle database within a custom webdynpro component. Using NWDS 7.0.08 and EP 7.0 SP 10.
    Here is a sample of the java code I use :
    Connection conn = null;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn =DriverManager.getConnection ("jdbc:oracle:thin:@hostname:port:DATABASENAME","schema", "password");
    Statement stmt=conn.createStatement();
    ResultSet rs=stmt.executeQuery("select * from MYTABLE");
    But when I run this WebDynpro, the following error appears :
    "oracle.jdbc.driver.OracleDriver".
    I have also catched the exception stack but it doesn't seem meaningful. If you need it, I can provide it in another thread.
    So What should I do to connect to this oracle database ? Is it the right provider ?
    Thanks,
    Loïc LEVEUGLE

    Hi!,
      please try following code, this is working fine for me.
    String  serverName = "172.21.1.62";
    String portNumber = "1526";
    String sid = "vision";
    String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
    String userName = "scott";
    String password = "tiger";
    Connection connection = null;
    try {
        // Load the JDBC driver
        String driverName = "oracle.jdbc.driver.OracleDriver";
        Class.forName(driverName);
        connection = DriverManager.getConnection(url, userName, password);
        Statement stmt =connection.createStatement();
        PreparedStatement pstmt = connection.prepareStatement("insert into club (Name,EmpID,Location,Extention,MailID,InstPlay) values(?,?,?,?,?,?)");
                   pstmt.clearParameters();
        pstmt.setString(1,Name);
        pstmt.setString(2,EmpID);
        pstmt.setString(3,Location);
        pstmt.setString(4,Extention);
        pstmt.setString(5,MailID);
        pstmt.setString(6,Instrument);
        pstmt.executeUpdate();
    } catch(Exception exc) {
         exc.printStackTrace();
    put classes12.jar in your class Path.
    regards,
    Mithileshwar Sahu

  • Java and oracle connectivity

    Hi
    I have the connectivity from my java servlet to oracle database for changing the password on a series of servers. If the user can not login to the server or for any other reason there is a problem , there are 2 messages that are shown, one the message that java displays and the second one is the message that the oracle driver displays. I want to get these 2 messages and put them into a file but the problem is that I dont have access to the message generated by oracle driver. I dont know how to access that message, can u halp me plz?

    huh!

  • Webdynpro java and oracle DB connection..

    Hi,
    I have a good knowledge of WD (web dynpro java) projects having ECC as backend as i have done lot of projects where ECC is backend and WD JAVA is front end.
    but in my new project i have wd java as front end but my backend is oracle DB. I want to know how to create/setup  connection betwen webdynpro java and oracle DB, how to proceed on this ? wat all settings I have to do in VA (visual admin) and all.
    please let me know how to proceed on this. Any document/tutorial on this will be very helpful..

    Hi Rahul,
    Create a DataSource to the oracle db in Visual Admin, give the datasource an alias name and connect to the db from WebDynpro by calling the alias name.
    These document might be useful:
    [http://help.sap.com/saphelp_nw70/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm]
    [SAP Note 867176|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=867176]
    [SAP Note 941594|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0000941594&nlang=E]
    Good luck!
    Regards,
    Aditya

  • How to relate java and Oracle

    i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.

    Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
    Joel
    For inserts, just replace this code:
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
      System.out.println(rs.getInt(rs.findColumn("CNT")));
    }with this code (and obviously change the Select string to an Insert String):
    int rowcnt = ps.executeUpdate();Here is the whole program:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest {
        public static void main(String args[]) throws SQLException {
            try {
                String timeString = new String("2000-11-01 23:59:59");
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
                java.util.Date date = format.parse(timeString);
                Timestamp timestamp = new Timestamp(date.getTime());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn =
                    DriverManager.getConnection(
                        "jdbc:oracle:thin:@riker:1521:mydb",
                        "myusername",
                        "mypassword");
                String sql =
                    "SELECT COUNT(*) CNT FROM SERVICE_ALARM "
                        + "WHERE TRANS_STREAM_NODE_ID = ? "
                        + "AND SERVICE_ID = ? "
                        + "AND ALARM_ID = ? "
                        + "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, "ROW1");
                ps.setInt(2, 1);
                ps.setString(3, "ROW1");
                String myDate =
                    timestamp.toString().substring(0, timestamp.toString().length() - 2);
                System.out.println("myDate=(" + myDate + ")");
                ps.setString(4, myDate);
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    System.out.println(rs.getInt(rs.findColumn("CNT")));
                rs.close();
                ps.close();
            } catch (Exception e) {
                System.out.println("Java Exception caught, error message=" + e.getMessage());
    }

  • Java and oracle in linux

    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..

    884540 wrote:
    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..You can mention the classpath using the javac and java options:
    javac -cp .;<path> <ClassName>.java
    and
    java -cp .;<path> <ClassName>
    Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
    http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715

  • Relation between java and oracle

    Hi,
    This is general information about java and oracle.
    I had worked in java last one year, but now switch to oracle i heared that nearly combination of each are implemented oops concept. But i know where it used in java, not in oracle.
    In oracle, where we are implemented inheritance, polymorhism and encapsulation.
    plz give some tips
    Regards venki

    does this mean you used to develop your applications on java and manuplate your data in Oracle over JDBC or Hibernate but then you started to develop PL/SQL applications for this need and use PL/SQL's OO features?
    With my experiences I may say if you are working on data intensive database applications learning how to use effectively SQL and PL/SQL is critical, this is Oracle's native language not something written to work for any database vendor. http://www.oracle.com/pls/db102/portal.portal_db?selected=5

  • Re: PHP  and Oracle Connection

    Are any specific links that will give me all knowledge regarding php and oracle connection? I am a new babie in this please help me out.

    Hi,
    I'm looking for specialists in PHP, Ajax and Oracle BPEL...
    Pages are: Praxisbörse und Jobs für Arzt und Zahnarzt http://www.praxis-welt.de für Praxisangebote und Jobangebote für Ärzte
    sowie auf http://www.berlin-umzug.net für Umzugsunternehmen aus Berlin für Umzüge, Klaviertransport und Tresortransport in Berlin.
    Any ideas / information / knowhow?
    Regards,
    Mic

  • URGENT! Java and Oracle

    I'm currently developing a Java application that connects to an oracle database and retrieves various information. The application connects fine to the database and I can SELECT information and all the other basic stuff.
    The problem I have is this, I have to call on server side scripts, .SQL files, to generate reports. From there I will somehow(?!) get the information that is contained in these reports but to start with I love to know how I can call these files.
    If I log into sqlplus I can run the file as normal:
    SQL>@file_name.sql
    The above runs the file and the report is generated OK.
    But if I try to use Java code such as ResultSet rs = statement.executeQuery() the program spits the dummy and tells me that I have supplied an "invalid SQL statement".
    Bearing in mind I can use statement.executeQuery() to successfully perform SELECT's, UPDATE's etc. I simply swap the select information for "@file_name.sql" to immitate what happens at the sqlplus command prompt to execute.
    All a total failure! If anyone knows would they please please help?!
    Thanks in advance,
    Tony

    Hi jschell,
    Many thanks for your reply by the way. Not to appear
    completely thick and stupid but I aint a master of
    Java by any means, is it possible you could suggest
    how I would "make a system call that runs SQL*plus
    and executes the script". Is there anywhere in
    particular I would look to attain the source code to
    achieve this? I have spent evening after evening
    trying to find source or a pointer on how to achieve
    this, I am beginning to get very frustrated!
    Well first you need to figure out where you are going to run this.
    It is either going to run on the client machine or it is going to run on the server. Both solutions are unlikely.
    Your other attempt, with Runtime.exec() will only work on the client machine.
    The server solution that I suggested requires PL/SQL, not java, to run the command. It will only work on the server. As for the packages I suggest you dig into your references (I would start with the O'Reilly books "Oracle PL/SQL Programming" and "Advanced Oracle PL/SQL Programming").

  • Crystal report - and oracle connections

    hi to everyone
    i installed client  of oracle
    and after that - the crystal report 2008 sp3
    when i open new (blank page) - and looking for a oracle connection
    its look like he doesnt exist.
    please if someone know why i cant see the connection to oracle/
    yossi bar

    Hello,
    CR looks for the Oracle \bin folder in the PATH statement. If it can't find it then the option to select Oracle native driver will not show.
    Thank you
    Don

  • Reports from Java and Oracle database

    Hi
    I need to generate couple of reports from my application, with Java as front end and oracle 11.2.0.3.0.  database . Reports are  having very simple select statements, using the criteria users enter from GUI. we don't need to execute a  direct select statement from Java, with the where clauses . I did some research and found out about Pipelined functions. I tested for a small set of records and it worked fine. Will this work for large data set? any drawbacks of using this method?  Any other methods for this requirement?
    Thanks in advance
    JP

    Pipeline table functions do not sound like the appropriate approach. It is designed to primarily deal with data transformations. Using it as a rendering engine for report writing? There are fundamental problems with such an approach.
    As Dave and Andre commented - the CORRECT means for PL/SQL to pass "data" to Java (or other client languages) is via reference cursors (pointers that the client can use for referencing SQL cursor programs on the server). And Java as a report writer does not really compare with the ease and flexibility that Oracle Apex (Application Express) provides as a reporting framework.

  • PHP  and Oracle Connection

    Please help to connect to oracle through php.
    OS=Windows Server 2008 R2(x64)= is working correctly
    PHP ver=PHP 5.3.2= is working correctly
    ORACLE = Oracle Database 11gR2= is working correctly
    Since the PHP and Oracle on the same machine, I did not install install client(but even with instan client I could not connect to oracle).
    phpinfo does not show oci section
    in Environment section shows these values
    PHPRC = C:\Program Files (x86)\PHP\
    LD_LIBRARY_PATH = D:\ipardb\ora_base\product\11.2.0\orahome\lib
    NLS_LANG = AMERICAN_AMERICA.WE8MSWIN1252
    ORACLE_HOME = D:\ipardb\ora_base\product\11.2.0\orahome
    ORACLE_SID = iparbio
    Path= C:\Program Files (x86)\PHP\;D:\ipardb\ora_base\product\11.2.0\orahome\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.1\bin;
    TNS_ADMIN= D:\ipardb\ora_base\product\11.2.0\orahome\network\admin
    Loaded Configuration File C:\Program Files (x86)\PHP\php.ini
    uncommented extension in php.ini
    [PHP_OCI8_11G]
    extension=php_oci8_11g.dll
    extension dir is set ok, since other extensions are working properly
    when i execute php.exe, in error_log file appears
    [11-Jun-2010 10:37:34] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_oci8_11g.dll' - %1 is not a valid Win32 application.
    in Unknown on line 0
    Please help me.

    I'm guessing the cause is probably the same as that article: PHP is 32bit but your Oracle libraries are 64bit.
    You will need to install 32bit instant client and make sure they are used for Apache. Does Windows 2008 have sym links? Perhaps the note mentioned at the end of OCI8 IN WINDOWS SERVER 2008 x64 will help. Otherwise try creating some batch scripts to set PATH appropriately before starting Apache.

  • Few question about Java and MySQL connection

    Hi!
    I have some problems with creating connection between Java and MySQL.
    I followed the restrictions in mysql-connector-java.jar' readme, I set the CLASSPATH :
    CLASSPATH=.;D:/mysql/mysql-connector-java.jar;
    I copied this jar file to the right place (descripted above), and I used the right steps to load it:
    Class.forName('com.mysql.jdbc.Driver"); and it throws a ClassNotFoundException
    Why? All the paths are correct, everything is on the right place.... I dont know why.
    When I installed the JBuilder8, and copied the jar file to JBuilder8/jdk4/jre/lib/ext it worked without any CLASSPATH in enviromental variables.
    If I want to run my program on machines where are not JBuilder, what should I do?
    Please help, if you can.
    Thanks,
    henpanta

    Yeah. So if I compiled my program with JBuilder to an .exe file, I cant run it on other machines, if the jar file isnt in the same place?
    If I tried your advice, java -classpath mymainclass I got the next message:
    main class not found. Believe me, its there. :(

  • Java and Oracle Reports

    How to connect java with oracle report server... i m using a swing application.... I have seen api documentation but didnt get things. please help...

    user13323568 wrote:
    How to connect java with oracle report server... i m using a swing application.... I have seen api documentation but didnt get things. please help...How can anyone help you?
    You "don't get things", that is a problem you have to solve before you can be helped. Maybe you just need to spend more time on it or find better documentation; API documentation is only a reference, not a manual.

  • DataDirect and Oracle Connection Manager

    Quick Question - Has anyone made the Plumtree Portal running on Oracle using the built in DataDirect drivers work with an infrastructure that uses Oracle Connection Manager (OCM).
    Due to security and performance reasons, using Oracle Connection Manager is needed to communicate accross firewalls.
    Ive already followed up with DataDirect, they dont support it currently. Plumtree Support doesnt seem to think it will work (im guessing there right).
    If anyones got any insight, it be appreciated.
    -DM

    please send configuration file of cman.ora, listener.ora

Maybe you are looking for