Using SQLJ 8.1.6 translator with no customization

SQLJ is very interesting because of the possibility of interop AND including vendor customizations. However, it seems that, except for Oracle Corp, no one has written a customizer. IBM, Sybase, and Informix all claim to support SQLJ, but, as far as I can see, they are all using the reference implementation and only Oracle has provided extensions and a customizer!
I'm trying to use generic code as a proof of concept, and add in the Oracle enhancements in "stage 2".
According to the Oracle SQLJ programmer's guide, the OraCustomerizer class is used as the default. This requires that OraCustomizer class and JDBC driver is needed to deploy on any platform when using a customized .ser file.
Four questions:
1. Is it possible to turn off the customizer (-P-customizer=NULL for example ?) and still use the 8.1.6 translator? The only alternative is to revert to the reference impl. translator.
2. Why is Oracle JDBC driver required if Oracle customizations are present in .ser file? I can see the need for OraCustomizer, but why the driver?
3. If deploying an app with an .ser file that includes Oracle customization on, for example, a DB2 system, what is the most lightweight way to include OraCustomizer and JDBC? Currently, I'm appending both entire .jar files to the end of the classpath.
4. Is anyone else writing a customizer other than the 3 that are included in 8.1.6?
BTW, the programmer's guide (and the SQLJ concept) is excellent! I'm looking forward to the enhancements in 8i version 3.
Thanks in advance,
Bob Beauchemin
[email protected]
null

1. Yes, you can turn off profile customization, or set a different default profile customizer.
-profile=false - turns off customization
-default-customizer=classname -sets the default customizer. If classname is empty this in fact turns off customization.
2. If an Oracle customization exists, and the statement is executed on an Oracle connection then we enable Oracle-specific types and other enhancements. We use Java reflection to link to particular Oracle JDBC driver present.
If the connection is not an Oracle connection, then we just use the JDBC-generic runtime.
The OracleCustomization of the .ser file adds information to the existing profile. I do not believe that this information uses Oracle JDBC-driver-specific classes (I have not verified this, though). Thus you should not need an Oracle JDBC driver in your application, even if you performed the Oracle customization.
3. You could create an application that is customized for all target platforms (customizations are additive) and distribute it as-is.
Alternatively, you can create the application without customization and then individually customize for each platform. This will be more work but your application (that is, your .ser files) should be slightly smaller.
4. IBM and Informix provide versions of SQLJ, AFAIK. I do not know if Informix has a customizer. (IBM does, as you have discovered.)
5. The next release of Oracle SQLJ (8.1.7) will support the SQLJ ISO standard, which is based on JDBC 2.0. This results in an incompatibility between SQLJ customizers/customizations from the ANSI specification (such as the current Oracle and IBM customizers) and from ISO. Thus, if you want to plug and play customizers you may be restricted to using SQLJ 8.1.6 for the time being.

Similar Messages

  • Simple Java class using SQLJ not compiling.

    Hello all, I have a simple Java class that is using SQLJ. It will not compile though. I am not sure what I should set for classpath. Any ideas? This is what I have so far.
    set PATH=C:\jdk1.2.2\bin;c:\oracle\ora81\jdbc\bin;
    set CLASSPATH="C:\oracle\ora81\jdbc\lib\classes12.zip;C:\oracle\ora81\sqlj\lib\runtime12.zip;C:\oracle\ora81\sqlj\lib\translator.zip;C:\jdk1.2.2\lib\*.*"
    then
    javac SQLJTester.java
    Here is my .java file ---
    import java.io.*;
    import java.sql.*;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    public class SQLJTester {
    public static void update() throws Exception {
    java.sql.Timestamp timeNow;
    #sql {
    BEGIN
    :timeNow := sysdate;
    END
    public static void main (String[] args) {
    try {
    SQLJTester.update();
    System.out.println ("Updated successfully");
    catch (Exception e) {
    System.out.println ("Caught an exception.");
    Thanks ahead for your time,
    Justin

    When sqlj files are compiled and translted to java file with them the file with extension .ser is also generated. browsers do not recognise this .ser files they only understand .class files which the download using <codebase> instead of class path. so thats why you r not able to use sqlj in servlet. try to customize the profile. Now can some one inform how to use sqlj from eclipse. does it support?. i need to downoad sqlj.exe for that. if anyone has idea from where i can download sqlj.exe pls inform me at [email protected]

  • Unable to use SQLJ OCI driver in weblogic 5.1

    Hi,I am trying to use SQLJ OCI driver instead of JDriver on solaries but always get an error "java.sql.SQLException: Error while trying to retrieve text for error ORA-12545" when connection pool is being created.The same works fine if I use JDriver.Moreover when I try with a standalone application which loads SQLJ OCI Driver it also works fine. Is there anything to be done/added in weblogic properties file or startWeblogic.sh for this to work on solaries? ORACLE_HOME is set properly! if not JDRIVER would have thrown the same error!!On NT it works great!!

    To us, a JDBC driver is just a JDBC driver provided that it is JDBC complaint. Make sure that you have the ORACLE_HOME set to point to the base directory where the Oracle client is installed and LD_LIBRARY_PATH includes the $ORACLE_HOME/lib directory. If this still doesn't help, can you post the relevant section of the weblogic.properties file and the complete error message including the stack trace?
    Samprathi wrote:
    Hi,I am trying to use SQLJ OCI driver instead of JDriver on solaries but always get an error "java.sql.SQLException: Error while trying to retrieve text for error ORA-12545" when connection pool is being created.The same works fine if I use JDriver.Moreover when I try with a standalone application which loads SQLJ OCI Driver it also works fine. Is there anything to be done/added in weblogic properties file or startWeblogic.sh for this to work on solaries? ORACLE_HOME is set properly! if not JDRIVER would have thrown the same error!!On NT it works great!!

  • My school has a website.  The professor uploads files in Word.  When I click on the link at home using Pages, the download window opens with nothing in it and Safari opens with a blank in the address book.  What Could be wrong?  Wrong set up?

    My school has a website.  The professor uploads files in Word.  When I click on the link at home using Pages, the download window opens with nothing in it and Safari opens with a blank in the address book.  What Could be wrong?  Wrong set up?

    Hi Jo,
    If I'm interpreting this correctly, the Word file downloads correctly, but when you open it in Pages, the link(s) which your instructor has embedded in the Word file are not correctly translated into Pages.
    If the link shows the actual address, you should be able to copy that and paste it into the location bar in Safari, press return, and get to the website that way.
    An alternate route might be to download one of the open source Office applications, OpenOffice.org, LibreOffice, or NeoOffice. These are written to more closely emulate the behaviours of MS Word than Pages, and may provide better support for links embedded in Word files.
    Regards,
    Barry

  • Currency translation with user defined exchange rates in a BEx report

    Hi guys,
    our business department requests a new functionality in our BW system. They want to simulate a currency translation in a BEX report. But this currency translation should be so flexible, that the user can change the exchange rates directly in the report.
    For example: The report should show a list of all our local company revenues. In the first column the plan revenues will be shown in the local currency (each company has its own local currency: USA->USD; Japan->YPN, Great Britain->GBP and so on). This revenues comes from a normal infoprovider, loaded via flat-file.
    In the second column the user should be able to enter or change a plan currency rate. The entered exchange rates should be stored in BW for a next use. They won't maintain the rates directly in TCURR, because this rates are only for simulation use !
    In the third column the translated Revenues in Euro currency has to be shown under the use of the exchange rates from the second column.
    I investigated a lot of time in the SAP help and here in the SDN, but I didn't find any solution to realize this. Is there generally a possibility to make a currency translation with exchange rates out of the TCURR? Would it be an option to use the integrated planning function of BW? Or is this requirement to far away for an simple implementation in SAP BI ?
    I hope, someone of you has also fixed a similar problem or has a good inspiration.
    Thank you in advance.
    Thomas

    thanks for the prompt reply!
    Unfortunately, exchange rates are not a part of my cube. They are held in different tables, and referenced depending on what kind of exchange rates I need to be looking at (average rates, daily, planning etc.). The only way for me, at the moment, to know which rates have been used is to go to query global view, and look at the type of conversion, and then try to figure things out. Plus there can be a different key date used in the query, which makes things more complicated.
    Anyway, it was worth asking
    Thanks again.

  • Using SQLJ from JSP in JDeveloper

    Hello,
    Has anyone succeeded in creating a JSP file by using SQLJ in JDeveloper 3.1 (Build 681)?
    In the whitepaper http://technet.oracle.com/docs/tech/java/servlets/jsp/whitepapers/jsp-oow99-paper.pdf
    it is stated that you can create an SQLJ-JSP by giving the JSP file the .sqljsp extension. This results in an "Fatal error: compiler internal error." in JDeveloper.
    In the same whitepaper, it is stated that you can also use the following JSP page directive to create an SQLJ-JSP page:
    "<%@ page language="sqlj" %>"
    This results in an "Error: (16) illegal character." error in JDeveloper at the mere sight of "#sql".
    Any help would be appreciated.
    Helgi

    Hi,
    there is something wrong with the code.
    I will update you when it is fixed
    (1352536)

  • Portal content translation with custom theme

    Dear Gents,
    I am experiencing a very strange problem.
    I have tried to change some english iview names to arabic using portal content translation. Since I wont understand properly what each word means, I used hindi names instead of arabic.
    So far so good.
    For this test user, I am using a brand new portal desktop with copied framework page.
    Everything works lovely when using SAP standard themes in my custom desktop But when I use my own theme, the theme does not load. I can see the roles and full navigation hierarchy, but without theme images or colors..
    Has anyone faced the similar issue before? Please guide
    Regards,
    Ankur Agarwal

    Hi Ankur,
    so when you log into the portal by using your theme than you will see your desktop but without any images and colors of your theme, isn't it?
    Are you sure you have define a proper desktop rule?
    So this desktop rule switch to your Portal Desktop?
    The desktop is assignt to the portal framework page and the theme?
    And the theme itself is stored successfully during the saving process?
    So perhaps open your theme once more and save it once more.
    But wait until you have really saved your theme. This takes time.....
    During saving of the theme all the needed css files will be created.
    Best regards
    Frank

  • Can I simulate SELECT * FROM TABLE WHERE ROW IN (1111,2222) using SQLJ

    I have a fct like
    public void fct(String inStr) {
    String str = "SELECT * FROM TABLE WHERE ROW IN" + inStr;
    // then I xecute the query using JDBC connection
    But I want to do the same thisn using SQLJ like:
    public void fct(String inStr) {
    #sql [nctx] iter = { SELECT * FROM TABLE WHERE ROW IN :inStr}
    When I run the second version and give a parameter like "(1111,2222)" it gives
    ORA-01722: invalid number error.
    Is there a way to give parameters to in clauses of SQLJ statements.
    Thanks in regard.

    This is a SQLJ FAQ. You can find the FAQ at:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html
    Your question is addressed in the following section:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#variablesizevaluelist
    Note that that section has a typo. The lines:
    ? // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),?};
    should read:
    ... // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),...};
    By the way, with the next release SQLJ will support pasting in of dynamic SQL fragments. Then you'll be able to do pretty much what you are trying to accomplish here (albeit with slightly different syntax). Until then you'd have to use the workarounds from the FAQ.

  • Importing Multilanguage Translations with DTW

    Hi,
    My issue is to import multilanguage translations with DTW. The import itself works fine, the problem is to update.
    The scenario is:
    - some translations to an item A were imported
    - now there are some translations in other languages, that should be imported to the item A
    It should be possible, but i just can't get it..
    Regards,
    Leonhard Detzel
    Edited by: Rui Pereira on Nov 7, 2008 1:45 PM

    How do I set the UserLanguagesObject?
    I use two templates:
    1.) MultiLanguageTranslations:
    RecordKey = 1
    Numerator = ACME Item
    FeldAlias = ItemName
    PrimaryKeyObject = A100
    TableName = OITM
    2.) TranslationsInUserLanguages:
    RecordKey = 1
    LineNum = (empty when import)
    LanguageCode = 9
    TranslationsContent = this is german
    When updating i tried to add an additional row in the second template or i created a new template only with the new record, setting the LineNum to 1. It doesn't work.
    Or did you mean, that in the import i have to set all language codes, even if without translationscontent?

  • Developing JSP using SQLJ

    Does anyone know how to develop JSP using SQLJ? This chapter is not availabe in the developer's guide. And which one is a better solution, JSP + BC4J or SQLJ?

    I would stick with the JDK 1.1.8 in JDeveloper 3.0. SQLJ and JDBC do not yet support JDK 1.2 (they will in Oracle 8.1.6 and JDeveloper 3.1... not sure about OAS 4.0.9, but I would suspect so).
    Laura

  • Question about Google Translator with flags for BC website

    Hello
    I am looking for a solution for my website , I am using Business Catalyst as platform to create the website.  I am looking for simple one code/plugin/HTML solution which I can copy paste in the website for the translation. I want to put google translator with flags on my website in the top right hand side. I want to translate my website in 9 languages and want to put 9 country flags on the top right hand side,  which translate languages on click event on "same page" , I want the translation must take place at the same page after clicking on the flag. How-ever I successfully integrated google translate with dropdown option but want to integrate google flag translations on my website.
    Please let me know what can be done here.
    Regards'

    Don't use google translate, it's the worst user experience you can ever give a user and makes the site look like it was designed by a 12 year old with a grammer problem. Machine translation is no were near anything good for a production website currently and even more so for non latin languages like Japanese, Chinese, Korean etc.
    Case and point, throw a few lines of text into google translate, then reverse the translation back to english, you'll see my point.

  • How to Use SQLJ

    I have used JPublisher to create and SQLJ and now I am trying to figure out how to call the function that is included in it.
    I am attempting to populate the standard WHO fields for a custom table. Maybe there is an easier way to do it.
    Thanks in Advance

    The following excerpt from the forthcoming SQLJ FAQ may also provide help.
    How can I use SQLJ with Oracle's BC4J?
    "I am using BC4J (Oracle's Business Components For Java) in my application, and would like to write SQLJ code for performing some work in the database. Is it possible to do that?"
    The following trick lets you obtain a real JDBC connection and create a SQLJ connection context:
    import java.sql.Connection;
    import sqlj.runtime.ref.DefaultContext;
    import sqlj.runtime.ConnectionContext;
    Connection conn = getDBTransaction()
    .createCallableStatement("select 1 from dual",1)
    .getConnection();
    DefaultContext ctx = new DefaultContext(conn);
    #sql [ctx] ... { ... };
    ctx.close(ConnectionContext.KEEP_CONNECTION); // clean up SQLJ context

  • Can I use SQLJ instead of JSP ?

    Hi:
    Can I use SQLJ instead of JSP to work with Oracle Mobile / Wireless ?
    Thanks

    You can use any language that can output XML - There is a Tag Glossary for the Oracle9iAS Wireless XML on http://studio.oraclemobile.com .
    Regards,
    Kalle
    [email protected]
    Hi:
    Can I use SQLJ instead of JSP to work with Oracle Mobile / Wireless ?
    Thanks

  • Pb deploying applet using sqlj

    Hi,
    I'm trying to deploy an applet I have just created. This applet connects to an Oracle 8.1.7 database using this kind of command:
    Oracle.connect("jdbc:oracle:thin:@ ... );
    Then the applet uses SQLJ class to deal with the datas.
    And after deploying my applet (I have checked all the dependancies to make sure I have everything), when I try to open the html file, I get the following error in the java console:
    java.lang.NoClassDefFoundError: sqlj/runtime/ref/ConnectionContextImpl
         at mypackage5.AppInvest.<init>(AppInvest.java:44)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Line 44 corresponds to the construction of the sqlj class instanciation.
    I would appreciate any help on this,
    Thanks
    Eric

    OK, you were right ! In fact, I was missing all the jar files in my ARCHIVE tag, but I though that jdevelopper was taking care of all that when deploying the applet. So I don't really see what the advantage of using deploy ...
    However, now, I have another pb. I can launch the applet on my local machine with a www browser. But when trying to connect from other machines, after the loading of jar files, the html page fails on loading my applet itself which is located in mypackage5/AppInvest.class.
    The applet tag is the following:
    <APPLET CODE="mypackage5.AppInvest" ARCHIVE="jdev-rt.jar, runtime12.jar, classes12.jar, nls_charset12.jar" HEIGHT="1000" WIDTH="1000" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    I know this is more a html - java pb, but if you have any idea ...
    Thks,
    Eric

  • Where do I report an application that is selling that does not work at all?  "Translator with voice" for Ipad.  I consider it shold have being filtered and not allowed to sell

    I bought an application, the Translator with voice and does not work at all. I consider that is so pooly develop that is near a fraud.  Where should I report it? Out of all imputs That I tried none was translated appropiate.

    If it's not working as described then try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via Store > View My Account and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that app and use the 'Report a Problem' link.

Maybe you are looking for

  • Aperture and Canon 20D

    I am using Aperture with my Canon 20D and I notice that really bright areas in the RAW file have halos in Aperture. And, the quality of the conversions do not seem that great. I am especially put off by the poor sharpening abilty in Aperture. Can any

  • Output to line printer (132 x 66)

    I need to print statement to a Line Printer (such as Epson LQ-1600K) on preprinted form. Should I use character mode? I've tried to setup a character mode report as described in Daily BI Views (except output chr(14) to printer) The layout of printout

  • Split ALV interms of a field.

    Hi .. How can I split ALV into many fields , according to the a field which can be change dynamically .If necessay to define clearly , my purpose is to show other columns according to different bukrs . For example in selection screen bukrs is selecte

  • A wrong query on oracle press documentation

    Hi all, i've tried to solve on hr schema the following problem: Write a query to identify the highest salary paid in each country. To solve this problem on the material was writed the followiong query: select max(salary),country_id from (select salar

  • Change another account for the sample product

    When posting goods issue, occurs a debit to 1000000 and a credit to 2000000. Account1000000 is for usage finished goods, and 2000000 is for finished product.Now I want to change the debit to 3000000(sample+free delivery) instead of the account 100000