Installation of SQLJ with JDBC

I want to install SQLJ on Sun Unix machine and How to configer JDBC driver for Java programmer? Is the above things is sufficient to interact Java programmer with Oracle 8i database.
Thanks
null

Follow the "Getting Started" section in the SQLJ User's Guide and Reference.
You need:
- a JDK (1.1.x or 1.2)
- the Oracle JDBC driver distribution
- the SQLJ distribution (translator.zip)
null

Similar Messages

  • Problem with jdbc oci in oracle full installation

    Hi,
    My server has Oracle 10g R2 in full installation, and not run jdbc in oci,
    my java command:
    /usr/java/jre1.5.0_07/bin/java -Dlibrary.path=/oracle/product/10.2.0/db_1/lib -cp ... mypackage.myclass
    and its says:
    java.lang.UnsatisfiedLinkError: /oracle/product/10.2.0/db_1/lib/libocijdbc10.so: /oracle/product/10.2.0/db_1/lib/libocijdbc10.so: cannot open shared object file: No such file or directory
    but this file [ libocijdbc10.so ] there is in the path... however the file [ libclnstsh.so.10.1 ] not...
    what is the problem ?
    thanks a lot

    Hello!
    I hope that it wasn't late but if you see the note 293667.1 you will find that is necessary set two environment variables LIBPATH and LD_LIBRARY_PATH
    $export LIBPATH=$ORACLE_HOME/lib:$LIBPATH
    $export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    Ramiro Ortiz

  • Use of Complex Oracle Object with JDBC

    How can I use Oracle Object(or PL/Sql type) with JDBC
    I have a structure of record with some attributes and table of another attribute.
    My types are defined as follows !
    <code>
    CREATE TYPE EMPLOYEE_GRADES AS TABLE OF VARCHAR2(50)
    CREATE TYPE EMPLOYEES AS OBJECT(EmpName VARCHAR2(50), EmpGrades Employee_Grades)
    </code>
    My custom object might have the following structure (or should it be different)
    <code>
    public class EmpColl implements CustomDatum, CustomDatumFactory
    -- other stuff ----
    /* fields */
    public String empName;
    public Collection empNos;
    </code>
    I want to pass an variable of type EMPLOYEES to an procedure.
    Thanx in Advance
    Chetan
    [email protected]

    <code>
    CREATE TYPE EMPLOYEE_GRADES AS TABLE OF VARCHAR2(50)
    CREATE TYPE EMPLOYEES AS OBJECT(EmpName VARCHAR2(50), EmpGrades Employee_Grades)
    </code>The easiest is to use JPublisher (which comes with the SQLJ distribution).
    Say:
    jpub -user=username/password -sql=EMPLOYEES:Employees,EMPLOYEE_GRADES:EmployeeGrades
    You will get (among others) the Java files Employees.java and EmployeeGrade.java. Go ahead, compile and use them.
    Look in [Oracle Home]/sqlj/demo/jpub for a number of additional examples, and in the JPublisher User's Guide for background info.
    The next (9.2) release of JPublisher will also provide some support for accessing legacy PL/SQL types from Java.

  • Help needed with JDBC - please help! (newbie)

    hi all
    i m new to jdbc
    i have installed MySQL server on my winxp machine
    i used the command:
    mysql -p -u root
    Enter password: ****now when writing a prog i m getting a prob at this piece of code:
    Connection con=DriverManager.getConnection("jdbc:odbc:books","root","root");wot is wrong wid this code?
    please help......
    thanks in advance

    There are about 20 different things that could be wrong a this point; I'm not going to list them all. If you want specific help, you need to post specific information. This is usually done by posting either a stack trace from an exception, or a more complete section of code and a description of the problem and ALL the symptoms. You have all the information on what you've done, we have none of it.
    Instead of trying to diagnose whats wrong with your ODBC setup, I'm going to give you some strong advice; don't use ODBC with JDBC if you can avoid it, and with MySQL you can avoid it. It makes things simpler, less can go wrong, and you don't have to configure a DSN on every machine that you install the program on.
    To use "pure" JDBC without ODBC for MySQl:
    1) download the JDBC driver (you might already have this)
    http://dev.mysql.com/downloads/connector/j/3.1.html
    2) follow the installation instructions
    http://dev.mysql.com/doc/refman/5.0/en/java-connector.html
    In particular, make sure your classpath is set correctly
    3) Here's an example of loading the driver and establishing a connection
    http://dev.mysql.com/doc/refman/5.0/en/cj-connect-with-drivermanager.html
    Note the form of the connection URL,
    "jdbc:mysql://localhost/test?user=monty&password=greatsqldb"
    This is what an URL without ODBC looks like; there is no DSN, which means no DSN has to be configured.
    4) The MySQL database has some built-in security, to prevent malicious connections from outside computers. Solutions to that and other common problems are here:
    http://dev.mysql.com/doc/refman/5.0/en/cj-faq.html

  • SQLJ or JDBC

    I have asked this question in the SQLJ JDBC forum but since nobody answers me I try here instead:
    Could you point me to some good resources (white papers) where I can read about performance issues when choosing between SQLJ and JDBC?
    I assume this is a rather general question, but I have to come up with a precise answer. This system is limited by a large number of inserts into Oracle, but the SQL statements are not complicated.
    Regards
    Flemming

    Not knowing exactly, but I guess, that there is no real difference between SQLJ and JSBC concerning performance. SQLJ is just a precompiler which translates SQLJ-Statements into JDBC API-calls. So both are basically the same. Most probably the limiting part will be the database, which has to execute all of the INSERT-statemens you mentioned.

  • Sqlj and jdbc for linux

    Hi All,
    I am currently set up the (tomcat) jsp engine on top of apache web server.
    And now i would like to install both sqlj and a jdbc driver such
    that I can query our oracle database. In all of the options for downloads
    there is a windoze option and a solaris option. Do I have to wait for specific
    "linux" version to get them to work. Or is the solaris option alright
    for linux ??
    slightly confused,
    Chris

    Unfortunately, this description is still rather unspecific.
    It sounds, as if there might be an issue with the way database connections are established for the SQLJ and JDBC parts of your program. Could you provide more information on that, specifically on how you obtain JDBC connections and SQLJ connection contexts.

  • Performance of SQLJ vs.JDBC

    Performance of SQLJ vs JDBC
    Hi.
    I have a method (writen in SQLJ) containing SQL INSERT statemenmt. As I understand it - each time I invoke that method inside loop PreparedStatement object is created, parsed, executed and released.
    With JDBC I'm able to create and parse only once for the whole loop.
    Is it possible to do the same with SQLJ or I would have to re-write the code?
    TIA. Michael

    Rewrite. SQLJ slower than JDBC in times.

  • Sqlj and jdbc in a single program causing problems

    I am using both sqlj and jdbc in a single program(servlets) but after insatiaitng this program my other sqlj programs are not working while the JDBC pgms are working . Why is it so? How can I remedy it?

    Unfortunately, this description is still rather unspecific.
    It sounds, as if there might be an issue with the way database connections are established for the SQLJ and JDBC parts of your program. Could you provide more information on that, specifically on how you obtain JDBC connections and SQLJ connection contexts.

  • I need Crystal Reports XI R2 RDC merge modules with JDBC driver.

    I successfully connected to MySQL server from CR XI R2 designer with JDBC driver. My application is developed in Delphi, using Crystal Reports VCL.  I need to build a Installer including executable files, *.rpt files and CR RDC merge modules in Macrovision Installshield 12.  But RDC_reportengine is not containing JDBC driver. How I to include and configure the JDBC driver?

    I just done these steps.  But following error occurs:
    Error: 772 error in file C:\...\myreportfile.rpt:
    Invalid argument for database.
    Execute <PEStartPrintJob>.
    I used mysql-connecter-java-5.1.7-bin.jar from mysql.com.
    In designer connection url is
    jdbc:mysql://mysqlserver/database
    database classname is
    com.mysql.jdbc.Driver
    My Calling the report code from Delphi is:
    CrystalReport.Connect.ServerName := servername;
        CrystalReport.Connect.UserID := username;
        CrystalReport.Connect.Password := password;
        CrystalReport.Execute;
    It is worked successfully on installed the CR designer PC.

  • Performance difference between sqlj and jdbc

    hi:
    i am working with a project and i have to generate text files
    from database . first i am working with pl/sql, but i am not so
    satisfied with the performance. so i turn to java stored procedure. I have two choice sqlj and jdbc when accessing
    database? which performs better? sqlj or jdbc? or there's only
    little difference.
    And would u like to give me some other choice to run faster.
    maybe pro*c/c++ is a choice . but if it can't run much faster ,
    it's not a better choice.
    regards

    Since you don't play games, you'll notice a difference in graphic and video applications that are GPU accelerated, like Motion, and Photoshop CS4 & 5.

  • Oracle SQLJ or JDBC ?

    Hi,
    I would like some advice. Have anyone used Oracle SQLJ instead of the JDBC ?
    What should I use ?
    I started with JDBC then someone told me about SQLJ and said it was more high level and therefore easier to use. What do you think ?
    Thanks

    It depends whether you need portability or not. JDBC will be portable across DBs whereas SQLJ feature is not. Also I would advise not to make portability a default requirement for any application as that shuts down a whole bunch of nice, performant solutions. Would recommend reading Rod johnson's J2EE expert one-on-one. Wrox crashed, so not sure book is available or not.
    -Sanjay

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • I have a problem with JDBC Realm in Tomcat/Oracle/Win XP

    I have a problem with JDBC Realm in Tomcat.
    I have attached my server.xml file located in the
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    The Problem is that when I login I get the user name and password prompt but it does not resolve.
    When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
    Is there a cache or something I need to reset for the JDBC Realm to work?
    I have attached my tables and contents as well...
    Did I miss something????
    Thanks
    Phil
    server.xml
    <Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
    connectionName="testName" connectionPassword="testPass"
    userTable="users"
    userNameCol="user_name"
    userCredCol="user_pass"
    userRoleTable="user_roles"
    roleNameCol="role_name" />
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    </Host>
    </Engine>
    </Service>
    </Server>
    Tables
    create table users
    user_name varchar(15) not null primary key,
    user_pass varchar(15) not null
    create table roles
    role_name varchar(15) not null primary key
    create table user_roles
    user_name varchar(15) not null,
    role_name varchar(15) not null,
    primary key( user_name, role_name )
    select * from users;
    ----------------------+
    | user_name | user_pass |
    ----------------------+
    | tomcat | tomcat |
    | user1 | tomcat |
    | user2 | tomcat |
    | user3 | tomcat |
    ----------------------+
    select * from roles;
    | role_name |
    | tomcat |
    | role1 |
    select * from user_roles;
    -----------------------+
    | role_name | user_name |
    -----------------------+
    | tomcat | user1 |
    | role1 | user2 |
    | tomcat | tomcat |
    | role1 | tomcat |
    -----------------------+

    Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 734 ms
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart

  • Problem with JDBC and Tomcat

    I don't know where the problem originate, the only thing in my memory is that the program worked very well on my PC yesterday, but today, without even slightest change, it doesn't work anymore. As to debug it, I simplified the codes to the least, but it still refuse to work. I was beaten down by this problem totally, and cannot make out any solution for it, so, I come here, hoping to find a warrior to kill this damned bug for me.
    My program is a Servlet, but for the purpose of debugging, I have recode it to an Application/Servlet. When run as a application, I can get the result expected, but as a Servlet, :-(, maybe you should see it by yourself. My server software is Tomcat 4.1.15, and the JDK version is 1.4.0. To excute this program, you should add Data Source "Test" to ODBC.
    ///////////////////////code begins/////////////////////////
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Ex extends HttpServlet
         int ErrorType = 0;
         String err = new String("");
         public static void main(String args[]) throws Exception{
              Ex cEx = new Ex();
              cEx.init();     
              System.out.println(cEx.ErrorType);     
         public void init() {
              String url = "jdbc:odbc:Test";
              ErrorType = 3;     //passed
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
                   ErrorType = 1; //trapped in Class.forName
              try{
                   Connection c = DriverManager.getConnection(url);
              } catch (SQLException e) {
                   e.printStackTrace();
                   ErrorType = 2; //trapped in DriverManager.getConnection
                   err = e.getMessage();
         public void service(HttpServletRequest req, HttpServletResponse res)
                   throws IOException {
              res.setContentType("text/html; charset=GB2312");
              PrintWriter out = res.getWriter();
              out.println("Success " + "<p>" + ErrorType + "<p>" +err);
              out.close();
    //////////////////////////code ends///////////////////////////////
    The result from the Servlet tell me that the problem occurred within the connection process, I don't know who should be responsible to this - Tomcat or JDBC?

    If you could print the exception that you got then that would help :) In the mean time, I could make a guess. It is unlikely that your application server (in this case, Tomcat) is blocking connections from your servlet. So the problem is either with JDBC directly or with the underlying datasource. It seems unlikely that it is JDBC given that you have stated that the code has not changed and it works in application form.
    My guess would be that you are coming up against some sort of security constraint (eg: your DBMS is letting you log in from one IP but not another?, your Java plug-in security policy is disallowing the connection?). It's hard to say.
    But if it works as an application but not via a servlet then you could try putting this in your java.policy file, which is located in the directory where your plug-ins are installed (eg: "C:\Program Files\Java\<version>\lib\security\") on Windows systems;
    permission java.net.SocketPermission "bend xp:1099", "listen,connect,accept";
    Try that, see if it works :)
    Ben

  • How to set a sql query time out with jdbc:oracle:thin

    should i change the JDBC driver with jdbc:oralce:XA:thin or other driver with XA?

    SQL query timeout may be set with setQueryTimeout.
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#setQueryTimeout(int)
    A query timeout bug is fixed in Oracle JDBC Drivers release
    10.1.0.2.0 (10g)
    FIXED BUG-2249191
    In the Server Internal Driver, setting the query timeout does not
    +(and likely will never) work. The query execution will not be+
    canceled when the timeout expires, even if the query runs forever.
    Further, after the query returns, the execution of your code
    may pause for the length of the timeout.
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_readme101020.html

Maybe you are looking for

  • Can I put background fill behind an entire block of text in Pages?

    I am formatting text for an e-book and I would like to highlight several bulleted lists with a light greyscale background. I've tried using paragraph fill, and that gives me exactly the effect that I'm looking for - but leaves blank spaces between th

  • Is there  a way to view photos on a calendar

    from the date i originaly took the photo?I just downloaded a cf card and it seems to have bunched all the photos onyo one date?I previously used adobe photo and this program automaticaly did this feature.thanks

  • Reg:Function module SAPWL_GET_SUMMARY_STATISTIC not working in CRM ABAP 6.0

    Hi All,   When i execute the function module SAPWL_GET_SUMMARY_STATISTIC in CRM ABAP 6.0 passing the values below, PERIODTYPE                     HOSTID                          STARTDATE   it's not showing any values in the summary. it's showing the

  • Report Painter Customization Question

    I'm using a profitability report from the standard system.  It calls a line item report, and I need ot add a field with some logic behind it (I already have a z-version created for this).  Is there a way to have the standard report writer use my cust

  • OpenOffice doesn't allow editing when non-root user [SOLVED]

    I've been having this problem for some time now: for example whenever I open swriter to edit a text or make a new one, swriter always closes at the moment I type something. This problem does not exist when I use OO as the root user.