ADF (View Object) with open source database

Hi all,
Recently, I am evaluating JDeveloper 9.0.5.2 ADF with an open source database (Firebird).
I follow the instruction to:
1. Create an entity object
2. Create a view object for the entity object in 1
3. Create an application module for the view object in 2
4. Right click on the application module and test -> all worked fine
5. I created a jsp and drag the view (in 2) to it from Data Control Palette
6. Test it in OC4J -> an error occurred (not because of jdbc config)
JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT Department.DEPT_NO, Department.DEPARTMENT AS DEPARTMENT1, Department.HEAD_DEPT, Department.MNGR_NO, Department.BUDGET, Department.LOCATION, Department.PHONE_NO FROM DEPARTMENT Department) QRSLT ORDER BY DEPT_NO
GDS Exception. 335544569. Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 16 SELECT
To my knowledge, the error should be due to Firebird doesn't support the query syntax " select * (select col1, col2... from table) QRSLT where... order by... "
I am quite headache as this query is automatically generated by JDeveloper. I am figuring out whether I can change it. It seems that I have to play with the ViewObjectImpl class.
I do think ADF is an amazing technology. However, is it only so amazing with the Oracle technologies? Please correct me if I am wrong.
Hons

Dear Shay Shmeltzer,
Thank you for your reply. After hours of trying on Firebird, I still get the error:
JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT Department.DEPT_NO, Department.DEPARTMENT AS DEPARTMENT1, Department.HEAD_DEPT, Department.MNGR_NO, Department.BUDGET, Department.LOCATION, Department.PHONE_NO FROM DEPARTMENT Department) QRSLT ORDER BY DEPT_NO
GDS Exception. 335544569. Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 16 SELECT
I then downloaded the MySQL 4.0 and install on my system to do the exact procedures. No error! Thing works fine! Oh man...
For the Firebird case, a strange thing to note is that the data table (I dragged) contains data, but the error message is on top of it.
Actually, I don't have a particular database preference but I do hope ADF can work equally for these open-source databases. I think the problem may also be contributed by Firebird. Hope that I can figure it out this week.
Regards,
Hons

Similar Messages

  • [b]Open Source Databases ![/b]

    Hi every one Is there any body nice who can help me ?
    Q---What we can understand by the term Open Source
    Databases and products? Can anybody explain with examples
    links and information source and Sites ?
    Q---Open source Databases are worth investigating and prototyping? What does it mean?
    Q--- Open Source Databases are indeed delivering
    Medium sized enterprise-scale performance
    Scalability
    Robustness
    Manageability? What does it mean by?
    Q--Users & Independant Software vendors with respect to Open source Database?
    Q--What we can understand by Open Source DBMS?
    Q-- Some companies those have transitioned to Linux from Unix platforms buy minimal support from the Linux distributors and rely instead on support from the Open Source Community?Is this approach comes at cost?
    Q-- MySQL is full relational database with SQL support.Users view MySQL as simple, small footprint, and performant?Can any body xplain it more precisely?
    Q-- What do you mean by Deadlock detection, ACID(atomicity, consistency, isolation and durability), Row level locking, Open Database Connectivity?
    Q--In MySQL Bit-mapped indexing (for large data warehouses)?
    Q--Open database Connectivity (ODBC) and Open database source?
    Q--How Open Source Database is related to Oracle ? I mean object relational Database?
    Thanks in advance
    One can reply me on private E-mail adress i.e;
    [email protected]

    I have been looking into MySql and its not really impressed me. Not sure that there is anything better.
    And it depends on your usage.
    InstantDB is one http://www.lutris.com/downloads/index.html but it is limited to non-commercial use.
    Interbase (firebird) at http://firebird.sourceforge.net/
    I believe the unix side usually supports a variety that you could probably search for.
    And if cheap is ok, rather than free and open, and using it only for developement then you can get full versions of Oracle and MS SQL Server very cheaply.

  • ADF panel does not prompt for variable defined in ADF view object.

    I have created an ADF Panel, which allows the user to run a few simple queries against an Oracle database done using ADF view objects and ADF view links and ADF application module.
    One of these queries lookup detail information about a given database object (Table, view or whatever) from dba_objects. The SQL uses a parameter (:P_OBJ_NAME) that has a default value of “Departments”. If I run the ADF application module by itself outside of the ADF panel, all works fine, it prompts me to provide a value for the parameter :P_OBJ_NAME.
    As I said the panel contains the different ADF view links including the one that should prompt the user to provide a value for :P_OBJ_NAME. When I run the panel it does not prompt me for :P_OBJ_NAME, it just uses the default defined value “departments”.
    I hope I described my problem for every one to understand. The question obviously is how do I get the ADF panel to prompt the user to provide a value for parameter :P_OBJ_NAME, my expectation was that since the sql in the view object and the application module both are designed to prompt for a value for this parameter then the panel should do just that but it does not.
    You expert input would be most appreciated.
    Thanks.
    Bobby A.
    Edited by: Babak Akbari on Aug 13, 2009 8:34 AM
    Edited by: Babak Akbari on Aug 13, 2009 11:12 AM

    The prompting for a parameter is a feature we built into the ADF Tester - it is not a default behavior you get in your application when you just place a VO on your page.
    To get something like this expend the operations node under the VO in the data control palette, and drag the "Execute with parameters" operation to your page to drop it as a parameter form.
    This will provide your user a place to fill out the parameter and press a button to execute the query.

  • ADF View Object filtering

    Hi, This question is related to ADF table filters.
    Let us take an example of a View Object that is being dropped in a jspx page as a "ADF Table" with filters.
    Whenever user applies a filter on a column, will the data for view object be queried from database once again?
    Is there a way to avoid the query re-execution on applying filters in table.

    Thanks for the replies. Jdeveloper version we use is 11.1.1.6.
    I have a follow up question.
    We have a programmatic View Object which gets data from 3 different rows and populate them in view rows (We have overridden standard methods like executeQueryForCollection..etc)
    The data is displayed in a ADF table.
    Now when the user filters data, normally filter works fine but the web service calls are made every time the filters are applied/removed.
    We would like to avoid making calls to web services when user filters data by setting Query Mode to "QUERY_MODE_SCAN_VIEW_ROWS".
    But what happens is first time filter is applied, the filtered rows are displayed properly but from there on the query collection refers to filtered data only and not the complete data set.
    So when the user removes filter and hits enter again only filtered rows are displayed and not all the rows fetched initially. I am not sure why the query collection looses all the rows and keeps only filtered rows??

  • ADF View Object Capability

    Usually I use ADF View Object when I want to view data from table in Oracle DB.
    Now can View Object extract data from file? xml or csv format?
    Regards
    Erich

    Hi,
    no, ViewObjects work with queries against the database.
    Frank

  • Problem extending standard ViewReceiptsSearchVO view object with logic on get method

    Hi All,
    EBS 12.1.3
    Database 11.2.0.3
    I am trying to extend the 3 VOs related to ViewReceiptsSearch.  I extended a seeded ViewReceiptsSearchVO view object.  I haven't made any changes yet, no columns added, nothing altered.  When I run this substitution, the "Received" column is null.  This column in the view used for the view object only selects NULL and uses the getter method for the attribute to populate the value.  The generated extension getter calls getAttributeInternal and skips the logic in the standard getter and the substituted view object is displaying the null in the screen.  The below discussion explains the problem very well except that the original posted had the issue in 11.5.10.2.  I am having this issue with 12.1.3.
    Problem extending standard view object with logic on get method
    The 3 VOs that I am having the problem are:
    ViewReceiptsSearchVO
    ViewReceiptsSearchReqVO
    ViewReceiptsSearchSupplierVO
    What do I need to do to get the "Received" column populated?  Please let me know any additional information you want to troubleshoot the issue.
    Thanks.

    Hi,
    Can you Please Share Extended ViewReceiptsSearchVO.xml and .jpx File?
    Thanks,
    Dilip

  • Is mysql a free open source database or do you need a license for it in prd

    is mysql a free open source database or do you need a license for it in production.

    Hi,
    It should be free under GPL (General Public license).Usually it will comes with your operating system distribution (eg:RHEL)
    If you download it from Oracle site, it should have the commercial license tied to it, and you need to pay for that if it is in use for production.
    http://www.mysql.com/about/legal/licensing/index.html
    regards,
    mrak

  • Creating View Object with different criteria

    Hi,
    I have a requirement to execute the following queries in the application logic. We have YEAR table with mileage rates with different effective dates. If the service date is greater than any of the existing effective dates we need to get the rate with that effective date. if the service date is less than the existing effective dates, then we have to get the rate with least effective date.
    SELECT mileage_rate, ... FROM year
    WHERE eff_date =  (SELECT MAX(eff_date) FROM   year WHERE  eff_date <= :bServiceDate)
    SELECT MILEAGE_RATE, .... FROM YEAR WHERE
    EFF_DATE =  (SELECT MIN(EFF_DATE) FROM YEAR)
    We have to execute the 1st query and if there is no matching records then we have to take the second query with min effective date. At present we are creating two view objects for the above scenario. Is there any possibility to create one view object with different criteria. What is the best solution to handle the above problem in ADF.
    Thanks and Regards,
    S R Prasad

    Well on the ViewObjectImpl you can fire the method getQueryHitCount() passing in the required ViewRowSetImpl. If you get the query hit count as 0, use can attached the other query and execute it.

  • Inserting a new row in a BC4J View Object with an attribute of type BFileDomain

    Hi all,
    I've to insert a row in a View Object with an attribute of type oracle.jbo.domain.BFileDomain.
    I do this within an Application Module's method, which has an input parameter of type byte[]. This parameter will be the content of the BFILE.
    What's the right way for doing that?
    I've tried with the following code, but I've got an exception in committing the transaction:
    public int serializeDocument(int codDomanda, int codSorgente, byte[] content, String est, int type, int cost, String title, String arg) throws JboException {
    int code = 0;
    //File f;
    DocumentiTwoView = getDocumentiTwoView();
    java.sql.Statement stmt = ((DBTransaction) getTransaction()).createStatement(1);
    try {
    Row docRow = DocumentiTwoView.createRow();
    SequenceImpl seq = new SequenceImpl("documenti_seq", getDBTransaction());
    Integer next = (Integer) seq.getData();
    code = next.intValue();
    docRow.setAttribute("Coddocumento", new Number(code));
    docRow.setAttribute("Titolo", (String) title);
    docRow.setAttribute("Argomento", (String) arg);
    docRow.setAttribute("Costo", new Number(cost));
    docRow.setAttribute("Tipo", new Number(type));
    docRow.setAttribute("Coddomanda", new Number(codDomanda));
    docRow.setAttribute("Codsorgente", new Number(codSorgente));
    //f = new File("Doc" + code + "." + est)
    BFILE src_lob = null;
    ResultSet rset = null;
    rset = stmt.executeQuery ("SELECT BFILENAME('DOC_DIR', 'Doc" + code + "." + est + "') FROM DUAL");
    if (rset.next()) {
    src_lob = ((OracleResultSet)rset).getBFILE(1);
    BFileDomain bfd = new BFileDomain(src_lob);
    bfd.setBytes(content);
    bfd.saveToDatabase(getTransaction());
    docRow.setAttribute("Contenuto", (BFileDomain) bfd);
    catch (Exception ex) {
    getTransaction().rollback();
    throw new oracle.jbo.JboException("Impossibile creare il nuovo documento:\n" + ex.getMessage());
    finally {
    try {
    stmt.close();
    catch (Exception nex) {
    try {
    // Commit the whole transaction
    getTransaction().commit();
    catch (Exception e) {
    e.printStackTrace();
    getTransaction().rollback();
    throw new JboException("Impossibile eseguire il commit della transazione:\n" + e.getMessage());
    return code;
    Thanks a lot in advance!
    Christian
    null

    Odd, have you disabled caching and indirection? (NoIdentityMap, dontUseIndirection, or alwaysRefresh/disableCacheHits). If so, then this could be the issue.
    Otherwise please include the sample code you use to perform this, and verify that you do not have any unusual code in your set/get methods or in descriptor events. Also turn TopLink logging on and include a sample. Also ensure that you do not modify your objects until after registering them in the unit of work, and only modify the unit of work clones.

  • View Object with User Defined Type input

    I am trying to use a View Object with a query that requires a user defined object as an input parameter.
    I have the query working with a PreparedStatement, but would like to use a View Object.
    When I use the PreparedStatement, I prepare the user defined type data like this:
    // get the data into an object array
    Object[] wSRecObjArr = wSRec.getObjectArray();
    // set up rec descriptor
    StructDescriptor WSRecDescriptor = StructDescriptor.createDescriptor("WS_REC",conn);
    // populate the record struct
    STRUCT wSRecStruct = new STRUCT(WSRecDescriptor,conn,wSRecObjArr);
    Then I can use this in the PreparedStatement like this:
    OraclePreparedStatement stat = null;
    ResultSet rs = null;
    stat = (OraclePreparedStatement)conn.prepareStatement("Select test_pkg.test_function(?) FROM DUAL");
    stat.setSTRUCT(1, wSRecStruct);
    rs = stat.executeQuery();
    I would like to do the same process with a View Object instead of the PreparedStatement.
    My question is "How do I create the input objects"?
    I obtain the View Object from the Application Module using findViewObject(). I don't actually have a connection object to pass into the StructDescriptor.createDescriptor method.
    I have tried just using Java Object Arrays (Object[]) to pass the data, but that gave an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    Any help or pointers are greatly appreciated.
    Thank you.
    Edited by: 942120 on May 1, 2013 8:45 AM
    Edited by: 942120 on May 1, 2013 8:46 AM
    Edited by: 942120 on May 1, 2013 9:05 AM
    Edited by: 942120 on May 1, 2013 9:06 AM

    Custom domains are the way to go.
    When I try to pass custom domains that represent my user defined types - it works.
    However, one of the functions requires a table of a user defined type be passed in.
    I tried creating a domain of the table type. It forces me to add a field during creation (in JDEV), so I tried adding a field of type Array of Element of the domain representing the user defined type.
    I populate the table by setting the field I created, but the table is empty in PL/SQL (TEST_TAB.COUNT = 0).
    I also tried passing the oracle.jbo.domain.Array object, but that produced an error:
    java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call
    I also tried passing Object[], but that produced an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    How do I properly create, and pass an domain that represents a table of a user defined type?
    When I use a OraclePreparedStatement, I can pass a oracle.sql.ARRAY using stat.setARRAY.
    Thank you for the help you have provided, and any future advice.
    JDEV 10.1.2.3
    JDBC 10.2.0.5
    Edited by: 942120 on May 13, 2013 7:13 AM
    Edited by: 942120 on May 13, 2013 7:16 AM

  • View Object with ?-style query parameters - best place to locate code

    I am using a View Object with ?-style parameters, with a JClient applet. The query
    paramters are filled in from user-entered data:
    viewObject.setWhereClauseParams(parms); /* parms is the user data*/
    viewObject.executeQuery();
    Right now the above code is located in the applet. Is it more efficient to code this as a
    method in the ViewObject (or Application Module), then call the method from the Client with
    the supplied parameters?
    I'm still unclear as to how network traffic is affected by running code like this on the client
    as opposed to the server. Maybe someone could point me to a comprehensive dic that covers this.
    Thanks

    I am using a View Object with ?-style parameters, with a JClient applet. The query
    paramters are filled in from user-entered data:
    viewObject.setWhereClauseParams(parms); /* parms is the user data*/
    viewObject.executeQuery();
    Right now the above code is located in the applet. Is it more efficient to code this as a
    method in the ViewObject (or Application Module), then call the method from the Client with
    the supplied parameters?
    I'm still unclear as to how network traffic is affected by running code like this on the client
    as opposed to the server. Maybe someone could point me to a comprehensive dic that covers this.Yes, the above two methods will turn into two network roundtrips.
    You may run your application in Events profiler to get a list of 'roundtrip' calls being made in your app.
    Select Project-Settings->Profiler panel->Events panel.
    Deselect all events, expand BC4J events and select REMOTE_METHOD_CALL event type (1016). Then Profile your app using the event profiler and the profiler will list all the calls that BC4J roundtrip calls. You may use this info to narrow down the roundtrips by batching up operations in an exported method etc.
    Thanks

  • View object with bind variables in subqueries

    Hi,
    i create view object with this query:
    Select /*+ use_nl(p p2) */
    'F' tipo_persona,
    p.ID_PERSONA, p.TDOC, p.NDOC, p.DENO
    From SINT_PERSONA p,
    ( Select /*+ index(a SINT_PERSONA_IX2) */
    a.ID_PERSONA
    From SINT_PERSONA_DOCUMENTO a
    where ( NDOC = :p_cuit
    and :p_cuit is not null )
    ) p2
    Where p.id_persona = p2.id_persona
    AND (deno = upper(:p_deno) or
    :p_deno is null)
    AND (NDOC = :p_ndoc or
    :p_ndoc is null)
    and grado_confiab > 0
    My binding style is oracle named.
    Then I add the bind variables:
    p_cuit this is the only required
    p_ndoc
    p_deno
    but when i run the app module with p_cuit = 20123456780 i get this error:
    (oracle.jbo.SQLStmtException) JBO-27122: Error SQL durante la preparación de la sentencia. Sentencia: Select /*+ use_nl(p p2) */
    'F' tipo_persona,
    p.ID_PERSONA, p.TDOC, p.NDOC, p.DENO
    From SINT_PERSONA p,
    ( Select /*+ index(a SINT_PERSONA_IX2) */
    a.ID_PERSONA
    From SINT_PERSONA_DOCUMENTO a
    where ( NDOC = :p_cuit
    and :p_cuit is not null )
    ) p2
    Where p.id_persona = p2.id_persona
    AND (deno = upper(:p_deno) or
    :p_deno is null)
    AND (NDOC = :p_ndoc or
    :p_ndoc is null)
    and grado_confiab > 0
    ----- Nivel 1: Detalle 0 -----
    (java.sql.SQLException) Falta el parámetro IN o OUT en el índice:: 3
    How can i do this ?
    thanks.

    Thanks! that's right the bind variables when i use it on where clause must be required, so i change my sql to:
    Select /*+ use_nl(p p2) */
    'F' tipo_persona,
    p.ID_PERSONA, p.TDOC, p.NDOC, p.DENO
    From SINT_PERSONA p,
    ( Select /*+ index(a SINT_PERSONA_IX2) */
    a.ID_PERSONA
    From SINT_PERSONA_DOCUMENTO a
    where ( NDOC = :p_cuit
    and :p_cuit <> 0 )
    ) p2
    Where p.id_persona = p2.id_persona
    AND (deno = decode(:p_deno,'null',null,upper(:p_deno)) or
    :p_deno = 'null')
    AND (NDOC = decode(:p_ndoc,0,null,:p_ndoc) or
    :p_ndoc = 0)
    and grado_confiab > 0
    and my bind variables:
    p_ndoc required default value 0
    p_cuit required default value 0
    p_deno required default value null
    and works ok!
    thanks a lot !!!!

  • Implementing a view Object with Multiple Updateable Dependent Entity Objects

    Hello,
         I want to implement view object with multiple updateable entity object,
         i have refered this link its good https://forums.oracle.com/thread/63721
         here they have explained with 2 table,
         but when we have more then 5 tables and each table have Primary keys , Foreign key , Sequence and  trigger created on it. Then whats steps should i want to fallow.
         if possible some please provide the link or some one help me out how to do this .
         thanks in advance
         cheers

    Has the Advanced View Object Techniques been referred?

  • Implement a View Object with multiple entity objects

    Hi
    In 'How to' section on the 'otn.oracle.com' (Jdeveloper) web site is tutorial how to implement a View Object with multiple updateable dependent entity objects.
    It allows user to insert an employee and a department at the same time.
    But I would like to change this example to insert a new department only if it does not already exist. How to change this sample?
    Is there any other way to this?
    Thanks
    Regards
    Gorazd

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Use View Object with Alternative Data Sources in View Link

    In my case, I created a view object based on alternative data source (not with SQL query). I have setQuery(null) in the override create() function for this View Object. When I use this View Object at the destination end of the View Link, the setQuery(null) will raise Jbo-26016 exception (You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.) which does not allow me to do that. I looked Avrom's Framework for Database API-Based ADF BC, in which he override the DBTransaction and CallableStatement in order to intercept the default query clause set by the View Link. I'd like to see if there is any alternative ways to achieve my objective?

    Just following up what I found so far. I'm trying to use customized View Object based on alternative data source at the destination end of View Link with ADF 10.1.3.
    1. For the View Object at the destination end of View Link, I can not call setQuery() which will raise Jbo-26016 exception.
    2. I can omit the setQuery(null) call in my customized ViewObjectImpl, and as long as there is no SQL statement in the View Definition XML, it won't cause problem when calling the executeQueryForCollection() of the super class.
    3. The override executeQueryForCollection() must call the super.executeQueryForCollection() in order to get appropriate result (I tried to skip the call and it does not give back any results)
    4. The funny thing is, when I make getQuery() call in my customized ViewObjectImpl (I'm just trying to double check if the Query object is clean or not), the query object is set to "SELECT FROM" following the getQuery() call, and which causes the exceptions when I call super.exeuteQueryForCollection(). I found out later from the Javadoc API which is implemented in that way.
    So I guess my case is resolved by not making specific call to setQuery(null).

Maybe you are looking for

  • IPhone 6 not updating to iOs 8.3 either on phone or itunes

    I have tried several times to update my iPhone 6, both via the phone and iTunes, but it never completes. On the phone I get to the agree to terms press it and then nothing happens it remains in the terms and conditions! On iTunes it commences to down

  • Disabling tooltip in Oracle ADF 11g

    Dear All, Is there anyway to disable the Tooltip for the Application globally . As of now, we have this "shortDesc" attribute defined in all our component. Thanks in advance. Regards Deivee

  • Trouble opening internet links in Outlook & Duplicate icon on task bar

    Hi, I am having trouble opening links in my Outlook 2010 e-mail. If Firefox is already open the links open fine but if it's not open, nothing happens when I click on the link. Also, I'm trying to figure out why, on my desktop, when I open Firefox fro

  • How to stop the system to ask for a password

    How to make the system from asking for a password for every installation???

  • Safari 5 and OS X 10.6.2 update

    I downloaded Safari 5 and although it has nice features I notice a 15 to 20% drop-off on speed. Someone on this forum gave me some recommendations which I followed but only increased the speed slightly and sometimes not at all. I recently updated to