Oracle Workflow views return no records in JDeveloper

Hi All,
I have the following problem.
When I create a jdbc connection in JDeveloper 10.1.3.0.4
jdbc:oracle:thin:@<host>:<port>:<database>
And I try to browse through the records of views using workflow views I can't
retrieve any records. The view seems to be empty?
When I try to browse this view from sqlplus or toad this view
returns a lot of records.
The view and the WF tables/views are in different schema's but in the same database.
Thanks in advance....

Hi Folks,
I found it myself, in the view there was a where clause which restricted the
query with the userenv. I have to change this and it will work.

Similar Messages

  • Multiple UNION ALL views within a view returning incorrect records?

    Hi,
    I have a view which selects from multiple views with UNION ALL joining them. If I just select from the larg UNION ALL query I return more records (correct amount) than If I create a view, and select from it.
    e.g.
    SELECT *
    FROM vw_load_1
    UNION ALL
    SELECT *
    FROM vw_load_2
    UNION ALL
    SELECT *
    FROM vw_load_3
    UNION ALL
    SELECT *
    FROM vw_load_4
    UNION ALL
    SELECT *
    FROM vw_load_5
    Returns 405 Records
    but
    CREATE VIEW vw_master_load
    AS
    SELECT *
    FROM vw_load_1
    UNION ALL
    SELECT *
    FROM vw_load_2
    UNION ALL
    SELECT *
    FROM vw_load_3
    UNION ALL
    SELECT *
    FROM vw_load_4
    UNION ALL
    SELECT *
    FROM vw_load_5;
    SELECT COUNT(*)
    FROM vw_master_load
    Returns 307 records
    Can anyone explain why, or how to get around this?
    Oracle version: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production

    Hi,
    Are you saying that you run:
    select count(*) from (
      SELECT *
      FROM vw_load_1
      UNION ALL
      SELECT *
      FROM vw_load_2
      UNION ALL
      SELECT *
      FROM vw_load_3
      UNION ALL
      SELECT *
      FROM vw_load_4
      UNION ALL
      SELECT *
      FROM vw_load_5
    result is: 307 And then you run
      SELECT *
      FROM vw_load_1
      UNION ALL
      SELECT *
      FROM vw_load_2
      UNION ALL
      SELECT *
      FROM vw_load_3
      UNION ALL
      SELECT *
      FROM vw_load_4
      UNION ALL
      SELECT *
      FROM vw_load_5
    returns 405 rowsIf so, that is very strange.
    Can you an example we can re-produce?
    Regards,
    Peter

  • Oracle Materialized View | Deletion of Records, Oracle Materialized View

    One question reg Materialized views.
    If as part of housekeeping of the Source database we delete some records (older records), will the materialized view also be updated with the deletion?
    I believe the answer is yes. In that case can we ensure that this delete does not happen?
    Is there anyway we can prevent MView refresh from deleting the records that is once inserted even if we delete the same records in source DB?

    This is a common scenario, particularly with materialised views that summarise detail data where you want to keep the summary but not the detail, and it is addressed in the documentation.
    The technique is to make the MV refresh on demand, delete the data from the detail tables, and use the CONSIDER_FRESH procedure to prevent the changes propagating to the MV. You'll probably find it in the docs by searching on DBMS_MView.Consider_Fresh. There are a few warnings to note I think.

  • How to execute an Oracle stored procedure which returns many records?

    I have two synchronous scenarios XI<->PI<->JDBC, where JDBC is receiver adapter.
    Each scenario runs a different stored procedure in Oracle database.
    The first stored procedure returns only one record, the second stored procedure returns many records, which come from a cursor.
    In the first scenario I executed the stored procedure following the directions of Help SAP page and works perfectly.
    Link: [http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm]
    <root>
      <StatementName5>
        <storedProcedureName action=u201DEXECUTEu201D>
          <table>realStoredProcedureName</table>
          <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
        </storedProcedureName>
      </StatementName5>
    <root>
    I have sought in the forums of SDN and cannot find the way to run the second stored procedure, and receive the information it returns.
    Thank you for your help.
    Rafael Rojas.

    Think It doesnt matter either cursor or result set. Try to get the response back from JDBC and see what are the fields it exactly populating.
    In Procedure you can able to find the columns selecting in Cursors. Give those columns in the DT.
    File - JDBC (Execute-- Procedure)
    To get the response
    JDBC_respose -  File
    Correct me if im wrong.
    Regards
    Ramg

  • Oracle Object Views Jdeveloper compatibility

    Our application has been designed OOAD and documented in UML. We mapped the UML class diagrams to relational tables and created Oracle object views on top of these tables. From these views we can now generate C++ code with OTT. However, trying to access these views from JDeveloper gives us some problems. Specifically, if an object type defined by "CREATE TYPE xxx AS OBJECT" has a REF column somewhere inside it, there seems to be very little support for this in JDeveloper 10g. Our example is a country with numerous provinces. A provice type has a reference to the country type it falls in. Trying to make a GUI to maintain the provinces gives us no way to select a country to make the REF column from. In JDeveloper, when using the object view to create a maintenance GUI, we see the reference to the country in binary form. Typically we would want to select the country from a drop-down box containing country names instead of binary references. Can someone please point me to documentation describing how to do this or explain here. Thank you in advance.

    Not sure if this will be helpful for you, but maybe a better approach for your Java project will be to use TopLink to map your Java objects directly to the relational schema using TopLink's meet-in-the-middle capabilities.
    This way you won't need to work with the Object views in the database.
    More on TopLink here:
    http://www.oracle.com/technology/products/ias/toplink/index.html
    Some demos of the mapping capabilities are here:
    http://www.oracle.com/technology/products/ias/toplink/mwdemos/index.html
    TopLink is very well integrated with JDeveloper 10.1.2

  • Unable to View Monitor Diagram in Oracle Workflow 2.6.5

    Hi
    When I click 'View Diagram' button in Oracle Workflow in Internet explorer, a blank grey page is displayed. I get following error in java console:
    Error loading class: oracle.apps.fnd.wf.Monitor
    java.lang.NoClassDefFoundError
    java.lang.ClassNotFoundException: oracle.apps.fnd.wf.Monitor
         at com/ms/vm/loader/URLClassLoader.loadClass
         at com/ms/vm/loader/URLClassLoader.loadClass
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
    But jar file wfMon.jar is present in OA_JAVA path. It contains Monitor class.
    Does anyone know how to resolve this?

    Yes, index.html is not relevant, just use it to make absolutely sure noone is able to browse virtual paths, as well as for testing that the virtual mapping is correctly defined..
    I struggled with this as well, the only thing I can suggest is that you check a few things:
    1. Are you sure that you don't have 2 /OA_JAVA/ definitions in your apache config files, so that the one that apache uses points to a different place than where you have placed your files?
    2. Are you absolutely, definitevily sure that you haven't made a typo in your virtual path definition (I did, and it took me an hour to find the error...)?
    Check this by putting a html file in the directory, and try to open this directly in your browser (http://yourserver.com/OA_JAVA/index.html), to make sure you don't get a "404 Not Found" http error.
    3.
    a) Make sure that you got the slashes then correct way, depending on your platform..
    b) Make sure to get the capitalisation correct, especially on unix/linux, but possibly this is important in windows as well, as java is case-sensitive too.
    c) Make sure you include the trailing slash at the end.
    d) Make sure you restart http server after modifications, and if you manually edit a config file you need to run dcmctl updateConfig (this is not necessary if you edit from within the EM Website).
    e) Make sure to clear your browser cache and start an entirely new IE browser after every modification (this is important!).
    These definitions should work (note the trailing FORWARD-slash):
    Windows:
    Alias /OA_JAVA/ D:\myfolder\wf\java/
    Unix/Linux:
    Alias /OA_JAVA/ /myfolder/wf/java/
    Go through your config once more, and let us know if you are able to view the html-file on the http://yourserver.com/OA_JAVA/index.html url (of course substituting with your server:port).
    Hope this helps..
    Jens

  • Oracle view returns incomplete result

    Hello, I have a view on oracle table, but sometimes I found the result from the view is not complete.
    It only returns part of the rows, at the meanwhile, the performance becomes very bad.
    (the only change on the table is a new index be created on it)
    After a did the table EXP / IMP, the performance back to normal (this is what I expedted), AND THE VIEW RETURNS FULL RESULT!
    It is so weird I cannot believe this can happen...
    Is it possilbe that oracle returns incompleted result rows without error?
    Edited by: user2406411 on 20-May-2012 10:06 AM
    Edited by: user2406411 on 20-May-2012 10:07 AM

    It only returns part of the rows, at the meanwhile, the performance becomes very bad.does it mean the select from view has been stopped/interrupted before it finished itself?
    Oracle could choose different plan with the index introduced. This plan could return first portion of rows fast, then continue to work on following portion, ant that took more time, but you did not want to wait and stop it.
    After exp/imp oracle may choose different plan that returns all rows at once.
    Is it possilbe that oracle returns incompleted result rows without error?normally not.
    though years ago I had one similar situation. The cause was a corrupted index. If query used index it returned less rows, with full scan - more. I had to rebuild the index to fix it.

  • How to return multiple record with Oracle Native Web Service?

    Dear all,
    I would like to know that the oracle native web service can be able to return multiple records to client or not?
    I successfully developed the oracle native web service for returning single record but the next challenge is to develop web service in order to return multiple record (like Employees data base on each department)
    Thank and Regards,
    Zenoni

    I successfully developed the oracle native web service for returning single record but the next challenge is to develop web service in order to return multiple record (like Employees data base on each department)You could return a list (multiple values/records) in XML format (using XMLType or CLOB), or CSV, or JSON, or whatever.
    function get_employees (p_department_id in number) return clob
    as
    begin
      return 'your_xml_string_here';
    end get_employees;It would be up to the client (the caller of the web service) to extract the values from whatever format you decide upon, of course.
    - Morten
    http://ora-00001.blogspot.com

  • How to Return ten records into java class by using oracle stored procedure

    Hello sir/Friends
    There is a procedure that returns 10 records from the oracle table and i want to display all 10 records into the table in java class.
    Please reply
    Thanking you.

    When you execute the stored procedure it will return your results as a ResultSet. Iterate over itto get the values you need then do with them as you please.
            List<MyObject> results = new ArrayList<MyObject>();
            MyObject mo = null;
            ResultSet rs = stmt.executeQuery("SELECT a_value FROM a_table");
            while (rs.next())
                mo = new MyObject();
                mo.setValue(rs.getString(1));
                results.add(mo);
            }

  • Oracle Query Always return records

    I want to have an Query In Which i always want to return one records regardless of exitence.
    If no records exist ...it should appear as
    NAME ID
    0 0
    if records exit it should appear as
    NAME ID
    manish 1

    Hi,
    You can do that with a UNION of your real query and something that selects the default values from dual. Just be sure the second part returns 0 rows when the real query returns anything.
    WITH     real_query     AS
         SELECT     name
         ,     id
         FROM     table_x
         WHERE     ...
    SELECT     *
    FROM     real_query
    UNION ALL
    SELECT     '0'     AS name
    ,     0     AS id
    FROM     dual
    WHERE     NOT EXISTS (
                     SELECT  1
                 FROM        real_query
    ;As always, be careful that the two prongs of the UNION have the same number and types of columns in the SELECT clause.

  • Connect from master/detail to the oracle workflow diagram viewer possible?

    Hello we are using apex 4 and we have a master/detail form.
    Now we want if you click on the detail on item_key or item_type to redirect to the corresponding diagram in oracle workflow.
    Is this possible if so could you point us in the right direction.
    Thank you.

    Hi Frank,
    Thanks for your reply. In the application I used weblogic JDBC driver for Sybase when it was developed in 11.1.1.1.0 version.
    The following are the extries in bc4j.xcfg file:
    jbo.sql92.JdbcDriverClass="weblogic.jdbc.sybase.SybaseDriver"
    jbo.TypeMapEntries="Java"
    jbo.SQLBuilder="SQL92"
    Now I have changed the JDBC to Sybase jConnect (jconn4.jar) and driver class is com.sybase.jdbc4.jdbc.SybXADataSource and other entries remains the same as it was before.
    Thanks
    Jalil

  • Oracle Workflow for Java (OW4J) Preview Available!

    Oracle® Workflow for Java (OW4J) delivers a java based business process management system that supports business process definition, business process automation, and business process integration. The technology enables modeling, automation, and continuous improvement of business processes, routing information of any type according to user-defined business rules. Oracle Workflow for Java supports fast, non-persistent, straight-through processes which run only in memory. It does not require a database, but does support persistent, long-running business processes with a complete audit trail stored in a database. OW4J will also include the Worklist and email notification and response capabilities which are essential to business process automation activities.
    Oracle Workflow for Java provides the users with all the components required to build and deploy a business processes using J2EE technology.
    * Oracle Workflow for Java Engine: OW4J is based on open standards and is a high-performance, scalable workflow engine capable of executing Java classes, Enterprise JavaBeans (EJBs), and Web services, sending and receiving Java Message Services (JMS) messages and e-mails, and launching workflows from message-driven beans.
    * Oracle JDeveloper Workflow Modeler: Oracle JDeveloper Workflow Modeler is a Business Process Modeling tool used to build and deploy business processes using Oracle JDeveloper IDE. It provides the user with an easy-to-use, intuitive drag-and-drop tool for modeling business processes.
    OW4J Developer Preview
    Download the developer preview and start building and running business processes using the new JDeveloper Workflow Modeler. Out-of-the-box Runnable Demo including stock quote web service demo (does not require database) and Procurement Demo which demonstartes the range of capabilities of OW4J by including various technologies like EJB, Web Services, PL/SQL and Java Classes into a business processes without any coding.
    Please post your feedback and questions using the Forum. It is valuable to us!
    Cheers,
    Raja

    Raja,
    We're having some difficulty getting the StockQuote demo working with the latest OW4J Preview release. We get the demo web page to appear but are not sure how to set Owner, ItemKey, and UserKey such that we don't get the following errors when we click "Run Workflow". Any help would be appreciated.
    Cheers,
    tim
    Error output in JDev 9.0.5.2 after clicking "Run Workflow" with or without entering values for above entries:
    Handle.Fault[oracle.apps.fnd.wf.engine.ExecutionException] at C:/jdev9052/jdev/mywork/OW4JDemos/StockQuote/src./ow4j/demo/stockquote.StockQuote[1086617569608]
    Caused By: executeRPC[C:/jdev9052/jdev/mywork/OW4JDemos/StockQuote/src./ow4j/demo/stockquote.StockQuote[1086617569608].processActivity1[1086617569610]] at $Header: AbstractExecutor.java 30.0 2003/03/25 22:43:21 anpwang noship $
    Caused By: 04/06/07 10:13:10 [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type &quot;text/html&quot;, must be: &quot;text/xml&quot;. Response was:
    &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
    &lt;HTML dir=ltr&gt;&lt;HEAD&gt;&lt;TITLE&gt;The page cannot be displayed&lt;/TITLE&gt;
    &lt;STYLE&gt;A:link {
         FONT: 8pt/11pt verdana; COLOR: #ff0000
    A:visited {
         FONT: 8pt/11pt verdana; COLOR: #4e4e4e
    &lt;/STYLE&gt;
    &lt;META content=NOINDEX name=ROBOTS&gt;
    &lt;META http-equiv=Content-Type content=&quot;text-html; charset=Windows-1252&quot;&gt;
    &lt;META content=&quot;MSHTML 5.50.4522.1800&quot; name=GENERATOR&gt;&lt;/HEAD&gt;
    &lt;BODY bgColor=#ffffff&gt;
    &lt;TABLE cellSpacing=5 cellPadding=3 width=410&gt;
    &lt;TBODY&gt;
    &lt;TR&gt;
    &lt;TD vAlign=center align=left width=360&gt;
    &lt;H1 style=&quot;FONT: 13pt/15pt verdana; COLOR: #000000&quot;&gt;&lt;!--Problem--&gt;The page
    cannot be displayed&lt;/H1&gt;&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;
    &lt;TD width=400 colSpan=2&gt;&lt;FONT
    style=&quot;FONT: 8pt/11pt verdana; COLOR: #000000&quot;&gt;There is a problem with the
    page you are trying to reach and it cannot be displayed.&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;
    &lt;TD width=400 colSpan=2&gt;&lt;FONT
    style=&quot;FONT: 8pt/11pt verdana; COLOR: #000000&quot;&gt;
    &lt;HR color=#c0c0c0 noShade&gt;
    &lt;P&gt;Please try the following:&lt;/P&gt;
    &lt;UL&gt;
    &lt;LI&gt;Click the Refresh button,
    or try again later.&lt;BR&gt;
    &lt;LI&gt;Open the Web site
    home page, and then look for links to the information you want.&lt;/LI&gt;
    &lt;LI&gt;If you believe you should be able to view this directory or page,
    please contact the Web site administrator by using the e-mail address or
    phone number listed on the Web site
    home page. &lt;/LI&gt;&lt;/UL&gt;
    &lt;H2 style=&quot;FONT: 8pt/11pt verdana; COLOR: #000000&quot;&gt;10060 - Connection timeout&lt;BR&gt;Internet Security and Acceleration Server&lt;/H2&gt;
    &lt;HR color=#c0c0c0 noShade&gt;
    &lt;P&gt;Technical Information (for support personnel)&lt;/P&gt;
    &lt;UL&gt;
    &lt;LI&gt;Background:&lt;BR&gt;The gateway could not receive a timely response from the Web site you are trying to access. This might indicate that the network is congested, or that the Web site is experiencing technical difficulties.&lt;P&gt;&lt;/P&gt;&lt;/LI&gt;
    &lt;LI&gt;ISA Server: ns.mgbltd.com&lt;BR&gt;
    Via: &lt;BR&gt;&lt;BR&gt;Time: 6/7/2004 2:13:10 PM GMT
    &lt;/LI&gt;&lt;/UL&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
    04/06/07 10:13:10      at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:209)
    04/06/07 10:13:10      at org.apache.soap.rpc.Call.invoke(Call.java:268)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.executor.OracleSoapExecutor.executRPC(OracleSoapExecutor.java:179)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.executor.OracleSoapExecutor.execute(OracleSoapExecutor.java:115)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.executeActivityInternal(JavaEngine.java:1088)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.executeActivity(JavaEngine.java:709)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.processStack(JavaEngine.java:841)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.doStartProcess(JavaEngine.java:979)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.startFlow(JavaEngine.java:171)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.WorkItemProcess.startFlow(WorkItemProcess.java:132)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.runner.RequestHelper.processRequest(RequestHelper.java:105)
    04/06/07 10:13:10      at WFProcessDetails.jspService(WFProcessDetails.jsp:232)
    04/06/07 10:13:10      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
    04/06/07 10:13:10      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
    04/06/07 10:13:10      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
    04/06/07 10:13:10      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
    04/06/07 10:13:10      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    04/06/07 10:13:10      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    04/06/07 10:13:10      at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    04/06/07 10:13:10      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
    04/06/07 10:13:10      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    04/06/07 10:13:10      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    04/06/07 10:13:10      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    04/06/07 10:13:10      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    04/06/07 10:13:10      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    04/06/07 10:13:10      at java.lang.Thread.run(Thread.java:534)
    executeRPC[C:/jdev9052/jdev/mywork/OW4JDemos/StockQuote/src./ow4j/demo/stockquote.StockQuote[1086617569608].processActivity1[1086617569610]] at $Header: AbstractExecutor.java 30.0 2003/03/25 22:43:21 anpwang noship $
    Caused By: 04/06/07 10:13:10 [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type &quot;text/html&quot;, must be: &quot;text/xml&quot;. Response was:
    &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
    &lt;HTML dir=ltr&gt;&lt;HEAD&gt;&lt;TITLE&gt;The page cannot be displayed&lt;/TITLE&gt;
    &lt;STYLE&gt;A:link {
         FONT: 8pt/11pt verdana; COLOR: #ff0000
    A:visited {
         FONT: 8pt/11pt verdana; COLOR: #4e4e4e
    &lt;/STYLE&gt;
    &lt;META content=NOINDEX name=ROBOTS&gt;
    &lt;META http-equiv=Content-Type content=&quot;text-html; charset=Windows-1252&quot;&gt;
    &lt;META content=&quot;MSHTML 5.50.4522.1800&quot; name=GENERATOR&gt;&lt;/HEAD&gt;
    &lt;BODY bgColor=#ffffff&gt;
    &lt;TABLE cellSpacing=5 cellPadding=3 width=410&gt;
    &lt;TBODY&gt;
    &lt;TR&gt;
    &lt;TD vAlign=center align=left width=360&gt;
    &lt;H1 style=&quot;FONT: 13pt/15pt verdana; COLOR: #000000&quot;&gt;&lt;!--Problem--&gt;The page
    cannot be displayed&lt;/H1&gt;&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;
    &lt;TD width=400 colSpan=2&gt;&lt;FONT
    style=&quot;FONT: 8pt/11pt verdana; COLOR: #000000&quot;&gt;There is a problem with the
    page you are trying to reach and it cannot be displayed.&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;
    &lt;TD width=400 colSpan=2&gt;&lt;FONT
    style=&quot;FONT: 8pt/11pt verdana; COLOR: #000000&quot;&gt;
    &lt;HR color=#c0c0c0 noShade&gt;
    &lt;P&gt;Please try the following:&lt;/P&gt;
    &lt;UL&gt;
    &lt;LI&gt;Click the Refresh button,
    or try again later.&lt;BR&gt;
    &lt;LI&gt;Open the Web site
    home page, and then look for links to the information you want.&lt;/LI&gt;
    &lt;LI&gt;If you believe you should be able to view this directory or page,
    please contact the Web site administrator by using the e-mail address or
    phone number listed on the Web site
    home page. &lt;/LI&gt;&lt;/UL&gt;
    &lt;H2 style=&quot;FONT: 8pt/11pt verdana; COLOR: #000000&quot;&gt;10060 - Connection timeout&lt;BR&gt;Internet Security and Acceleration Server&lt;/H2&gt;
    &lt;HR color=#c0c0c0 noShade&gt;
    &lt;P&gt;Technical Information (for support personnel)&lt;/P&gt;
    &lt;UL&gt;
    &lt;LI&gt;Background:&lt;BR&gt;The gateway could not receive a timely response from the Web site you are trying to access. This might indicate that the network is congested, or that the Web site is experiencing technical difficulties.&lt;P&gt;&lt;/P&gt;&lt;/LI&gt;
    &lt;LI&gt;ISA Server: ns.mgbltd.com&lt;BR&gt;
    Via: &lt;BR&gt;&lt;BR&gt;Time: 6/7/2004 2:13:10 PM GMT
    &lt;/LI&gt;&lt;/UL&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
    04/06/07 10:13:10      at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:209)
    04/06/07 10:13:10      at org.apache.soap.rpc.Call.invoke(Call.java:268)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.executor.OracleSoapExecutor.executRPC(OracleSoapExecutor.java:179)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.executor.OracleSoapExecutor.execute(OracleSoapExecutor.java:115)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.executeActivityInternal(JavaEngine.java:1088)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.executeActivity(JavaEngine.java:709)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.processStack(JavaEngine.java:841)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.doStartProcess(JavaEngine.java:979)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.impl.JavaEngine.startFlow(JavaEngine.java:171)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.engine.WorkItemProcess.startFlow(WorkItemProcess.java:132)
    04/06/07 10:13:10      at oracle.apps.fnd.wf.runner.RequestHelper.processRequest(RequestHelper.java:105)
    04/06/07 10:13:10      at WFProcessDetails.jspService(WFProcessDetails.jsp:232)
    04/06/07 10:13:10      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
    04/06/07 10:13:10      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
    04/06/07 10:13:10      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
    04/06/07 10:13:10      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
    04/06/07 10:13:10      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    04/06/07 10:13:10      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    04/06/07 10:13:10      at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    04/06/07 10:13:10      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
    04/06/07 10:13:10      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    04/06/07 10:13:10      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    04/06/07 10:13:10      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    04/06/07 10:13:10      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    04/06/07 10:13:10      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    04/06/07 10:13:10      at java.lang.Thread.run(Thread.java:534)

  • ClassNotFoundException: oracle.adf.view.faces.webapp.AdfFacesFilter

    Hi JDeveloper,
    Jdev Version: 11.1.1.6.0
    I am writing code to upload file to temp location, for this I added following configuration.
    <!-- This filter is always required by ADF; one of its functions is
    file upload. -->
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    But on running the code getting below exception:
    weblogic.application.ModuleException: Failed to load webapp: 'SP'
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: oracle.adf.view.faces.webapp.AdfFacesFilter
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         Truncated. see log file for complete stacktrace
    Any clue on this?
    Please suggest
    Thanks,Ankur

    Hi Timo,
    I have read this blog carefully, but still my problem is unresolved. I have to save file to location on Submit button in popup. I am not able to get example how to do so, that on Submit button I should move the file to file server.
    My code is:
    <af:inputFile label="File Name:" id="if1" showRequired="true"
    autoSubmit="true"
    value="#{backingBeanScope.spr2DownloadPageBean.file}"
    valueChangeListener="#{backingBeanScope.spr2DownloadPageBean.uploadFile}"
    binding="#{backingBeanScope.spr2DownloadPageBean.inputFile}"/>
    Backing Bean:
    public void uploadFile(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    System.out.println("fileUpdate invoked");
    UploadedFile file =(UploadedFile)valueChangeEvent.getNewValue();
    if(file!=null){
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage message = new FacesMessage(
    "Successfully uploaded file " + file.getFilename() +
    " (" + file.getLength() + " bytes)");
    I am not able to figure out code for Submit Button:
    public String UploadButton_action() {
    // Add event code here...
    if(this.getInputFile().getValue()==null){
    FacesContext context = FacesContext.getCurrentInstance();
    return null;
    Please suggest.

  • PipeLine Function Taking time to return Table record

    Hi,
    I want to use a function in join clause. so i go for pipelined function(using for loop to get record & 1 more loop to fetch in table type variable). i achieved what i required. but problem is it takes much time to fetch data. is there any other approach which returns table records without pipelined function.
    please suggest me a better approach as soon as possible.

    Hi,
    Thanks all for the quick response.
    I am using oracle 10g
    this is the table details & the entire function.
    Create object & table type to use in the function
    CREATE OR REPLACE TYPE SYSADM.STR_TYPE AS OBJECT(COLUMNVALUE VARCHAR2(8),FromNo Int,ToNo Int)
    CREATE OR REPLACE TYPE SYSADM.STR_ARRAY AS TABLE OF STR_TYPE
    table involved
    View : VesselType
    column : Code varchar2(5)
    Table : T065_SHIP
    column : SKIPS_KODE varchar2(4)
    CODE_SHIPTYPE varchar2(5)
    Table : SelsKap
    column : SELSKAPSKODE varchar2(4)
    Table : t041_shiptypeusers
    column : Code_ShipType varchar2(5)
    USERID varchar2(8)
    View : PositionBook
    column : VesselCode varchar2(8)
    VoyageNo integer
    Company varchar2(4)
    Table : T62_BRUKER_SELSKAP
    column : SELSKAPSKODE varchar2(4)
    BRUKER varchar2(8)
    Pipelined function
    CREATE OR REPLACE FUNCTION SYSADM.TF_ShiporShipTypeByUser
    In_UserName IN VARCHAR2,
    In_Type IN VARCHAR2,
    In_VesselCode IN VARCHAR2,
    In_CompanyHistory IN NUMBER DEFAULT 0
    RETURN str_array PIPELINED AS
    l_ShipTypeUser NUMBER(10,0);
    l_CompanyUser NUMBER(10,0);
    l_UseCompanyHistory NUMBER(1,0);
    l_Snicsacct NUMBER(1,0);
    BEGIN
    BEGIN
    SELECT shiptype_user,
    company_user
    INTO l_ShipTypeUser,
    l_CompanyUser
    FROM User_Segregation;
    EXCEPTION
    WHEN OTHERS THEN
    l_ShipTypeUser := NULL;
    l_CompanyUser := NULL;
    END;
    BEGIN
    SELECT 1 INTO l_Snicsacct
    FROM DUAL
    WHERE NOT EXISTS ( SELECT 1 FROM sn_user_cfg WHERE UserID='SNICS' and CfgID='ACCTSYS');
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF In_CompanyHistory = 1
    THEN
    BEGIN
    SELECT CfgData
    INTO l_UseCompanyHistory
    FROM SN_User_Cfg
    WHERE CfgID = 'USE COMPANY HISTORY'
    AND UserID = 'SNICS';
    EXCEPTION
    WHEN OTHERS THEN
    l_UseCompanyHistory := 0;
    END;
    END IF;
    IF In_UserName = 'SYSADM' OR (l_CompanyUser = 0 AND l_ShipTypeUser = 0)
    OR (l_CompanyUser = 1 and l_Snicsacct =1 ) or (In_CompanyHistory = 0 and l_CompanyUser = 1 and In_Type ='ShipType')
    OR (l_ShipTypeUser = 1 and In_Type = 'Company')
    THEN
    BEGIN
    IF In_Type = 'ShipType'
    THEN
    BEGIN
    FOR cur IN (SELECT Code ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM VesselType )
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    ELSIF In_Type = 'Ship'
    THEN
    BEGIN
    FOR cur IN (SELECT SKIPS_KODE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP
    WHERE SKIPS_KODE = NVL(In_VesselCode,SKIPS_KODE ))
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    ELSIF In_Type = 'Company'
    THEN
    BEGIN
    FOR cur IN (SELECT SELSKAPSKODE ShipCode
    , NULL VoyageFrom
    , NULL VoyageTo
    FROM SelsKap)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    END IF;
    END;
    ELSE
    IF In_Type = 'Ship'
    THEN
    BEGIN
    IF l_ShipTypeUser =1
    THEN
    BEGIN
    FOR cur IN (SELECT S.SKIPS_KODE ShipCode
    , 1 FromVoyage
    , 999999999 ToVoyage
    FROM T065_SHIP S
    JOIN t041_shiptypeusers U
    ON S.CODE_SHIPTYPE = U.Code_ShipType
    AND USERID = In_UserName
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    GROUP BY S.SKIPS_KODE)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.FromVoyage,cur.ToVoyage));
    END LOOP;
    RETURN;
    END;
    ELSIF l_CompanyUser = 1
    THEN
    BEGIN
    IF l_UseCompanyHistory = 1 AND In_CompanyHistory = 1
    THEN
    FOR cur IN (SELECT a.VesselCode ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    JOIN T62_BRUKER_SELSKAP b
    ON a.Company = b.SELSKAPSKODE
    AND b.BRUKER = In_UserName
    WHERE a.VesselCode = NVL(In_VesselCode, a.VesselCode)
    UNION
    SELECT a.VesselCode ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.company = b.SELSKAPSKODE
    WHERE a.VesselCode = NVL(In_VesselCode, a.VesselCode)
    AND b.SELSKAPSKODE IS NULL
    GROUP BY a.VesselCode,
    a.VoyageNo,
    a.VoyageNo)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    ELSE
    FOR cur IN (SELECT a.SKIPS_KODE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP a
    JOIN T62_BRUKER_SELSKAP b
    ON a.Company = b.SELSKAPSKODE
    AND b.BRUKER = In_UserName
    WHERE a.SKIPS_KODE = NVL(In_VesselCode, a.SKIPS_KODE)
    AND NVL(l_UseCompanyHistory,0) = 0
    UNION
    SELECT a.SKIPS_KODE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.company = b.SELSKAPSKODE
    WHERE a.SKIPS_KODE = NVL(In_VesselCode, a.SKIPS_KODE)
    AND b.SELSKAPSKODE IS NULL
    GROUP BY a.SKIPS_KODE)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END IF;
    END;
    END IF;
    END;
    ELSIF In_Type = 'ShipType'
    THEN
    IF l_ShipTypeUser = 1
    THEN
    BEGIN
    FOR cur IN (SELECT S.CODE_SHIPTYPE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP S
    JOIN t041_shiptypeusers U
    ON S.CODE_SHIPTYPE = U.Code_ShipType
    AND USERID = In_UserName
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    GROUP BY S.CODE_SHIPTYPE)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    ELSIF l_CompanyUser = 1
    THEN
    IF l_UseCompanyHistory = 1 AND In_CompanyHistory = 1
    THEN
    BEGIN
    FOR cur IN (SELECT a.VesselType ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    JOIN T62_BRUKER_SELSKAP b
    ON a.COMPANY = b.SELSKAPSKODE
    AND b.BRUKER = In_UserName
    WHERE a.VesselCode = NVL(In_VesselCode,a.VesselCode)
    UNION
    SELECT a.VesselType ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.company = b.SELSKAPSKODE
    WHERE a.VesselCode = NVL(In_VesselCode, a.VesselCode)
    AND b.SELSKAPSKODE IS NULL
    GROUP BY a.VesselType,
    a.VoyageNo,
    a.VoyageNo)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    ELSE
    BEGIN
    FOR cur IN (SELECT S.CODE_SHIPTYPE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP S
    JOIN T62_BRUKER_SELSKAP b
    ON S.company = b.SELSKAPSKODE
    AND B.BRUKER = In_UserName
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    AND NVL(l_UseCompanyHistory,0) = 0
    UNION
    SELECT S.CODE_SHIPTYPE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP S
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON S.company = b.SELSKAPSKODE
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    AND b.SELSKAPSKODE IS NULL)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    END IF;
    END IF;
    ELSIF In_Type = 'Company'
    THEN
    BEGIN
    FOR cur IN (SELECT a.SELSKAPSKODE ShipCode
    , NULL VoyageFrom
    , NULL VoyageTo
    FROM Selskap a
    JOIN T62_BRUKER_SELSKAP b
    ON a.SELSKAPSKODE = b.SELSKAPSKODE
    WHERE b.BRUKER = In_UserName
    Union All
    Select a.SELSKAPSKODE ShipCode
    , NULL VoyageFrom
    , NULL VoyageTo
    From Selskap a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.SELSKAPSKODE = b.SELSKAPSKODE
    Where b.SELSKAPSKODE IS NULL
    GROUP BY a.SELSKAPSKODE)
    LOOP
    PIPE ROW(str_type(cur.ShipCode,cur.VoyageFrom,cur.VoyageTo));
    END LOOP;
    RETURN;
    END;
    END IF;
    END IF;
    END;
    select statement which i call the function it takes minimum 6 seconds to execute. It gives 8339 records
    WITH deftbl AS ( SELECT /*+ CACHE(deftbl) */
    /*+ result_cache */
    a.VesselCode,
    a.VoyageNo,
    CASE a.BallastLeg When 0
    THEN MIN(a.ArrivalDate)
    ELSE NVL(( SELECT MAX(DepartureDate)
    FROM PositionBook b
    WHERE b.VesselCode = a.VesselCode
    AND b.VoyageNo = (Select MAX(VoyageNo) From PositionBook c Where c.VesselCode = a.VesselCode and c.VoyageNo<a.VoyageNo)
    ),MIN(a.ArrivalDate))
    END AS StartOfVoyage,
    MAX(DepartureDate) EndOfVoyage
    FROM PositionBook a
    JOIN TABLE(*TF_ShiporShipTypeByUser*('BKA', 'Ship', NULL, 1)) D        /*Calling the function*/
    ON D.ColumnValue = a.VesselCode
    AND a.VoyageNo BETWEEN D.FromVoyageNo AND D.ToVoyageNo
    GROUP BY VesselCode,VoyageNo,a.BallastLeg )
    SELECT /*+ result_cache */
    ROW_NUMBER() OVER(PARTITION BY a.VesselCode ORDER BY a.VoyageNo DESC) as "Row"
    ,a.VesselCode
    ,v.Name AS VesselName
    ,a.VoyageNo
    ,c.StartOfVoyage AS FromPort
    ,c.EndOfVoyage AS ToPort
    /*,a.FROMPORT
    ,a.TOPORT*/
    , CASE
    WHEN ( SELECT PortName
    FROM PositionBook b
    WHERE b.VesselCode = a.VesselCode
    AND b.VoyageNo = a.VoyageNo
    AND SYSDATE BETWEEN ArrivalDate AND DepartureDate ) IS NOT NULL
    THEN ( SELECT FIRST_VALUE(PortName) OVER(PARTITION BY b.vesselcode,b.VoyageNo ORDER BY b.vesselcode,b.VoyageNo,b.ArrivalDate,b.secondarytime)
    FROM PositionBook b
    WHERE b.VesselCode = a.VesselCode
    AND b.VoyageNo = a.VoyageNo
    AND SYSDATE BETWEEN ArrivalDate AND DepartureDate
    AND ROWNUM=1
    WHEN SYSDATE BETWEEN c.StartOfVoyage AND c.EndOfVoyage
    THEN ( SELECT 'Steam From '||FIRST_VALUE(UPPER(PortName)) OVER(PARTITION BY b.vesselcode,b.VoyageNo ORDER BY b.vesselcode,b.VoyageNo,b.ArrivalDate desc,b.secondarytime desc)
    FROM POSITIONBOOK b
    WHERE b.VesselCode = a.VesselCode AND b.VoyageNo = a.VoyageNo
    AND b.ArrivalDate<SYSDATE
    AND ROWNUM=1
    WHEN (c.StartOfVoyage-SYSDATE)>0
    THEN 'Voyage Not Started'
    WHEN (c.EndOfVoyage-SYSDATE)<0
    THEN 'Voyage Completed'
    ELSE Null
    END "Location"
    ,( SELECT MIN(b.PortName) KEEP(DENSE_RANK FIRST ORDER BY b.ArrivalDate,b.secondarytime) OVER(PARTITION BY b.VesselCode,b.VoyageNo)
    FROM POSITIONBOOK b
    WHERE b.VesselCode = a.VesselCode AND b.VoyageNo = a.VoyageNo
    AND b.ArrivalDate>SYSDATE
    AND ROWNUM=1
    ) AS NextPort
    , ( SELECT MIN(b.ArrivalDate) KEEP(DENSE_RANK FIRST ORDER BY b.ArrivalDate,b.secondarytime) OVER(PARTITION BY b.VesselCode,b.VoyageNo)
    FROM POSITIONBOOK b
    where b.VesselCode = a.VesselCode AND b.VoyageNo = a.VoyageNo
    AND b.ArrivalDate>SYSDATE
    AND ROWNUM=1
    ) AS NextETA
    ,a.STATUS VoyageStatus
    ,a.Trade
    ,UFN_MyVoyConcatinate_Values('FIXNOTE', a.VesselCode, a.VoyageNo) FixNote
    ,UFN_MyVoyConcatinate_Values('CHARTERER', a.VesselCode, a.VoyageNo) Charterer
    ,CASE WHEN st.CurrentStatus=0
    THEN 1
    WHEN st.CurrentStatus=1
    THEN 0
    ELSE st.CurrentStatus
    END AS CurrentStatus
    FROM Positionbook a
    JOIN deftbl c
    ON a.VesselCode = c.VesselCode
    AND a.VoyageNo = c.VoyageNo
    JOIN Vessel v
    ON v.Code = c.VesselCode
    LEFT JOIN GTT_VOYAGESTATUS st
    ON st.VesselCode = c.Vesselcode
    AND st.VoyageNo = c.VoyageNo
    GROUP BY a.VesselCode
    , v.Name
    , a.VoyageNo
    , c.StartOfVoyage
    , c.EndOfVoyage
    /*, a.FROMPORT
    , a.TOPORT*/
    , a.Status
    , a.Trade
    , st.CurrentStatus;
    Note:
    i changed the function without pipelined also. but it doesnt show much difference
    non pipelined function
    CREATE OR REPLACE FUNCTION TF_ShiporShipTypeByUser_nonp
    In_UserName IN VARCHAR2,
    In_Type IN VARCHAR2,
    In_VesselCode IN VARCHAR2,
    In_CompanyHistory IN NUMBER DEFAULT 0
    RETURN str_array AS
    l_ShipTypeUser NUMBER(10,0);
    l_CompanyUser NUMBER(10,0);
    l_UseCompanyHistory NUMBER(1,0);
    l_Snicsacct NUMBER(1,0);
    l_str_array str_array:=str_array();
    BEGIN
    BEGIN
    SELECT shiptype_user,
    company_user
    INTO l_ShipTypeUser,
    l_CompanyUser
    FROM User_Segregation;
    EXCEPTION
    WHEN OTHERS THEN
    l_ShipTypeUser := NULL;
    l_CompanyUser := NULL;
    END;
    BEGIN
    SELECT 1 INTO l_Snicsacct
    FROM DUAL
    WHERE NOT EXISTS ( SELECT 1 FROM sn_user_cfg WHERE UserID='SNICS' and CfgID='ACCTSYS');
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF In_CompanyHistory = 1
    THEN
    BEGIN
    SELECT CfgData
    INTO l_UseCompanyHistory
    FROM SN_User_Cfg
    WHERE CfgID = 'USE COMPANY HISTORY'
    AND UserID = 'SNICS';
    EXCEPTION
    WHEN OTHERS THEN
    l_UseCompanyHistory := 0;
    END;
    END IF;
    IF In_UserName = 'SYSADM' OR (l_CompanyUser = 0 AND l_ShipTypeUser = 0)
    OR (l_CompanyUser = 1 and l_Snicsacct =1 ) or (In_CompanyHistory = 0 and l_CompanyUser = 1 and In_Type ='ShipType')
    OR (l_ShipTypeUser = 1 and In_Type = 'Company')
    THEN
    BEGIN
    IF In_Type = 'ShipType'
    THEN
    BEGIN
    SELECT STR_TYPE(Code,1,999999999)
    BULK COLLECT INTO l_str_array
    FROM VesselType;
    RETURN l_str_array;
    END;
    ELSIF In_Type = 'Ship'
    THEN
    BEGIN
    SELECT STR_TYPE(SKIPS_KODE,1,999999999)
    BULK COLLECT INTO l_str_array
    FROM T065_SHIP
    WHERE SKIPS_KODE = NVL(In_VesselCode,SKIPS_KODE);
    RETURN l_str_array;
    END;
    ELSIF In_Type = 'Company'
    THEN
    BEGIN
    SELECT STR_TYPE(SELSKAPSKODE,NULL,NULL)
    BULK COLLECT INTO l_str_array
    FROM SelsKap;
    RETURN l_str_array;
    END;
    END IF;
    END;
    ELSE
    IF In_Type = 'Ship'
    THEN
    BEGIN
    IF l_ShipTypeUser =1
    THEN
    BEGIN
    SELECT STR_TYPE(S.SKIPS_KODE,1,999999999)
    BULK COLLECT INTO l_str_array
    FROM T065_SHIP S
    JOIN t041_shiptypeusers U
    ON S.CODE_SHIPTYPE = U.Code_ShipType
    AND USERID = In_UserName
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    GROUP BY S.SKIPS_KODE;
    RETURN l_str_array;
    END;
    ELSIF l_CompanyUser = 1
    THEN
    BEGIN
    IF l_UseCompanyHistory = 1 AND In_CompanyHistory = 1
    THEN
    SELECT STR_TYPE(ShipCode,VoyageFrom,VoyageTo)
    BULK COLLECT INTO l_str_array
    FROM ( SELECT a.VesselCode ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    JOIN T62_BRUKER_SELSKAP b
    ON a.Company = b.SELSKAPSKODE
    AND b.BRUKER = In_UserName
    WHERE a.VesselCode = NVL(In_VesselCode, a.VesselCode)
    UNION
    SELECT a.VesselCode ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.company = b.SELSKAPSKODE
    WHERE a.VesselCode = NVL(In_VesselCode, a.VesselCode)
    AND b.SELSKAPSKODE IS NULL
    GROUP BY a.VesselCode,
    a.VoyageNo,
    a.VoyageNo);
    RETURN l_str_array;
    ELSE
    SELECT STR_TYPE(ShipCode,VoyageFrom,VoyageTo)
    BULK COLLECT INTO l_str_array
    FROM (SELECT a.SKIPS_KODE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP a
    JOIN T62_BRUKER_SELSKAP b
    ON a.Company = b.SELSKAPSKODE
    AND b.BRUKER = In_UserName
    WHERE a.SKIPS_KODE = NVL(In_VesselCode, a.SKIPS_KODE)
    AND NVL(l_UseCompanyHistory,0) = 0
    UNION
    SELECT a.SKIPS_KODE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.company = b.SELSKAPSKODE
    WHERE a.SKIPS_KODE = NVL(In_VesselCode, a.SKIPS_KODE)
    AND b.SELSKAPSKODE IS NULL
    GROUP BY a.SKIPS_KODE);
    RETURN l_str_array;
    END IF;
    END;
    END IF;
    END;
    ELSIF In_Type = 'ShipType'
    THEN
    IF l_ShipTypeUser = 1
    THEN
    BEGIN
    SELECT STR_TYPE(ShipCode,VoyageFrom,VoyageTo)
    BULK COLLECT INTO l_str_array
    FROM (SELECT S.CODE_SHIPTYPE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP S
    JOIN t041_shiptypeusers U
    ON S.CODE_SHIPTYPE = U.Code_ShipType
    AND USERID = In_UserName
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    GROUP BY S.CODE_SHIPTYPE);
    RETURN l_str_array;
    END;
    ELSIF l_CompanyUser = 1
    THEN
    IF l_UseCompanyHistory = 1 AND In_CompanyHistory = 1
    THEN
    BEGIN
    SELECT STR_TYPE(ShipCode,VoyageFrom,VoyageTo)
    BULK COLLECT INTO l_str_array
    FROM ( SELECT a.VesselType ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    JOIN T62_BRUKER_SELSKAP b
    ON a.COMPANY = b.SELSKAPSKODE
    AND b.BRUKER = In_UserName
    WHERE a.VesselCode = NVL(In_VesselCode,a.VesselCode)
    UNION
    SELECT a.VesselType ShipCode
    , a.VoyageNo VoyageFrom
    , a.VoyageNo VoyageTo
    FROM PositionBook a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.company = b.SELSKAPSKODE
    WHERE a.VesselCode = NVL(In_VesselCode, a.VesselCode)
    AND b.SELSKAPSKODE IS NULL
    GROUP BY a.VesselType,
    a.VoyageNo,
    a.VoyageNo);
    RETURN l_str_array;
    END;
    ELSE
    BEGIN
    SELECT STR_TYPE(ShipCode,VoyageFrom,VoyageTo)
    BULK COLLECT INTO l_str_array
    FROM ( SELECT S.CODE_SHIPTYPE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP S
    JOIN T62_BRUKER_SELSKAP b
    ON S.company = b.SELSKAPSKODE
    AND B.BRUKER = In_UserName
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    AND NVL(l_UseCompanyHistory,0) = 0
    UNION
    SELECT S.CODE_SHIPTYPE ShipCode
    , 1 VoyageFrom
    , 999999999 VoyageTo
    FROM T065_SHIP S
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON S.company = b.SELSKAPSKODE
    WHERE S.SKIPS_KODE = NVL(In_VesselCode, S.SKIPS_KODE)
    AND b.SELSKAPSKODE IS NULL);
    RETURN l_str_array;
    END;
    END IF;
    END IF;
    ELSIF In_Type = 'Company'
    THEN
    BEGIN
    SELECT STR_TYPE(ShipCode,VoyageFrom,VoyageTo)
    BULK COLLECT INTO l_str_array
    FROM ( SELECT a.SELSKAPSKODE ShipCode
    , NULL VoyageFrom
    , NULL VoyageTo
    FROM Selskap a
    JOIN T62_BRUKER_SELSKAP b
    ON a.SELSKAPSKODE = b.SELSKAPSKODE
    WHERE b.BRUKER = In_UserName
    Union All
    Select a.SELSKAPSKODE ShipCode
    , NULL VoyageFrom
    , NULL VoyageTo
    From Selskap a
    LEFT JOIN T62_BRUKER_SELSKAP b
    ON a.SELSKAPSKODE = b.SELSKAPSKODE
    Where b.SELSKAPSKODE IS NULL
    GROUP BY a.SELSKAPSKODE);
    RETURN l_str_array;
    END;
    END IF;
    END IF;
    END;please kindly provide me your valuable suggestions
    Edited by: ganex27lin on Mar 16, 2011 1:54 AM

  • PLSQL web service returning multiple records

    Hello,
    I am trying to create a web service using oracle 11g which should be able to return multiple records.
    Based on hints and code samples found on the internet here is my code :
    CREATE OR REPLACE TYPE test_rec is OBJECT (
        s_nume_adre                    NUMBER ,
        c_eta_civi                     VARCHAR2(4 BYTE),
        l_nom1_comp                    VARCHAR2(40 BYTE),
        l_nom2_comp                    VARCHAR2(40 BYTE),
        l_nom3_comp                    VARCHAR2(40 BYTE),
        l_pren_comp                    VARCHAR2(30 BYTE),
        d_date_nais                    DATE);
    CREATE OR REPLACE TYPE test_array AS TABLE OF test_rec;
    CREATE OR REPLACE PACKAGE test_pkg AS
      function get_rows(snume_adre in number) return test_array;
    END;
    CREATE OR REPLACE PACKAGE BODY test_pkg AS
      function get_rows(snume_adre in number) return test_array is
        v_rtn   test_array := test_array(null);
        v_first boolean := true;
        cursor c_get_rows(snume_adre in number) is
          SELECT a.s_nume_adre,
                 nvl(a.c_eta_civi, '') c_eta_civi,
                 nvl(a.l_nom1_comp, '') l_nom1_comp,
                 nvl(a.l_nom2_comp, '') l_nom2_comp,
                 nvl(a.l_nom3_comp, '') l_nom3_comp,
                 nvl(a.l_pren_comp, '') l_pren_comp,
                 nvl(a.d_date_nais, to_date('01.01.1900', 'dd.mm.yyyy')) d_date_nais
        FROM bro.z45 a
      where a.s_nume_adre = snume_adre or snume_adre is null;
      begin
        for rec in c_get_rows(snume_adre) loop
          if v_first then
            v_first := false;
          else
            v_rtn.extend;
          end if;
        v_rtn(v_rtn.last) := test_rec(rec.s_nume_adre, rec.c_eta_civi, rec.l_nom1_comp, rec.l_nom2_comp,
                                    rec.l_nom3_comp, rec.l_pren_comp, rec.d_date_nais);
        end loop;  
        return v_rtn;
      end;
    END;
    --select * from table (test_pkg.get_rows(null));
    I am able to retrieve the data using the select.
    However when I try to access its wsdl I get an error :
    <soap:Envelope>
       <soap:Body>
          <soap:Fault>
             <faultcode>soap:Client</faultcode>
             <faultstring>Error processing input</faultstring>
             <detail>
                <OracleErrors></OracleErrors>
             </detail>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>
    If I comment the function call in the package declaration I get a "correct" wsdl :
    <definitions name="GET_ROWS" targetNamespace="http://xmlns.oracle.com/orawsv/TEST/TEST_PKG/GET_ROWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/orawsv/TEST/TEST_PKG/GET_ROWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
      <types>
        <xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/TEST/TEST_PKG/GET_ROWS" elementFormDefault="qualified">
          <xsd:element name="GET_ROWSInput">
            <xsd:complexType>
              </xsd:complexType>
          </xsd:element>
          <xsd:element name="GET_ROWSOutput">
            <xsd:complexType>
              </xsd:complexType>
          </xsd:element>
       </xsd:schema>
      </types>
      <message name="GET_ROWSInputMessage">
        <part name="parameters" element="tns:GET_ROWSInput"/>
      </message>
      <message name="GET_ROWSOutputMessage">
        <part name="parameters" element="tns:GET_ROWSOutput"/>
      </message>
      <portType name="GET_ROWSPortType">
      <operation name="GET_ROWS">
          <input message="tns:GET_ROWSInputMessage"/>
          <output message="tns:GET_ROWSOutputMessage"/>
        </operation>
      </portType>
      <binding name="GET_ROWSBinding" type="tns:GET_ROWSPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GET_ROWS">
          <soap:operation soapAction="GET_ROWS"/>
          <input>
            <soap:body parts="parameters" use="literal"/>
          </input>
          <output>
            <soap:body parts="parameters" use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="GET_ROWSService">
        <documentation>Oracle Web Service</documentation>
        <port name="GET_ROWSPort" binding="tns:GET_ROWSBinding">
           <soap:address location="http://server.domain.ch:8080/orawsv/TEST/TEST_PKG/GET_ROWS"/>
         </port>
      </service>
    </definitions>
    Any hint as how to create and access pl sql web service returning multiple rows?
    I don't use java and don't have access to tools like JDeveloper.
    Thanks!

    The actual issue is that collection types are not supported for return parameters.
    The solution is to wrap the collection into another object.
    Here's a working example based on your settings :
    CREATE OR REPLACE TYPE test_rec is OBJECT ( 
      empno  number(4)
    , ename  varchar2(10)
    , hiredate date
    CREATE OR REPLACE TYPE test_array AS TABLE OF test_rec; 
    CREATE OR REPLACE TYPE test_array_wrapper is OBJECT ( arr test_array );
    CREATE OR REPLACE PACKAGE test_pkg AS 
      function get_rows(p_deptno in number) return test_array_wrapper; 
    END; 
    CREATE OR REPLACE PACKAGE BODY test_pkg AS 
      function get_rows(p_deptno in number) return test_array_wrapper is 
        results  test_array; 
      begin 
        select test_rec(empno, ename, hiredate)
        bulk collect into results
        from scott.emp
        where deptno = p_deptno;    
        return test_array_wrapper(results); 
      end; 
    END; 
    The wsdl is then generated correctly :
    SQL> select httpuritype('http://DEV:dev@localhost:8080/orawsv/DEV/TEST_PKG/GET_ROWS?wsdl').getxml() from dual;
    HTTPURITYPE('HTTP://DEV:DEV@LOCALHOST:8080/ORAWSV/DEV/TEST_PKG/GET_ROWS?WSDL').GETXML()
    <definitions name="GET_ROWS" targetNamespace="http://xmlns.oracle.com/orawsv/DEV/TEST_PKG/GET_ROWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/orawsv/DEV/TEST_PKG/GET_
    ROWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
      <types>
        <xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/DEV/TEST_PKG/GET_ROWS" elementFormDefault="qualified">
          <xsd:element name="CTEST_ARRAY_WRAPPER-GET_ROWSInput">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="P_DEPTNO-NUMBER-IN" type="xsd:double"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="GET_ROWSOutput">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="RETURN" type="tns:TEST_ARRAY_WRAPPERType"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <xsd:complexType name="TEST_ARRAY_WRAPPERType">
            <xsd:sequence>
              <xsd:element name="TEST_ARRAY_WRAPPER">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="ARR">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="TEST_REC" type="tns:TEST_REC_IntType" maxOccurs="unbounded" minOccurs="0"/>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
          <xsd:complexType name="TEST_REC_IntType">
            <xsd:sequence>
              <xsd:element name="EMPNO" type="xsd:double"/>
              <xsd:element name="ENAME">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="10"/>
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
              <xsd:element name="HIREDATE" type="xsd:date"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:schema>
      </types>
      <message name="GET_ROWSInputMessage">
        <part name="parameters" element="tns:CTEST_ARRAY_WRAPPER-GET_ROWSInput"/>
      </message>
      <message name="GET_ROWSOutputMessage">
        <part name="parameters" element="tns:GET_ROWSOutput"/>
      </message>
      <portType name="GET_ROWSPortType">
        <operation name="GET_ROWS">
          <input message="tns:GET_ROWSInputMessage"/>
          <output message="tns:GET_ROWSOutputMessage"/>
        </operation>
      </portType>
      <binding name="GET_ROWSBinding" type="tns:GET_ROWSPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GET_ROWS">
          <soap:operation soapAction="GET_ROWS"/>
          <input>
            <soap:body parts="parameters" use="literal"/>
          </input>
          <output>
            <soap:body parts="parameters" use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="GET_ROWSService">
        <documentation>Oracle Web Service</documentation>
        <port name="GET_ROWSPort" binding="tns:GET_ROWSBinding">
          <soap:address location="http://localhost:8080/orawsv/DEV/TEST_PKG/GET_ROWS"/>
        </port>
      </service>
    </definitions>

Maybe you are looking for

  • Advance Payments and Returns

    Hi All, I am having an issue designing the process for payments and processing payment returns. The organisational structure that the company operates is such that there are units that have been represented as cost centres in the FICO configuration.

  • How to enable triplefinger swipe gesture on Windows 8.1?

    I've tried to modify the about:config section with no success. It works only the ALT+TwoFingerGesture to go back and forward on history. In explorer I can go back and forward with a three finger swipe gesture, can it be enabled on firefox?

  • Raid BIOS Gone (KT4 Ultra-BSR)

    I recently bought a Serial ATA Hard Drive wanting to install it on the raid controller.  But when I went to enter the Raid Controller's BIOS FastBuild Setup (at boot-time), it never shows up. I have the KT4 Ultra-BSR, and I can see the RAID Controlle

  • Any advice about Google calendar?

    I have been using iCal as my only calendar app on my iMac, ipad mini and iphone. Now my company is changing everything over to google for mail, calendars, contacts and other apps. The one thing I am concerned about is syncing with Google calendars an

  • Why are windows and desktop on iMac acting wonky?

    t's raining out and that may or may not have something to do with the fact that for the first time (after 20 years of owning a Mac), the Document window and Mail window (both which were open at the same time) were doing a jig, moving too the right a