Problems creating extension (View Object) in JDeveloper 9.0.3.5

Note: I originally posted this on the JDeveloper forum - but I was told to post it in this forum.
This is on Windows XP Pro SP2 with JDeveloper 9.0.3.5 - patch 6469392 (appropriate for 11.5.10.6).
I'm trying to create an extension for a view object for the Oracle Applications Framework. I've exported the appropriate MDS repo contents to my system using export. One of the first issues I've seen is the step where I import the the business components XML file (server.xml) and I get the following warning:
Warning: This Business Components Package was built with an earlier version of Oracle Business Components for Java. Unable to upgrade since it is readonly. oracle.apps.pos.isp.server
I've encountered these strange "readonly" errors all along the way. When I try to create the VO itself, I notice the wizard is in readonly mode, preventing me from associating query columns with view attributes (I cannot change a view attribute for a query column for many of the query columns). Why are things in readonly mode?

I've seen is the step where I import the the business components XML file (server.xml) and I get the following warning:
Warning: This Business Components Package was built with an earlier version of Oracle Business Components for Java. Unable to upgrade since it is readonly. oracle.apps.pos.isp.server
Ans : VO , EM and AM related xml files not need to import to MDS, only PG and Region related xml file need to import to MDS.

Similar Messages

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • How to create a view object and attach with extended AM

    Hi,
    I tried to create new vo and attach this vo with the extended AM. But it is throwing error like 'PC.NAME : invalid identifier' (Actually this PC.NAME is exiting one).
    Now i want to know how to create a view object similar like seeded one but with one additional condition in the where clause.
    It is possible though extension, but i want to create two view object similar like seeded one, one with some other condition in the where clause
    and another one with some other condition.
    So for my requirement, i'll extend one VO and i'll add my condition but how to do it for second condition.
    But i want same seeded VO with two different condition.
    Any suggestions please,
    SAN

    SAN,
    There is no need to attach the newly created VO with extended AM. You need to attach the same with the standard AM.
    Regards,
    Gyan

  • Blog post : "Bug in Create/Edit View Criteria Wizard (JDeveloper 11g)"

    hi
    Using steps 1 to 13 from the blog post "Bug in Create/Edit View Criteria Wizard (JDeveloper 11g)" by Andrejus Baranovskis, I have been able to reproduce the issue he describes.
    see http://andrejusb.blogspot.com/2008/12/bug-in-createedit-view-criteria-wizard.html
    I the blog post comments he writes "... there was no time for me to fill bug in Metalink ...".
    Maybe someone from Oracle can pick it up from this forum post and file it as a bug if it is one (and if possible post the bug number here).
    many thanks
    Jan Vervecken

    The mechanism is to create a reproduceable test case, create a Service Request in metalink.oracle.com, post the test case, and convince the analyst to file it as a bug.
    It may be not efficient at some time, but this the way it is handled.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error when opening view object in Jdeveloper

    Hi,
    EBS version is 11.5.10 RUP4. JDeveloper version is 9.0.3, Business Component Version is 9.0.3.13.93.
    We need to modify a custom view object that has been extended from a standard VO. We do not have the original Java file of the custom VO, only its classes VOImpl and VORowImpl. As such, this should not be a problem: instead of modifying the custom VO we could extend it.
    The problem:
    When trying to update/extend the custom VO we get an error:
    Copy operation failed, some edits may not be cancellable
    Expected name instead of <.
    Exception in oracle.xml.parser.v2.XMLParseException
    Tracing back the problem we got this same error when OPENING the original VO. The original VO is oracle.apps.asn.opportunity.server.OpptySearchVO
    Any idea how we can solve this problem?
    Thanks in advance.
    Regards,
    Radu

    Radu,
    What kind of change you are trying to do, If you are try to change only the query without adding any parameter, you can open the VO.xml in a text file and change it.
    One more way is, create a new VO substitution with the same name, and extend the VO, then Copy the VOImpl and VORowImpl code into your new files and use it.
    What is the Jdeveloper Version 9.0.3 or 9.0.3.5
    What is the Build version for the Jdeveloper.
    Thanks.
    With Regards,
    Kali.
    OSSI.

  • BC Archive - problem with opening view object based on entity from archive

    We have encountered a weird problem with a reusable BC library on different PCs.
    Library was imported into a project following steps in section 25.7 of the ADF guide.
    A view object was created using some of the entities from the library.
    Model tested successfully with view object (using AppModule tester).
    Page developed with no problems.
    Application copied to a different PC.
    BC JAR files set up in lib folder and removed/readded to application model project. When attempting to open view object, get the error below.
    However, the View object still tests successfully using the AppModule tester.
    The page using the View object still runs successfully.
    I believe the problem is that when the archive was originally imported, it was imported from a different location. The Containees tag in the project .jpx file references that path name. But even when I edited the path name, I still could not open the view object. Do we have to remove and redo the import of the library each time the application is copied to a different machine?
    Error when attempting to edit View Object:
    oracle.jbo.dt.objects.JboException: The following object(s) referred to objects that could not be found:
    com.guideworkstv.ibo.webstagemodel.AcctReqForReviewViewObj
    com.guideworkstv.ibo.webstagemodel.AcctReqForReviewViewObj
    Could not find the following referenced object(s):
    com.guideworkstv.ibo.model.webstage.entities.IboAccountRequest
    com.guideworkstv.ibo.model.webstage.entities.IboAccountRequest
         at oracle.jbo.dt.objects.JboException.throwException(JboException.java:81)
         at oracle.jbo.dt.objects.JboPackage.loadResolveReferencesXML(JboPackage.java:1397)
         at oracle.jbo.dt.objects.JboPackage.finishObjectsLoad(JboPackage.java:1042)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:972)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:951)
         at oracle.jbo.dt.objects.JboBaseObject.loadFromXMLFile(JboBaseObject.java:2615)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:880)
         at oracle.jbo.dt.objects.JboPackage.checkForLoad(JboPackage.java:451)
         at oracle.jbo.dt.objects.JboPackage.findContainedObjectByName(JboPackage.java:440)
         at oracle.jbo.dt.objects.JboPackage.findObjectByName(JboPackage.java:1999)
         at oracle.jbo.dt.objects.JboApplication.findObjectByName(JboApplication.java:959)
         at oracle.jbo.dt.objects.JboUtil.fileURLToObject(JboUtil.java:510)
         at oracle.jbo.dt.jdevx.ui.JdxJboAddin$1.handleCopy(JdxJboAddin.java:997)
         at oracle.jdeveloper.compiler.CopyTranslator.handledByListeners(CopyTranslator.java:125)
         at oracle.jdeveloper.compiler.CopyTranslator.translate(CopyTranslator.java:263)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:516)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProject(UnifiedBuildSystem.java:609)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:666)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:894)

    We have resolved this problem by making sure that all machines have identical paths for both the working and the lib directories. It would be nice not to have to do this though.

  • How to create dynamic View Object and Dynamic Table

    Dear ll
    I want to create a dynamic view object and display the output in a dynamic table on the page.
    I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0"
    This what I did:
    1- I created a read only view object with this query "Select sysdate from dual"
    2- I added this View object to the application module
    3- I created a new method that change the query of this View object at runtime
        public void changeVoQuery(String dbViewName) {
            String sqlstm = "Select * From " + dbViewName;
            ViewObject dynamicVo = this.findViewObject("DynamicVo");
            if (dynamicVo != null) {
                dynamicVo.remove();
            dynamicVo = this.createViewObjectFromQueryStmt("DynamicVo", sqlstm);
            dynamicVo.executeQuery();
    4- I run the application module for testing the method and I passed "Scott.Emp" as a parameter and the result was Success
    5- Now I want to show the result of the view on the page, so I draged and dropped the method from the data control as a parameter form
    6- I dragged and dropped the view Object "DynamicVo" as a table and I choose "generate Column Dynamically at runtime". This is the page source
    <af:panelHeader text="#{viewcontrollerBundle.SELECT_DOCUMTN_TYPE}" id="ph1">
            <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.dbViewName.inputValue}" label="#{bindings.dbViewName.hints.label}"
                              required="#{bindings.dbViewName.hints.mandatory}"
                              columns="#{bindings.dbViewName.hints.displayWidth}"
                              maximumLength="#{bindings.dbViewName.hints.precision}"
                              shortDesc="#{bindings.dbViewName.hints.tooltip}" id="it1">
                    <f:validator binding="#{bindings.dbViewName.validator}"/>
                </af:inputText>
                <af:button actionListener="#{bindings.changeVoQuery.execute}" text="changeVoQuery"
                           disabled="#{!bindings.changeVoQuery.enabled}" id="b1"/>
            </af:panelFormLayout>
        </af:panelHeader>
        <af:table value="#{bindings.DynamicVo.collectionModel}" var="row" rows="#{bindings.DynamicVo.rangeSize}"
                  emptyText="#{bindings.DynamicVo.viewable ? 'No data to display.' : 'Access Denied.'}"
                  rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicVo.collectionModel.selectedRow}"
                  selectionListener="#{bindings.DynamicVo.collectionModel.makeCurrent}" rowSelection="single"
                  fetchSize="#{bindings.DynamicVo.rangeSize}" filterModel="#{bindings.DynamicVoQuery.queryDescriptor}"
                  queryListener="#{bindings.DynamicVoQuery.processQuery}" filterVisible="true" varStatus="vs" id="t1"
                  partialTriggers="::b1">
            <af:iterator id="i1" value="#{bindings.DynamicVo.attributesModel.attributes}" var="column">
                <af:column headerText="#{column.label}" sortProperty="#{column.name}" sortable="true" filterable="true"
                           id="c1">
                    <af:dynamicComponent id="d1" attributeModel="#{column}"
                                         value="#{row.bindings[column.name].inputValue}"/>
                </af:column>
            </af:iterator>
        </af:table>
    when I run the page this error is occured
    <Nov 13, 2013 2:51:58 PM AST> <Error> <oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    Caused By: java.lang.NullPointerException
    Can any body help me please
    thanks

    Have you seen Shay's video https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-_for_a
    All you have to do is to use the dynamic table to get your result.
    Timo

  • Problem in using View Object for validation

    Hi,
    I have defined a simple swing form to practice. It has one Entity Object and two View objects. One of these view objects is an updatable VO based on the EO and the other one has a simple "select count(*)" from a table. I defined a method validation on one of the EO attributes to see how can i use the VO for validation. On the other hand i defined the Application Module to use both of my views. As far as i undrestood, when i define a VO for AM, the AM will instantiate it the first time it starts running. Here is the code inside the method validation for FirstName attribute:
    /**Validation method for FirstName
    public boolean validateFirstName(String data) {
    ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("CountEmployeeInstance");
    if (vo == null) {
    System.out.println("vo is null");
    else {
    vo.executeQuery();
    if (vo.hasNext()){
    System.out.println("count = " + ((CountEmployeeRowImpl) vo.next()).getCount());
    else {
    System.out.println("vo has no next");
    return true;
    The problem is that vo.executeQuery() does not return any record. In fact the vo.hasNext() returns false and i get the message "vo has no next" on the console. Please pay attention that the VO's sql statement is SELECT COUNT(*) and it always returns a record. I found that if i use vo.closeRowSet() before vo.executeQuery() everything works fine.
    Please tell me that what is my problem and why is it working like this?
    Best Regards,
    Alireza Vali

    Chris,
    1- Every thing is fine with the ADF model layer in this practice. I have tested it by using Test option on AM and it works. It works exactly the same as how it works throug swing UI that i use for it.
    2- The VO is beeing found and as you see in the code, i have tested it by "if (vo == null)" just after the statement which finds it and vo is not null which means it has been instantiated by AM as it was supposed to.
    3- The VO's SQL statement is "SELECT COUNT(*) FROM EMPLOYEE" with no where clause. I have 14 records in this table.
    Every thing is OK with swing form. It runs and shows the records and all the binded operations like "next record", "previous record" and so on work perfectly on the records.
    4- The code i used is a combination of two examples. Example 9-7 and 9-8 in pages 9-12 and 9-13 of mentioned document.
    Now my findings:
    I changed the code to the following:
        /**Validation method for FirstName
        public boolean validateFirstName(String  data) {
            ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("MaxEmployeeIdInstance");
            if (vo == null) {
                System.out.println("vo is null");
            else {
                //vo.closeRowSet();
                vo.executeQuery();
                System.out.println("Row Count = " + vo.getRowCount());
                System.out.println("Default Slot = " + vo.getCurrentRowSlot());
                vo.next();
                System.out.println("Slot after next() = " + vo.getCurrentRowSlot());
                vo.reset();
                System.out.println("Slot after reset() = " + vo.getCurrentRowSlot());
                vo.first();
                System.out.println("Slot after first() = " + vo.getCurrentRowSlot());
                vo.last();
                System.out.println("Slot after last() = " + vo.getCurrentRowSlot());
                System.out.println("----------------------");
                vo.executeQuery();
                System.out.println("Deafault index = " + vo.getCurrentRowIndex());
                vo.next();
                System.out.println("Index after next() = " + vo.getCurrentRowIndex());
                vo.reset();
                System.out.println("Index after reset() = " + vo.getCurrentRowIndex());
                vo.first();
                System.out.println("Index after first() = " + vo.getCurrentRowIndex());
                vo.last();
                System.out.println("Index after last() = " + vo.getCurrentRowIndex());
                System.out.println("Slot Before First = " + vo.SLOT_BEFORE_FIRST);
                System.out.println("Slot Beyound Last = " + vo.SLOT_BEYOND_LAST);
            return true;
        }Here are the results :
    Row Count = 1
    Default Slot = 0
    Slot after next() = 3
    Slot after reset() = 0
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = 0
    Index after next() = -1
    Index after reset() = 0
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyound Last = 3
    As you see, after the execution of the statement "vo.executeQuery()" the The RowIterrator pointer is not pointing to the slot before the first record but it is pointing to the first record itself. And that is why the statement "if (vo.hasNext()" returns false because we just have one record and RowIterrator Index is standing on that record and there is no next record present. The very important thing is that even reset() method does not set the index to the slot before the first record and it sends it to the first record.
    After that, i took the statemet "vo.closeRowSet()" out of the comment and here are the results:
    Row Count = 1
    Default Slot = 2
    Slot after next() = 0
    Slot after reset() = 2
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = -1
    Index after next() = 0
    Index after reset() = -1
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyond Last = 3
    These are the exact things that we expected from the first. After query execution, the pointer is set to the slot before first record and the reset() method does its defined job which is sending the pointer to the slot before the the first record.
    My Assumptions:
    The Rowset which is created by AM is somehow different from the RowSet which you create in your program. I am absolutely sure that this functionality is not a bug but a design decission. I look at my simple program and see that when it runs, the data is queried and shown on the screen which is all done by AM by instantiating my VO and executing the query on it. AM reasonably must put the RowSet pointer on the first record and not the slot before first record. And i am sure that if i use reset() method on the shown RowSet, the pointer goes to the first record and the data on the screen does not get cleared. Whe we use vo.closeRowSet() and execute the query again, the AM made RowSet is closed and a new one is created and the new RowSet is your's not AM's so it functions as you expect.
    Best Regards,
    Alireza Vali

  • Problem creating a view

    I need some help with a query that I need to use in order to create a view.
    It's fairly complicated, at least for me.
    Here is a short summary of the problem:
    There is a table involved called salesperson.
    This table has a four digit salespersonid, lastname, firstname, hiredate, and supervisor columns.
    The supervisor column holds the four digit salespersonid of the supervisor of that particular sales person.
    This column is null if that salesperson is the supervisor.
    Now I need to generate a view that summarizes book sales by salesperson and shipping state.
    7 columns are required.
    Salespersonid
    Sales person Name
    State (based on shipstate)
    Total number of orders
    total amount of sales
    Total profit
    Last name of person's supervisor.
    It is that last one that is giving me fits.
    I don't know how to get the supervisor last name in the output.
    Also, if the salesperson is the supervisor (i.e. supervisor column is null) I need to display (none) there. It can't be blank.
    Here is what I have so far:
    SELECT s.salespersonid AS ID, s.lastname || ', ' || s.firstname AS salesperson, shipstate,
           COUNT(DISTINCT order#) AS "TOTAL ORDERS", SUM(retail * quantity) AS "GROSS SALES",
           SUM((retail - cost) * quantity) AS "PROFIT"
    FROM  salesperson s LEFT JOIN orders o ON s.salespersonid = o.salespersonid
    LEFT JOIN orderitems oi ON o.order# = oi.order#
    LEFT JOIN books b ON oi.isbn = b.isbn
    GROUP BY s.salespersonid, s.lastname || ', ' || s.firstname, shipstateIt seems to me that I have to use a self join but my brain is cooked, and I can't seem to figure this out.
    I have scripts here that would generate the tables and data I am using.
    It's a small database. (If anyone is familiar with Oracle 10g SQL by Joan Casteel it is the JustLeeBooks database used throughout that book)
    I don't really want to post these scripts here. It would make for quite a long post.
    There are seven of them to get the data consistent with what I am using here.
    If someone is willing to spend some time helping me, I could e-mail them the scripts.
    They are the script that sets up the initial database and then 6 more scripts I have written to get to this point.
    They kind of build on one another.
    Send me a private message if you are willing to do that.
    We could then bring the discussion back here if that is to your liking.
    Any takers?
    Maybe someone can help without those scripts?

    Hi..
    If i understood you need this query can help you..
    SELECT s.salespersonid AS ID, s.lastname || ', ' || s.firstname AS salesperson, shipstate,
           COUNT(DISTINCT order#) AS "TOTAL ORDERS", SUM(retail * quantity) AS "GROSS SALES",
           SUM((retail - cost) * quantity) AS "PROFIT",
           nvl(sup.lastname || ', ' || sup.firstname,'none') AS supervisor
    FROM  salesperson s LEFT JOIN orders o ON s.salespersonid = o.salespersonid
    LEFT JOIN orderitems oi ON o.order# = oi.order#
    LEFT JOIN books b ON oi.isbn = b.isbn
    LEFT JOIN salesperson sup ON s.supervisorid = sup.salespersonid
    GROUP BY s.salespersonid, s.lastname || ', ' || s.firstname, shipstate, nvl(sup.lastname || ', ' || sup.firstname,'none') Not Tested.
    Tell me if there is that you need !!!

  • ADF : Merging View Objects in JDeveloper

    There is a view object called ProjectVO, under this view object I have ProjectApplicationVO(Hierarchy In Data Controls). So using PPR Ican get project Applications related to each project.
    But there is a another viewObject ApplicationVO which has ApplicationDocumentVO (Hierarchy In Data Controls)in it.So I can get documents related to each Applications using PPR easily.
    Now I have a new requirement..... Which is ,
    If I click on a project from ProjectVO, I should get ProjectApplications related to that project which I can do using hierarchy present in Data Controls. But after this if user clicks on any application from ProjectApplicationsVO, I need to display documents related to that Project Application.
    Could anyone please let me know how to implement it?
    Existing ViewObjects:
    ProjectVO---->ProjectApplicationsVO
    DocumentVO---->ApplicationDocumentVO
    Requirement:
    Project----> ProjectApplications----->Application Documents

    Hi,
    I have created the View Link but I am not able to add this view link as a 3rd hierarchical in AM...
    Can you please tell me how to add this View Link as a third hierarchy in the Application Module?
    Edited by: 977652 on Jan 9, 2013 4:39 AM

  • Problem with a View Object

    Hi,
    I am using ADF BC technology.
    I've got a curious for me problem...
    I get from a creation form a code that the user enter, a method in the app. module checks
    using the view object if the code exists or not...
    The code always Exist! Debugging I found out that the code that is found is the code that the user tries to enter...
    Am I missing something?
        public String add() {
            BindingContainer bindings = getBindings();
             if (bindings != null) {
                OperationBinding operationBinding = bindings.getOperationBinding("checkKbExam");
                 operationBinding.getParamsMap().put("code",inputText2.getValue());
                 Boolean  result = (Boolean) operationBinding.execute();
                System.out.println("balame gia code: "+ inputText2.getValue());
                System.out.println("pirame apo appmodule: "+result );
                if(result==false){
                    FacesContext context = FacesContext.getCurrentInstance();
                    operationBinding =
                            (OperationBinding)bindings.getOperationBinding("getMsg");
                    operationBinding.getParamsMap().put("msgId", "5");
                    String msg = (String)operationBinding.execute();
                    FacesMessage message1 =
                        new FacesMessage(msg);
                    context.addMessage(null, message1);
                    return"null";
                 OperationBinding operationBinding1 =bindings.getOperationBinding("Commit");
                 operationBinding1.execute();
        public boolean checkKbExam(String code) {
           checkKbExamImpl check  = getcheckKbExam1();
           check.setTheGivenCode(code);     
           check.executeQuery();
           Row[] row = check.getAllRowsInRange();
           getcheckKbExam1().setCurrentRow(row[0]);
           System.out.println(row[0].getAttribute("RefCodeSystem"));
           try{
               System.out.println(row[1].getAttribute("RefCodeSystem"));
            catch(Exception e){
            System.out.println("error "+ e);
           if (row.length>0) {
              System.out.print("mikos einai  " + row.length);
              return false;
             return true;
        }

    No solution yet guys ...and it's really annoying!
    When i put a "code" that does not exists in the table...the array length is 1.
    When it exists it's again 1 !!!!
    so what does it leave me?
    pls somebody help

  • Problems creating a view that's a union of two other views

    Hello all you Oracle folks,
    I'm pretty new to this Oracle thing, coming over from SQL Server where life was simple. Here's my issue;
    I am trying to create a view that is a union of two other views.
    I can run the top SELECT of this view (before the UNION) and it works no problem, and I can run the bottom SELECT (after the UNION) and it also works with no problem. I can run a DESC on both views involved, and those also work without any problem.
    When I try to run the SQL all together though, I get this;
    SQL> CREATE materialized view trkmaster.cmp_pmr_union refresh force ON demand AS SELECT 'CMR'
    2 "Ticket_System", "Id_col" "Ticket", "Submitter", "Submit_Date", "Submit_To",
    3 "Actual_Activity_Start_Date" "Start_Date", "Actual_Activity_Start_Time" "Start_Time",
    4 "Actual_Activity_End_Date" "End_Date", "Actual_Activity_End_Time" "End_Time",
    5 "Close_Date", "Risk_Level" "Level", "Activity_Type" "Type", "Activity_Category"
    6 "Category", "Hardware_Name" "Hardware", "Platform", "Application_Name" "Application",
    7 "Completion_Status" "Status", "Area_CMPO" "Owner", "Outage_Minutes" "Total_Outage_Mins",
    8 "Acorde_Downtime__in_minutes_" "Acorde", "Atlas", "Corporate_Email_Downtime"
    9 "Corporate_Email", "Data_Warehouse_Downtime__In_M6" "Data_Warehouse",
    10 "E__Commerce_Downtime__In_Mins_" "ECommerce", "FMDS__FIVR_" "FMDS_FIVR",
    11 "FMDS_Hotels_Downtime" "FMDS_Hotels", "FMDS_Internet_Downtime" "FMDS_Internet",
    12 "FMDS_Resv__Ctr_Downtime" "FMDS_Resv_Ctr", "GDS_Downtime__In_Mins_" "GDS",
    13 "HI_Online_Downtime__In_Mins_" "HI_Online", "Holidex__CRO____In_Mins_" "Holidex_CRO",
    14 "Holidex__Hotels____In_Mins_" "Holidex_Hotels", "Hyperion_Essbase",
    15 "IHGMail_Downtime__In_Mins_" "IHG_Mail", "Kofax_Downtime__in_minutes_" "Kofax",
    16 "PeopleSoft_Fin_Downtime_In_Mi1" "Peoplesoft", "PERFORM__HIRO____In_Mins_" "Perform_HIRO"
    17 FROM CMP.CHRQVCHANGE_MANAGEMENT_REQUEST UNION SELECT 'PMR' "Ticket_System", "Id_col"
    18 "Ticket", "Submitter", "Submit_Date", "Submit_To", "Problem_Start_Date" "Start_Date",
    19 "Problem_Start_Time" "Start_Time", "Problem_End_Date" "End_Date", "Problem_End_Time"
    20 "End_Time", "Close_Date", "Severity_Level" "Level", "Problem_Type" "Type",
    21 "Occurrence_Type" "Category", "Hardware_Name" "Hardware", "Platform", "Application_Name"
    22 "Application", "Close_Code" "Status", "Problem_Owner" "Owner",
    23 "TOTAL_Outage_Time__If_Any_" "Total_Outage_Time", "Acorde_Downtime__in_minutes_" "Acorde",
    24 "Atlas", "Corporate_Email_Downtime" "Corporate_Email", "Data_Warehouse_Downtime__In_M6"
    25 "Data_Warehouse", "E__Commerce_Outage_Time__Mins_" "ECommerce", "FMDS__FIVR_" "FMDS_FIVR",
    26 "FMDS_Hotels_Outage_Time__In_M5" "FMDS_Hotels", "FMDS_Internet_Outage_Time__Mi4"
    27 "FMDS_Internet", "FMDS_Resv__Ctr_Outage_Time__M3" "FMDS_Resv_Ctr",
    28 "GDS_Outage_Time__Mins_" "GDS", "HI_Online_Outage_Time__In_Min2" "HI_Online",
    29 "Holidex__CRO____In_Mins_" "Holidex_CRO", "Holidex__Hotels____In_Mins_" "Holidex_Hotels",
    30 "Hyperion_Essbase", "IHG_Mail_Outage_Time__In_Mins_" "IHG_Mail",
    31 "Kofax_Downtime__in_minutes_" "Kofax", "PeopleSoft_Fin_Downtime_In_Mi1" "Peoplesoft",
    32 "PERFORM__HIRO____In_Mins_" "Perform_HIRO" FROM PMR.CHRQVPROBLEM_MANAGEMENT;
    "PERFORM__HIRO____In_Mins_" "Perform_HIRO" FROM PMR.CHRQVPROBLEM_MANAGEMENT
    ERROR at line 32:
    ORA-00942: table or view does not exist
    The 'CMR' and 'PMR' as Ticket_System is me trying to assign a literal as a newly created column.
    All the data types match from one view to the other.
    If I switch around the SQL so the 'CMR' view is at the bottom and the 'PMR' view is at the top, it still errors out on the 'PMR' view as not existing, even though I can DESC it and run the SELECT using that view. A coworker thinks it could be some kind of view alias issue (?).
    I know the view exists, and I can access it no problem. Any ideas why this isn't working? It seems so simple, I could do this in a heartbeat in SQL Server. I have very few hairs left to rip out, so any help would be appreciated.

    SELECT 'CMR' "Ticket_System",
    "Id_col" "Ticket",
    ....you have wrapped up your columns with a double quotes and use an alias. i tried the same thing
    but using a different table and it does not work.
    SQL> desc emp;
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                    NOT NULL NUMBER(2)
    SQL> select "empno" "employee_number"
      2    from emp;
    select "empno" "employee_number"
    ERROR at line 1:
    ORA-00904: "empno": invalid identifier
    SQL> how were you able to run the top level of your SQL before the UNION clause? did you run it thru some tools
    other than SQL*Plus?

  • Problem creating a view in Administrator: 942: table or view does not exist

    Hi and thank you for reading,
    I am working with the Administration tool and would like to create a view in the physical layer. However I am getting the following error messages when I try to view the Date in the view:
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occured.
    [nQSError: 43093] An error occured while processing the EXECUTE PHYSICAL satement.
    *[nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute.*
    [nQSError: 17010] SQL statement preparation failed.
    I proceed as following:
    Right click on a physical schema (this schema is already created and works in Answers) -> new Physical Schema ->Table Type: Select -> Select * from Table_A where name='name' (Table_A is in the physical schema) -> OK -> Save -> Deploy -> Update Row count (works) -> View Data -> Error
    Any Idea what I am doing wrong. I have started with an easy select statement to test how to create a view in Oracle Administrator.
    Thanks a lot for any help
    Evgeny

    Do you see Table_A, and in which database schema?
    Try to put alias (database user) before table name.
    Select * from user.Table_A where name='name'
    Where user is database user.
    If you have Table_A in another user and connection pool is set to different user, then grant select from Table_A owner to connection pool user (make synonym for Table_A):
    Example (I'm using connection pool from userB and have tables from userA and userB).
    create or replace public synonym xx for userA.xx
    and
    grant select on xx to userB
    Hope this helps.
    Regards,
    Goran
    http://108obiee.blogspot.com

  • Unable to create attachment view link in jdeveloper

    Hi ,
    I am trying to configure an Attachment view link in Jdeveloper - using FUSIONAPPS_11.1.1.5.1.linux_x64 series.I followed the steps mentioned in the developer guide.
    http://docs.oracle.com/cd/E25178_01/fusionapps.1111/e15524/ui_attachments.htm#BABFJBFH
    I am getting an error
    java.lang.NoClassdDefFoundError : Could Not initialize class oracle.apps.fnd.applcore.oaext.model.OASeedDataProperty.
    I traced this class file to mw_home/jdeveloper/jdev/oaext/adflib/Common-model.jar and added in the model project library class path.
    Please let me know if someone has faced this issue and the resolution.
    regards
    Deepak

    User, you are in the wrong forum!
    you may try {forum:id=210}
    Timo

  • Problem creating materialized view

    OK, I'm totally new in using materialized views.
    I'm trying to create one and to make it refreshed on commit
    CREATE MATERIALIZED VIEW VK_CLIENT  build immediate refresh fast on commit AS
      select c1.code,
    c1.fiche fiche_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 'M. et Mme', c1.lnte ), c1.lnte ) lnte_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 
    decode( c1.lnte, 'M.', c1.libe, c7.libe ), c1.libe ), c1.libe ) libe_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 
    decode( c1.lnte, 'M.', substr( c1.libe, 1, c1.lgnom ), substr( c7.libe, 1, c7.lgnom ) ), substr( c1.libe, 1, c1.lgnom ) ), substr( c1.libe, 1, c1.lgnom ) ) nom_1,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', 
    decode( c1.lnte, 'M.', initcap( substr( c1.libe, c1.lgnom + 2 ) ), initcap( substr( c7.libe, c7.lgnom + 2 ) ) ), initcap( substr( c1.libe, c1.lgnom + 2 ) ) ), initcap( substr( c1.libe, c1.lgnom + 2 ) ) ) prenom_1,
    decode( c1.sfam, '04', decode( c7.sfam, '04', decode( c1.lnte, 'Mlle', 'Mme', c1.lnte ), c1.lnte ), c1.lnte ) lnte_1_bis,
    c1.libe libe_1_bis,
    substr( c1.libe, 1, c1.lgnom ) nom_1_bis,
    initcap( substr( c1.libe, c1.lgnom + 2 ) ) prenom_1_bis,
    c1.sfam sfam_1,
    c1.dnai dnai_1,
    decode( to_char( c1.dnai, 'dd' ), '01', '1er', 
    decode( substr( to_char( c1.dnai, 'dd' ), 1, 1 ), 0, substr( to_char( c1.dnai, 'dd' ), 2 ), to_char( c1.dnai, 'dd' ) ) ) || ' ' || 
    rtrim( to_char( c1.dnai, 'month', 'nls_date_language = french' ) ) || to_char( c1.dnai, ' yyyy' ) dnai_fr_1,
    c1.horsfoyer horsfoyer_1,
    decode( c1.lnte, 'Mlle', 'f', 'Mme', 'f', 'M.', 'm' ) accord_1,
    c7.fiche fiche_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, c7.lnte ), c7.lnte ) lnte_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, c7.libe ), c7.libe ) libe_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, substr( c7.libe, 1, c7.lgnom ) ), substr( c7.libe, 1, c7.lgnom ) ) nom_7,
    decode( c1.sfam, '04', 
    decode( c7.sfam, '04', null, initcap( substr( c7.libe, c7.lgnom + 2 ) ) ), initcap( substr( c7.libe, c7.lgnom + 2 ) ) ) prenom_7,
    decode( c7.sfam, '04', decode( c1.sfam, '04', decode( c7.lnte, 'Mlle', 'Mme', c7.lnte ), c7.lnte ), c7.lnte ) lnte_7_bis,
    c7.libe libe_7_bis,
    substr( c7.libe, 1, c7.lgnom ) nom_7_bis,
    initcap( substr( c7.libe, c7.lgnom + 2 ) ) prenom_7_bis,
    c7.sfam sfam_7,
    c7.dnai dnai_7,
    decode( to_char( c7.dnai, 'dd' ), '01', '1er', 
    decode( substr( to_char( c7.dnai, 'dd' ), 1, 1 ), 0, substr( to_char( c7.dnai, 'dd' ), 2 ), to_char( c7.dnai, 'dd' ) ) ) || ' ' || 
    rtrim( to_char( c7.dnai, 'month', 'nls_date_language = french' ) ) || to_char( c7.dnai, ' yyyy' ) dnai_fr_7,
    decode( c7.lnte, 'Mlle', 'f', 'Mme', 'f', 'M.', 'm' ) accord_7,
    initcap( decode( instr( lower( c1.adr1 ), 'log' ), '1', c1.adr2, decode( instr( lower( c1.adr1 ), 'bât' ), '1', c1.adr2, c1.adr1 ) ) ) adr1,
    initcap( decode( decode( instr( lower( c1.adr1 ), 'log' ), '1', c1.adr2, decode( instr( lower( c1.adr1 ), 'bât' ), '1', c1.adr2, c1.adr1 ) ), c1.adr2, null, 
    decode( instr( lower( c1.adr2 ), 'log' ), '1', c1.adr3, decode( instr( lower( c1.adr2 ), 'bât' ), '1', c1.adr3, c1.adr2 ) ) ) ) adr2,
    initcap( decode( instr( lower( c1.adr3 ), 'log' ), '1', null, decode( instr( lower( c1.adr3 ), 'bât' ), '1', null, c1.adr3 ) ) ) adr3,
    c1.ptt,
    c1.lcom,
    decode( c7.fiche, null, decode( c1.lnte, 'Mme', 'Madame', 'Mlle', 'Mademoiselle', 'M.', 'Monsieur', 'Monsieur' ),
    decode( nvl( c1.sfam, '07' ), '04', 
    decode( nvl( c7.sfam, '07' ), '04', 'Madame, Monsieur', 
    decode( c1.lnte, 
    'Mme', decode( c7.lnte, 'Mme', 'Mesdames', 'Mlle', 'Madame, Mademoiselle', 'M.', 'Madame, Monsieur', 'Madame, Monsieur' ), 
    'Mlle', decode( c7.lnte, 'Mme', 'Madame, Mademoiselle', 'Mlle', 'Mesdemoiselles', 'M.', 'Mademoiselle, Monsieur', 'Mademoiselle, Monsieur' ),
    'M.', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    '. ', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    decode( c1.lnte,
    'Mme', decode( c7.lnte, 'Mme', 'Mesdames', 'Mlle', 'Madame, Mademoiselle', 'M.', 'Madame, Monsieur', 'Madame, Monsieur' ),
    'Mlle', decode( c7.lnte, 'Mme', 'Madame, Mademoiselle', 'Mlle', 'Mesdemoiselles', 'M.', 'Mademoiselle, Monsieur', 'Mademoiselle, Monsieur' ),
    'M.', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    '. ', decode( c7.lnte, 'Mme', 'Madame, Monsieur', 'Mlle', 'Mademoiselle, Monsieur', 'M.', 'Mesieurs', 'Mesieurs' ),
    '-' ) ) ) lnte_long,
    decode( c1.cfam, null, c7.cfam, c1.cfam ) cfam,
    decode( c1.cfam, null, c7.allo, c1.allo ) allo,
    decode( c1.sexe, 'm', decode( c7.sexe, null, 'ms', 'm', 'mp', 'f', 'mp' ), 'f', decode( c7.sexe, null, 'fs', 'm', 'mp', 'f', 'fp' ), '-' ) accord,
    c9.fiche fiche_9,
    c9.lnte lnte_9,
    c9.libe libe_9,
    substr( c9.libe, 1, c9.lgnom ) nom_9,
    initcap( substr( c9.libe, c9.lgnom + 2 ) ) prenom_9,
    initcap( decode( instr( lower( c9.adr1 ), 'log' ), '1', c9.adr2, decode( instr( lower( c9.adr1 ), 'bât' ), '1', c9.adr2, c9.adr1 ) ) ) adr1_9,
    initcap( decode( decode( instr( lower( c9.adr1 ), 'log' ), '1', c9.adr2, decode( instr( lower( c9.adr1 ), 'bât' ), '1', c9.adr2, c9.adr1 ) ), c9.adr2, null, 
    decode( instr( lower( c9.adr2 ), 'log' ), '1', c9.adr3, decode( instr( lower( c9.adr2 ), 'bât' ), '1', c9.adr3, c9.adr2 ) ) ) ) adr2_9,
    initcap( decode( instr( lower( c9.adr3 ), 'log' ), '1', null, decode( instr( lower( c9.adr3 ), 'bât' ), '1', null, c9.adr3 ) ) ) adr3_9,
    c9.ptt ptt_9,
    c9.lcom lcom_9,
    decode( c9.lnte, 'Mlle' , 'Mademoiselle', 'Mme', 'Madame', 'M.', 'Monsieur', 'M. et Mme', 'Madame, Monsieur', null ) lnte_long_9,
    decode( c9.sexe, 'm', 'ms', 'f', 'fs', null, null, '-' ) accord_9,
    no.nbocc
    from client c1,
    client c7, 
    client c9,
    select z.code code,
    count(*) nbocc
    from client z
    where to_char( sysdate, 'yyyymmdd' ) between to_char( z.cdeb, 'yyyymmdd' ) and to_char( nvl( z.cfin, sysdate ), 'yyyymmdd' )
    group by z.code
    ) no
    where c1.code = c7.code (+)
    and c1.role = '1'
    and c7.role (+) ='7'
    and nvl( c7.horsfoyer (+), 0 ) = '0'
    and to_char( nvl( c7.cfin (+), sysdate ), 'yyyymmdd' ) >= to_char( sysdate, 'yyyymmdd' )
    and c1.code = c9.code (+)
    and c9.role (+) = '9'
    and to_char( nvl( c9.cfin (+), sysdate ), 'yyyymmdd' ) >= to_char( sysdate, 'yyyymmdd' )
    and c9.lnte (+) not in ( '. ', 'Assoc.', 'Ste' )
    and c9.lcom (+) is not null
    and c1.code = no.code (+);when doing so, I'm getting a ORA-12054:
    ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
    12054. 00000 - "cannot set the ON COMMIT refresh attribute for the materialized view"
    *Cause:    The materialized view did not satisfy conditions for refresh at
    commit time.
    *Action:   Specify only valid options.
    When I create the materialized view with just CREATE MATERIALIZED VIEW "H6801_GL_00"."VK_CLIENT" AS
    it works but the refresh is only "ON DEMAND"...
    Can't find how and why it won't work...
    Edited by: MacFizz on Dec 17, 2009 3:22 PM

    You could try the DBMS_MVIEW.TUNE_MVIEW and check if you can modify you materialized view or "refactor" it in a smaller, fast refreshable part that you could combine later to the sysdate/rownum part of it.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10821/advisor.htm
    Explanation on restrictions of fast refresh:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10706/repmview.htm
    Below there's an example of a fast refreshable mview, on creating the materialized view log and so on:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_6002.htm#i2080820

Maybe you are looking for