TopLink support for Stored Functions

I know that TopLink supports PL/SQL stored procedures. What I haven't been able to figure out is whether or not TopLink also supports functions as well. Is there any way to execute a PL/SQL function using the TopLink APIs? Thanks. -Michael-

You can find additional information (including examples of usage) on using Stored Functions in the TL Dev Guide: http://download.oracle.com/otn_hosted_doc/toplink/1013/MAIN/_html/qrybas004.htm#BCFBBJBJ

Similar Messages

  • Toplink support for stored procedure with 2 OUT  REF CURSOR ?

    Can Toplink StoredProcedureCall be used with Oracle PLSql procedure with 2 OUT parameters. Parameter type is Ref Cursor (Oracle PLSQL resulset)
    Regards

    In a TopLink StoredProcedureCall using an OUT CURSOR the cursor is assumed to map to the result set for the TopLink query.
    For example if you had a stored procedure READ_ALL_EMP that returned a out cursor of EMP rows, you could use that procedure in a TopLink mapped Employee class mapped to the EMP table and use the stored procedure in a ReadAllQuery for the Employee class.
    If the procedure does not return data that maps to objects, you can use a DataReadQuery to access the data. The out cursor would be returned as a Vector of DatabaseRows that contain the data from the cursor rows.
    If the procedures data is complex and does not map to objects, it may be better to access the procedure directly through JDBC.

  • Support for  TREAT() function

    Please help me!
    I am working with object relational features in Oracle and I have tried using the TREAT() function. I get this message "ORA-03113: end-of-file on communication channel" every time I use it in the SELECT statement. If Oracle XE support for TREAT() function?

    l_sql:=
    'select ref(c) obj_ref, value(c) obj from PFO_OBJ_OPERATIONS c '||
    ' where value(c) is of (PFO_OT_DIN_OP) and treat(value(c) as PFO_OT_DIN_OP).code_calc=:code_calc';
    I tried to execute this statement in SQL Plus and I faced this error “ORA-03113”
    Probably the problem in something else, not in the statement?

  • Getting invalid packages when installing support for stored java objects

    I am getting invalid packages notices when installing support for stored java objects in Forms 9i that can with the Oracle 9iDS Suite. In the post installation notes it says to locate a few SQL files, PLB files and a JAR file and run them. On executing the SQL package that will install the rest , I am logged in as SYSTEM as the instructions stated, I get an error when it tries to load the PLB files ( which are encrypted from Oracle). Any one else have this problem or know of a solution?
    If you need more information please let me know and I will try to respond promptly.
    Thanks
    Chad Leath

    The PLB package is called ORA_DE_REFLECTION. I forgot to mention this in the previous post.

  • Toplink support for weblogic 9

    Hi ,
    Is toplink supported with weblogic 9?If yes,which version?
    There is a thread(on OTN) that speaks about toplink support for weblogic 9.
    Weblogic 9 -TopLink CMP
    Thanks,
    Rajbharat

    Rajbharat,
    We have completed our testing of POJO architectures and the WebLogic Support Matrix now reflects this:
    Doug

  • End of support for AD functional level?

    Has anyone ever seen something from Microsoft regarding their support policy for AD functional levels?
    Should one assume that since Windows Server 2003 support will end in July 2015, that this would indicate that the "Windows Server 2003" domain and forest functional levels would also become unsupported at that time?

    Hi,
    As far as i know the forest and domain functional levels don't have a support lifecycle. 
    The FFL and DFL only enable new features in the new domain. So i don't think it is really something that can be put into a support contract as such and therefor doesn't have a support lifecycle associated with it. 
    Thanks
    Denis
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    Blog: http://www.windows-support.co.uk 
    Twitter:   LinkedIn:

  • Toplink support for Java 5.0

    I tried to import java classes, compiled with jdk 5.0
    into Toplink workbench. The mapping fails.
    I tried to run the workbench with jre 5.0 but that didn't work either.
    Does anyone know how to do it and does Toplink even have a version that supports java 5.0?

    Anna,
    TopLink 10.1.3 will offer formal support for Java 5.0. Currently the runtime should work fine with Java 5.0. The only issue may be the workbench mapping process depending on the version of TopLink you are using.
    If you are using the 10.1.3 preview the workbench will still run with JDK 1.4 but should be compatible with importing and mapping classes compiled with JDK5. We will upgrade the JRE used by the workbench to JDK5 for the production release but this should not make any difference to your ability to map JDK 1.4 or 5 classes and use either at runtime.
    If you are using 9.0.4.X then the workbench will not be able to run or import JDK5 compiled classes. I believe the runtime is fine but not certified. For this environment you will need to compile the classes under JDK 1.4 and map this version of the classes. You can then use JDK5 compiled version in conjunction with the runtime.
    I hope this helps,
    Doug

  • TopLink support for JDO?

    Hi,
    I'm new to TopLink and am wondering what the status of JDO support is in 4.6. I can see that there is a JDO example, and that the RELNOTES indicate JDO support. But the level of spec compliance and JDO specific tools in TopLink are not documented AFAIK.

    I finally found the javadocs in the TopLink 4.6 distribution. From these, plus from the examples, it seems to me that the TopLink JDO 1.0 support is partial.
    They do provide partial implementations to most of the JDO interfaces in javax.jdo package. The one exception is javax.jdo.InstanceCallbacks. What I mean by partial is that some required methods are no-ops (no operation). No-ops do nothing and return null or zero depending on their return type.
    They don't support the JDO query language. You can use their implementation of javax.jdo.Query to create a query using SQL, TopLink query language, or EJBQL.
    They don't support the enhancer. The enhancer is controversial, therefore some people see this as a good thing.
    I ran a little program to display the results of PersistenceManagerFactory.supportedOptions() for TopLink.
    SUPPORTED OPTIONS
    javax.jdo.option.NontransactionalRead
    javax.jdo.option.ArrayList
    javax.jdo.option.HashMap
    javax.jdo.option.Hashtable
    javax.jdo.option.LinkedList
    javax.jdo.option.ArrayList
    javax.jdo.option.TreeMap
    javax.jdo.option.TreeSet
    javax.jdo.option.Vector
    javax.jdo.option.Map
    javax.jdo.option.List
    javax.jdo.option.Array
    UNSUPPORTED OPTIONS
    javax.jdo.query.JDOQL
    javax.jdo.option.RestoreValues
    javax.jdo.option.NullCollection
    javax.jdo.option.NontransactionalWrite
    javax.jdo.option.TransientTransactional
    javax.jdo.option.RetainValues
    javax.jdo.option.NonDatastoreIdentity
    javax.jdo.option.Optimistic
    javax.jdo.option.DatastoreIdentity
    javax.jdo.option.ApplicationIdentity
    I'm not sure why the javax.jdo.query.JDOQL option even exists. As I understand it support for the JDOQL is mandatory, not optional. But maybe this is a versioning thing. That is, maybe JDO 2.0 will allow implementations to provide JDOQL 1.0 and/or JDOQL 2.0. Just a guess.
    Hope this helps.

  • Toplink support for JPA vs. Toplink Essentials

    I think I read that Toplink has some support for EJB3/JPA as does Toplink Essentials.
    What is the difference in features?
    If one has a 10.1.3 app server license, should Toplink be used instead of Toplink Essentials for EJB3/JPA applications?
    Does the Mapping Workbench produce JPA object-relational mapping annotations or XML?
    Thank you.
    Richard Catlin

    Hi Robert,
    I'm not sure which comments you were directing specifically to Dali vs. JDeveloper but I'll try and address them from a Dali perspective. I do want to point out that Dali is at 0.5 and so it is still under development.
    yes you get a basic 1:1 entity from your databasetables...When generating Entities from tables, Dali will generate 1:1 and 1:many relationships based on database FK constraints.
    @temporary annotations are not inserted if you have a Date oder Calendar type.Also when generating Entities from tables Dali will generate an instance variable of java.sql.Date for a database date column. java.sql.Date does not require an @Temporal annotation.
    What's missing right now is a problem marker for missing @Temporal on java.util.Date and java.util.Calendar.
    If you want to rename attributes or methods it's a lot of manual work to do... because >@Column annoations are not inserted, if they do not exist because of >dbname=attributenameThere is a bugzilla bug opened for this refactoring support. https://bugs.eclipse.org/bugs/show_bug.cgi?id=136333 Fortunately in Dali if you rename a class or attribute (field/getter) and your explicit or default mappings are broken you will get a problem marking on the attribute and in the Problems view so you can fix it rather than finding out at runtime.
    generics are not inserted in the returnvalues of the methods...Generated Entities do use generics correctly e.g.:
    public class Publisher implements Serializable {
         @OneToMany(mappedBy="publisher")
         private Set<Title> titles;
         public Set<Title> getTitles() {
              return this.titles;
         public void setTitles(Set<Title> titles) {
              this.titles = titles;
    ...--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Toplink support for DB2

    I was wondering if anyone had any experiences with Toplink's support for DB2? If I have an existing application working with Oracle, is it easy to get the application working with a DB2 database or another DBMS such as SQL Server, etc.? Obviously, the different vendors have different conformities to the SQL syntax standard, and I was wondering if Toplink took these differences into account?
    Thanks,
    Ted

    I don't know of any specific papers/docs on this.
    The nature of TopLink is supporting any app server, any ide/toolset and any Database. For example, look in the source.zip file in your lib directory for TopLink... Notice there is a DB2Platform.java file in there. If there were any specific compatibility or idiosynchracies we hadn't accounted for (but we have), you could easily do so yourself just by modifying that class. We have cusotmers using dozens and dozens of different database variants just by using and modifying any of the Platform code provided...
    - Don

  • TopLink support for version 2.0/2.1 of ejbql

    Hello,
    TopLink support ejbql for pojo finders.
    What version of ejbql is supported in toplink 9.0.4.8 : 2.0 or 2.1 ?
    What version of ejbql is supported in future release (10.1.3) of toplink : 2.0 or 2.1 ?
    Regards

    I believe the answer to both is 2.1.
    Doug

  • Toplink support for RAC Failover

    We need to enable Toplink to support RAC Fast Connection Failover. We need to support
    only read query retry functionality and not write query retry. We found one document
    (http://www.oracle.com/technology/events/develop2007/presentations/oracle_jdbc_high_availability_load_balancing_best_practices_and_road_map.pdf)
    that explains how to configure JDBC connection for RAC failover. However, since we
    are using Toplink, we don't explicitly write our own jdbc url and toplink's session/uow
    will automatically handle the actual sql query execution.
    Is there any way we can configure Toplink to support RAC Fast Connection Failover, such
    as possibly in the toplink's sessions.xml or in the oc4j container's connection pools setting?
    Just for information, the way we acquire Toplink session is through SessionFactory:
       SessionFactory sessionFactory = new SessionFactory("repository",
                                     "META-INF/repository-sessions.xml");
       Session toplinkSession = sessionFactory.acquireSession();Then we do queries, acquiring unit of work, etc, using that toplinkSession.
    Thanks.

    We have enhanced our RAC FCF support in 11gR1 leveraging the new Universal Connection Pool to make it more seamless to the application. Which version of TopLink and OC4J are you using?
    Doug

  • Toplink support for SQL Server 2005 on Websphere 6.1

    Hi,
    We are using toplink in our application, it works fine when we use it with weblogic & SQL server or WAS 6.1 with Oracle or DB2. But when we use it with WAS 6.1 and SQL Server 2k5, it just does not work. It takes up all the connections in the pool and never returns it and starts giving connection time out errors.
    Internal Exception: com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 100005Error Code: 0
    Thanks

    This sounds like a WebSphere connection pool issue, I'm not sure why WebSphere would not work with SQL Server.
    You could try using TopLink's internal connection pooling instead.
    EclipseLink : http://www.eclipselink.org

  • DBMS_OUTPUT.PUT_LINE not working in Stored Functions

    Hi All,
    I have one doubt, why is dbms_output.put_line not supported in Stored Functions?
    create or replace function func_in_sql(var number) return varchar2
    is
    begin
    If var is not null then
    return to_char(dbms_output.put_line(var));
    else
    return to_char(dbms_output.put_line('null'));
    end if;
    end;
    Returns error -
    LINE/COL ERROR
    5/3 PL/SQL: Statement ignored
    5/18 PLS-00222: no function with name 'PUT_LINE' exists in this scope
    7/3 PL/SQL: Statement ignored
    7/18 PLS-00222: no function with name 'PUT_LINE' exists in this scope
    Any idea why this is happening?
    I know that to print value one can just use return statement and value will be printed in SQL Prompt.
    But what makes me think is why error for PUT_LINE method?
    If error is not thrown at DBMS_OTUPUT then doesnt that mean all methods of DBMS_OUTPUT should be accessible in a function.
    Thanks in advance!
    Av.

    Hi,
    For cant call proc inside func, or in-line thing you mentioned, just tried following -
    Here is our previous Func -
    create or replace function func_in_sql(var number) return varchar2
    is
    begin
    /*If var is not null then
    return to_char(dbms_output.put_line(var));
    else
    return to_char(dbms_output.put_line('null'));
    end if;
    exception_test;
    return 'a';
    end;
    and here is our proc -
    procedure exception_test
    as
    v_count1 number;
    v_count2 number;
    begin
    select count(test_id)
    INTO V_COUNT1
    from TEST_TABLE;
    If SQL%NOTFOUND Then
    dbms_output.put_line('notfound');
    End If;
    dbms_output.put_line(v_count1);
    exception
    when no_data_found then
    If SQL%NOTFOUND Then
    dbms_output.put_line('notfound');
    End If;
    dbms_output.put_line('no_data');
    WHEN TOO_MANY_ROWS THEN
    dbms_output.put_line('too many rows');
    when others then
    dbms_output.put_line('others');
    end;
    and here is the call to func -
    SQL> select func_in_sql(x) from t1;
    FUNC_IN_SQL(X)
    a
    a
    a
    a
    4 rows selected.
    So this shows it works.
    Is this what you said? or Am I getting you wrong?
    Thanks!
    Av.

  • Calling Stored Function from TopLink

    I have a simple Stored Function that I'm trying to call using TopLink API:
    TopLink Version: 10.1.3.3.
    Oracle JDBC Driver: ojdbc5.jar (Oracle JDBC Driver version - "11.1.0.6.0-Production+")
    Stored Procedure:
    Function Get_Email_Address_Id(P_EMAIL_ADDRESS IN varchar2) return number;
    TopLink Code:
    public String executeStoredFunction() {
    TopLinkTemplate tlTemplate = getTopLinkTemplate();
    StoredFunctionCall call = new StoredFunctionCall();
    call.setProcedureName("EMAIL_ADDRESS_PKG.Get_Email_Address_Id");
    call.setResult("FUNCTION_RESULT", String.class);
    call.addNamedArgument("P_EMAIL_ADDRESS");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("P_EMAIL_ADDRESS");
    Vector parameters = new Vector();
    parameters.addElement("1009");
    String result = (String)tlTemplate.executeQuery(query, parameters.toArray());
    return result;
    Error I'm getting:
    Exception [TOPLINK-7121] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070428)): oracle.toplink.exceptions.ValidationException
    Exception Description: DatabasePlatform does not support stored functions
         at oracle.toplink.exceptions.ValidationException.platformDoesNotSupportStoredFunctions(ValidationException.java:1299)
         at oracle.toplink.queryframework.StoredFunctionCall.prepareInternal(StoredFunctionCall.java:52)
         at oracle.toplink.internal.databaseaccess.DatabaseCall.prepare(DatabaseCall.java:494)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.prepareCall(CallQueryMechanism.java:102)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.prepareExecuteSelect(CallQueryMechanism.java:203)
         at oracle.toplink.queryframework.DataReadQuery.prepare(DataReadQuery.java:150)
         at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(DatabaseQuery.java:405)
         at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(DatabaseQuery.java:375)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:598)
         at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:96)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:965)
    Observations:
    Why is TopLink complaining about DatabasePlatform?
    I'm using Oracle 10g as my database platform. Did anyone encounter this problem?
    I have tried various combinations but it always have same complaint.
    Thanks in advance for help.

    Hello,
    It is complaining because the DatabasePlatform being used doesn't support functions. So the problem is that it is using the DatabasePlatform instead of the Oracle10Platform that you are expecting. How have you defined it? Could you have multiple sessions.xml files, and the one that is being picked not define the Oracle10Platform? Or could you be overriding the login somehow (prelogin event etc) and setting it to use the default DatabasePlatform by accident?
    Best Regards,
    Chris

Maybe you are looking for

  • Sync/Async bridge timeout?

    Hi, a ccBPM process produces some timeouts during the last week and i dont know why. The process produces the timeout in the third step: Step 1: Receive synchronous message via HTTP, open sync/async bridge Step 2: Mapping STep 3: Send back response f

  • Problems answering surveys with lotus notes

    Hello, We have a problem answering a questionnaire sent from BW to lotus notes.  When I open the html questionnaire that is in the message as attachment, answer the question and push the button 'Send questionnaire',lotus notes open a new message with

  • Can we track or get the list of sites and subnets deleted from ActiveDirectory?

    Can we track or get the list of sites and subnets deleted from Active Directory?

  • Disabling BC4J bound text fields

    If I have a JTextComponent bound to a database field, and I want to disable to the field, I call myTextField.setEnabled(false). This works initially, but as soon as the view is refreshed, the box somehow enables itself again. Can anyone explain this

  • (SOLVED) Kernel can't find root fs

    Hello to all! For some odd reason, my recently installed arch won't recognize it's root filesystem. I installed arch on /dev/sda10, and I have a separate /boot partition on /dev/sda1 GRUB 0.97 Config (arch line): title Arch Linux root (hd0,0) kernel