Sqlj and JDBC test

I installed JDK1.2.2, it works very well. I also installed
JDBC7.3.4 and SQLJ7.3.4. After I compiled the
TestInstallCreateTable.java, I run the class to get the following
error messages. Can SQLJ7.3.4 work with the JDK1.2.2?
Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\ORAWIN95\BIN\oci73jdbc.dll: One of the library files needed to
run this application cannot be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1319)
at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1243)
at java.lang.Runtime.loadLibrary0(Runtime.java:470)
at java.lang.System.loadLibrary(System.java:768)
at
oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:
93)
at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
at
java.sql.DriverManager.getConnection(DriverManager.java:457)
at
java.sql.DriverManager.getConnection(DriverManager.java:137)
at
sqlj.runtime.ref.ConnectionContextImpl.<init>(ConnectionContextIm
pl.
ava:102)
at
sqlj.runtime.ref.DefaultContext.<init>(DefaultContext.java:142)
at
oracle.sqlj.runtime.Oracle.getConnection(Oracle.java:501)
null

Thank you for your timely help. After setting up %JAVA_HOME%\lib\classes.zip in classpath, I am able to compile the .sqlj file. But I am not able to run. I get a java.lang.NoClassDefFoundError:oracle.sqlj.runtime.Oracle. I am able to see this class in the database, under Java classes. Kindly advice. Thanks in advance.

Similar Messages

  • 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.

  • 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.

  • 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.

  • JAR files for SQLJ and JDBC drivers: what is the best practice?

    starting a migration from IAS 10 to WebLogic 11g.
    Apparently the jar files for SQLJ are not on the classpath by default.
    java.lang.NoClassDefFoundError: sqlj/runtime/ref/DefaultContextwhich is the better practice: putting the SQLJ runtime jar into the lib subdirectory of the domain directory, or using a shared library reference? (usage of SQLJ is pretty prevalent in our apps, though we may be getting away from it)
    are the Oracle JDBC drivers on the classpath by default?
    if not, then the same question: put them into the lib subdirectory of the domain directory, or use a shared library reference?

    I'm looking at the setDomainEnv, especially the big note at the top:
    >
    # WARNING: This file is created by the Configuration Wizard.
    # Any changes to this script may be lost when adding extensions to this configuration.
    >
    and am getting squeamish about editing it...
    http://www.bea-weblogic.com/how-do-i-disable-wls-automatically-adding-to-classpath.html looks like the default behaviour is for WebLogic to put $DOMAIN/lib;$WL_HOME/common/lib/ext;$WL_HOME/server/lib/ext on the classpath; there is also a reference to setting weblogic.ext.dirs= when starting weblogic (which means I set the WEBLOGIC_EXTENSION_DIRS environment variable).
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/libraries.html#wp1067450 also refers at the bottom to using the domain /lib subdirectory.
    so am I correct that a good practice is to just put the jars I think I will globally need into $DOMAIN/lib, rather than putting them in $WL_HOME/common/lib/ext, $WL_HOME/server/lib/ext, or fiddling with the WEBLOGIC_EXTENSION_DIRS environment variable?
    Edited by: user8652010 on Feb 10, 2011 1:08 PM

  • 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 vs JDBC vs stored procedur?People

    SQLJ vs JDBC vs stored procedur?
    What is used in the enterprise?
    What to study?

    SQLJ and JDBC are ways to access the database - from the client, from the middle tier, or from inside the database server itself.
    JDBC is an API specified by Sun as part of Java, while SQLJ is an ANSI (soon ISO) standard for embedding SQL in Java.
    JDBC is more widespread, while SQLJ is a more productive environment.
    Stored procedures are pieces of code executed in the database as part of your database session. In Oracle Databases, stored procedures are usually written either in PL/SQL (a propertietary Oracle language) or in Java. If you write your stored procedure in Java you use JDBC or SQLJ to access the database - essentially the same code you would write on the client or in a middle-tier.

  • JDev9033, SQLJ and Ant

    Hi, can anybody help me with this?
    In this project we use JDev9033, JDK1.4.2_02, SQLJ, Ant1.54 and Oracle 9.2.0.1 client. Now I have a problem integrating OJC and Ant, since we want to use Ant from within JDev to build the project.
    I have set up the paths and class paths according to Oracle 9i SQLJ Developers Guide (Release 2). If I compile from JDev without Ant, JDev compiles the projects *.java and *.sqlj classes corretly.
    I have set the build.properties and build.xml file according to the paths specified in the build.xml file, which JDev can generate for me. And I have included jdev.jar and ojc.jar in the class path.
    Any way I get the exception with the -debug flag set i Ant:
    BUILD FAILED
    file:D:/JDev/GCSSMLIS/Tests/build.xml:166: Compiler Adapter 'oracle.jdeveloper.compiler.ant.teskdefs.OjcAdapter' can't be found.
         at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassName(CompilerAdapterFactory.java:195)
    In build.properties I have:
    # COMPILATION SETTINGS
    compiler=oracle.jdeveloper.compiler.ant.teskdefs.OjcAdapter
    source="1.4"
    target="1.4"
    deprecation="on"
    optimize="off"
    debug="on"
    optimize=off
    and in build.xml:
    <javac
    compiler="${compiler}"
    srcdir="${comp.dir}"
    destdir="${build.dir}"
    includes="**/*.java, **/*TEST*.java, **/Test*.java"
    >
    <classpath refid="classpath" />
    </javac>
    with classpath:
    <path id="classpath">
    <fileset dir="${javac.path}" >
    <include name="*.jar" />
    </fileset>
    <fileset dir="${jdev.home}/sqlj/lib" >
    <include name="*.jar" />
    </fileset>
    <pathelement location="${jdev.home}/jdev/lib/jdev.jar" />
    <pathelement location="${jdev.home}/jdev/lib/ojc.jar" />
    <pathelement location="${ora.home}/jdbc/lib/ojdbc14.jar" />
    <pathelement location="${ant.path}/optional.jar"/>
    <pathelement location="${junit.path}/junit.jar" />
    </path>
    Regards
    Flemming

    Matthew,
    Thank for your replies. I manages to get rid of the Ant error by using the first method. I would expect the second to work to.
    I do not expect the OjcAdapter to translate the sqlj files into java files. I have read those chapters in the SQLJ Developers Guide.
    I would like to do obtain is the following:
    1) Use Ant as build system. I do not care, if Ant is external or internal to JDeveloper since both version are 1.5.3. But we have a lot of other steps like ftp to development server, running JUnit, updating CVS and VSS, documentation and so on, so I need Ant to make one build file that every body in the project can use.
    2) Use jre/sdk 1.4.2, sqlj and Oracle client 9.2.0. So I have to translate the projects sqlj files to x.generate.java files before I pass all projects files to a Java compiler.
    3) I tried to build an Ant precompile task in this way:
    a) copy all java and sqlj files from src directory to compile directory.
    b) From the Ant task run the sqlj translator on the compile directory
    c) pass the translated files to javac or ojc
    Since I can translate and compile the project with jdsk1.4.2 from the Jdev Make/Recompile menu point I assume I should be able to write Ant tasks to behave as I have want it to.
    Flemming

  • CTS1.4.1 Samples JDBC test failing with Error in allocating a connection

    Tests under CTS1.4.1 samples>>JDBC>>ee>>testConn>> are failing with the following error :
    Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DSManagedConnectionFactory createManagedConnection
    WARNING: RAR5113 : Error creating connection from supplied information: Reason - Error while parsing address
    Sep 14, 2005 4:27:55 PM com.sun.enterprise.resource.LocalTxConnectorAllocator createResource
    WARNING: RAR5038:Unexpected exception while creating resource
    Sep 14, 2005 4:27:55 PM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
    WARNING: RAR5117 : Failed to obtain/create connection. Reason : Connection could not be allocated because: Error while parsing address
    Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DataSource getConnection
    WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address ]
    ERROR: SQL Exception : Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
    ERROR: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
    at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:72)
    at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.getConnection(testConnClient.java:252)
    at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.setup(testConnClient.java:91)
    But the mystery is that the main set of JDBC tests (outside of samples) in CTS1.4.1 are running fine.
    One difference I notice is that the tests that are failing use "createManagedConnection".
    The main configurations file "ts.jte" present under %TS_HOME%\bin has all the settings correct. Thats why the main JDBC tests go through fine.
    I wonder where these failing tests pick up the bad "address" from.
    Any help on this would be greatly appreciated.
    Thanks !

    CTS is a paid product and any question regarding that should be answered by a Licencee Engineer. Pls contact the LE regard the setup of CTS or any TCK.

  • IDoc to JDBC  and JDBC to IDoc Scenario

    Dear All,
    I am working on IDoc to JDBC and JDBC to IDoc Scenario.
    I have to send Idoc from SAP to Non SAP system(.NET application) i almost configured in XI but still i don't know when my INTEGRATION will INVOKE how my data will proceed from IDOC to Oracle database(Through JDBC) and in case of revese how and when Data flow will start.
    Does anyone have completed STEP by STEP scenario document for this?
    How my Idoc will sent to XI?
    How XI will pick up data from IDoc?
    How XI will Convert data to JDBC and UPDATE in Oracle Database?
    And i reverse case(JDBC to IDoc) when my INTEGRATION will INVOKE?
    Where and When i can watch my process and data?
    How can i test the whole integration?
    I AM GETTING ERROR WHILE TESTING CONFIGURATION IN Integration Directory "Error while refreshing the XI runtime cache" and when i check this in SXI_CACHE  it gives me error
    "Unable to refresh cache "NO_BUSINESS_SYSTEM"
    "Error during last refresh to cache"LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM"
    Please solve all the above problems i will reward u points
    thanks,
    RP

    Hi,
    While we working on IDOC to JDBC interface..
    We have to deploy JDBC Drivers?
    Go through this links,
    /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1246926,00.html
    To install JDBC driver follow the how to guide.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
    Configuration of JDBC Adapter for SQL Server
    JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
    UserID and Password.
    If the connection is not working find the correct port number.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40b92770-db81-2a10-8e91-f747188d8033
    JDBC- X I -  R/3 Scenario
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Please check the driver path as mentioned below.
    JDBC Driver : sun.jdbc.odbc.JdbcOdbcDriver
    Connection:jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//location of DB table.mdb;
    No JDBC driver required.
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    follow this thread
    Re: Problem when connecting to MS Access through JDBC Adapter.
    SAP Note 850116 has details
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Configuring the Sender JDBC Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
    Configuring the Receiver JDBC Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
    Idoc Reveiver adapter..
    http://help.sap.com/saphelp_erp2004/helpdata/en/b9/c5b13bbeb0cb37e10000000a11402f/content.htm
    Thanks,
    Satya Kumar
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Edited by: SATYA KUMAR AKKARABOYANA on May 8, 2008 5:51 PM

  • Help!Jdbc test suite problem

    hi,all
    we have developed a jdbc driver for our DBMS.we used jdbc test suite which we downloaded it from sun web site to test our driver.when jdbc test run,we found many exception logged in jdbc-tests.log file,such as:
    Beginning Test: testAddBatch01
    Fatal: Problem with connection: java.io.FileNotFoundException: http://localhost:8000/servlet_vehicle/servlet_vehicle
    End Test: testAddBatch01...........FAILED
    I use jdbc-tests-suite1.2.1 version.do you encouter the problem?I am looking for your response!
    thanks
    sheidon

    Hi,
    I think you haven't start the server.So the program is trying to connect to the server and is raising the exception.
    For a complete list of steps to be taken for installation and to run the tests, please visit our web site at http://java.sun.com/products/jdbc/jdbctestsuite-1_2_1.html#Steps to Install and Run the Tests
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Sysytems
    http://www.sun.com/developers/support/

  • 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.

  • JDBC Test suite access

    Hello everyone,
    I would like to know where to get the JDBC Test suite to test JDBC 3.0.
    The one can be downloadble is for JDBC 2 ?
    Any clues are very welcome ?
    Pascal

    Thanks but I already do this. It only send me to test
    suite 1.3.1 which AFAIK is JDBC 2.0 level test suite.
    So it doens't address extension brought by JDBC 3.0I don't know about the version and can't find info with a couple of minutes' googling. But according to the JDBC download page JDBC 3.0 was released February 13, 2002 and test suite 1.3.1 on February 21, 2002. Suspiciously close. Are you sure 1.3.1 is for 2.0? Double check that first.

  • SQLJ and JSP

    Hello,
    I have generated a sqlj wrapper class for a package, and now I want to execute a method that calls the pl/sql procedure inside the .sqlj program thru JSP. How do I do that?
    I tried <%=methodgenerated() %>, but doesn't work.
    It's a stored procedure not a function. I looked for an example and I just found the runQuery() example everywhere, but didn't find an example about running a procedure from JSP.
    I also did the steps about language="sqlj" and import.... but I need an example about doing this action.
    Could you please help me with this?
    Thanks in advance.

    I will answer myself, so people that has the same problem can see this:
    Make a jsp page (callingprogram.jsp) that calls the following file: EXECUTESQLJ.jsp (the file name could be whatever):
    -- CALLINGPROGRAM.JSP --
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    jsp to execute a pl/sql (sqlj)
    </TITLE>
    </HEAD>
    <BODY>
    Ejecutar un PL/SQL es cuestion de colocar el codigo en JAVA respectivo:
    <FORM method="post" action="executesqlj.jsp" onreset="alert('LA FORMA ES REINICIADA')">
    Presione el boton --><INPUT type="submit" value="Ejecutar">
    <BR>
    Para Reiniciar valores presione ---> <INPUT type="reset" value="Reiniciar"></TD>
    </FORM>
    </BODY>
    </HTML>
    Then, the file EXECUTESQLJ.JSP should has a look like this:
    <%@ page language="sqlj"
    contentType="text/html;charset=windows-1252"
    import="oracle.jbo.*,
    java.sql.SQLException,sqlj.runtime.ref.DefaultContext,
    sqlj.runtime.ConnectionContext,java.sql.Connection,
    oracle.sqlj.runtime.Oracle,mypackage1.java2" %>
    <-- mypackage1.java2 is the wrapper sqlj that the JDEV has created with the option GENERATE JAVA... -->
    <HTML>
    <HEAD>
    <TITLE>
    Executing sqlj....
    </TITLE>
    </HEAD>
    <BODY>
    <% // Codificacion de Java para llamar el procedimiento.
    Oracle.connect(new java2().getClass(), "connect.properties");
    <% /* remember creating the file connect.properties in your package directory
    The file has to be like this:
    sqlj.url=jdbc:oracle:thin:@servidor:1521:ORCL
    # User name and password here (edit to use different user/password)
    sqlj.user=scott
    sqlj.password=tiger
    */ %>
    java2 execsql = new java2();
    execsql.testjava();
    %>
    <jsp:forward page="callingprogram.jsp" />
    </BODY>
    </HTML>
    Hope this could help the jdevs guys!.

  • 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

Maybe you are looking for