Inconsistent SELECT results in PL/SQL package

Inside an Oracle package, I populate variables with "SELECT ... INTO ... FROM <table name> WHERE ...;"
Should be straightforward, but I have found it inconsistent. Sometimes the variables are not populated, sometimes they are (using the same WHERE). Any possible reasons for this behavior?
Edited by: user12236430 on Jan 31, 2012 5:46 AM

user12236430 wrote:
I'll bring a snippet home from the office with me. It doesn't throw the NO_DATA_FOUND exception, because one of the variables it (sometimes) populates is used in an INSERT later, and when it's not set I get a "Precision Error occurred" exception. It's straightforward PL/SQL as best I can tell, but I'll update with actual code later today.Could the select be reading NULL values?

Similar Messages

  • Accessing select result in an SQL query

    I would like to know if anyone has a simple solution to this
    problem.
    I have a database with a table in it called events; the table
    has five fields: event_id, game_type_id, game_venue_id, game_day,
    and game_time.
    I would like to build a form that selects records in the
    table successively, based on the previous input. That is, once the
    user has selected the game_type, I'd like to show the user the
    game_venue for all the entries in the events table where
    game_type_id is equal to what the user selected and allow the user
    to select one. Then once the user has selected the game_type and
    game_venue, I'd like to show the user all the records in events
    that match the user's first two selections. Ditto for game_time. At
    the end of this, a unique record will have been determined.
    Some combinations of game_type, game_venue, game_day and
    game_time don't exist, so I can't just let the user indicate freely
    what they want.
    I suppose I could do it with multiple forms, each with it's
    own submit, but that's kind of clumsy. Is there some more elegant
    way?

    You can't refer to a pl/sql package constant in a sql statement.
    Create a function that returns the constant value and then refer to the function in a sql statement.

  • Inconsistent selection behavior when deleting files in Cover Flow

    I love browsing through my pictures folder using Cover Flow. However, I've noticed that deleting a file by pressing Cmd-Delete produces inconsistent selection results. Sometimes Finder will select the next file down the list, and sometimes it will select no file at all. However, the Cover Flow portion of the window will always show the next file.
    It is misleading when Cover Flow shows the next file, but the file selection pane shows no file selected. I often hit the down-arrow (or right-arrow) key, expecting to skip to the next file, but the first file in the folder gets selected, Cover Flow re-winds its view, and I have to re-find my last position.
    There is also no way to select the current file by clicking on the Cover Flow preview currently showing. I have to click some other file and re-browse to the current file in order to sync up the two panes.
    Is this a bug? Does Apple know about it?

    As mentioned, cover flow does not change the basic Finder operation. Return allows editing the name and Cmd-O or Cmd-downarrow opens the item. It also functions similar to the list view, when you open a folder, the subfolders are added to the cover flow; they do not replace the cover flow icons.

  • Putting the results of a PL/SQL package on a .jspx page

    Hi, I have customer who wants to replace a cgi script's results with a .jspx page. Nothing fancy, just a straight vertical text dump of text returned from a PLSQL PKG into say an af:ouputText or af:outputFormatted. All within an af:panelGroupLayout vertical.
    I understand UIs and ADF Faces pretty well but when it comes to database data displaying into components, I am green.
    So, how would I declaratively in Jdev 11.1.1.3, create databindings, controls, etc. and dump display them in an af:outputText? All of the Tutorials I have seen show database tables etc., not PL/SQL packages. Can you please outline the steps for doing the databinding and controls things so that I can drop them onto a .jspx page/component? Please from the standpoint of using the PL/SQL package shown below. I would be forever grateful.
    Thanks!!!!
    Here is the PL/SQL package:
    FUNCTION get_tsr_details(p_incident_no VARCHAR2)
    RETURN CLOB ;
    END WRS_KM_TSR_PKG;
    Here is the Body:
    FUNCTION get_tsr_details(p_incident_no VARCHAR2)
    RETURN CLOB
    IS
    CURSOR cu_tsr
    IS
    select ('TSR#: '||tsr.incident_number||chr(10)||
    'Assigned: '||tsr.owner||chr(10)||
    'Status: ' || tsr.status || CHR (10) ||
    '-------------------------------------------------------------'||chr(10)||
    'Date: '|| csi.incident_date||chr(10)||
    'Title: '||tsr.summary||chr(10)||
    --'Name: '||decode(ccp.contact_type, 'EMPLOYEE',fnd2.full_name ,'PARTY_RELATIONSHIP',sp.party_name ) ||chr(10)||
    'Company: '||tsr.party_name ||chr(10)||
    'License#: '||tsr.license_number||chr(10)||
    'Product Name: '||tsr.item_description ||chr(10)||
    'HostOS: '||csi.operating_system||' '||chr(10)||
    'HostOS Rev: '||csi.operating_system_version||chr(10)||
    'Arch Family: '||tsr.arch_family||chr(10)||
    'Processor Family: '||tsr.processor_family||chr(10)||
         'Processor: ' ||tsr.processor_family||chr(10)||
    'BSP: '||tsr.bsp||chr(10)||
         'BSP Version: '||tsr.bsp_version||chr(10)||
         'SPR Number: '||tsr.spr_number) tsr_detail,
    tsr.incident_number,tsr.incident_id
    from wrs_km1_tsr_ksm_v tsr, cs_incidents_all_b csi
    where tsr.incident_id = csi.incident_id
    --and    tsr.incident_id = p_incident_id;
    and tsr.incident_number = p_incident_no;
    CURSOR cu_notes(l_incident_id number,l_incident_no varchar2)
    IS
    SELECT ('TSR: '||l_incident_no||CHR(10)||
    '-------------------------------------------------------------'||CHR(10)||
    'Date Created: '||creation_date||' Created By: '||entered_by_name||CHR(10)||
    'Visibility: '||note_status_meaning||CHR(10)||
    'Status: '||note_type_meaning||CHR(10)||
    'Transaction Description'||CHR(10)||CHR(10)||
    notes||CHR(10)||
    notes_detail) not_dtl
    FROM jtf_notes_vl
    WHERE source_object_id= l_incident_id
    AND     source_object_code = 'SR'
    ORDER BY creation_date aSC;
    l_tsr_details CLOB;
    l_incident_no cs_incidents_all_b.incident_number%TYPE;
    l_incident_id cs_incidents_all_b.incident_id%TYPE;
    BEGIN
    FOR ru_tsr IN cu_tsr
    LOOP
    l_tsr_details := l_tsr_details ||ru_tsr.tsr_detail||CHR(10) ;
    l_tsr_details := l_tsr_details ||'********************Transaction*******************';
    l_incident_no := ru_tsr.incident_number;
    l_incident_id := ru_tsr.incident_id;
    FOR ru_notes in Cu_notes(l_incident_id,l_incident_no)
    LOOP
    l_tsr_details := l_tsr_details ||CHR(10)||ru_notes.not_dtl;
    END LOOP;
    EXIT;
    END LOOP;
    --INSERT INTO AA VALUES(l_tsr_details);
    --COMMIT;
    RETURN l_tsr_details;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN l_tsr_details ;
    END get_tsr_details;
    END WRS_KM_TSR_PKG;

    One solution is to write a Java class that has a method that nvokes the PL/SQL procedure and then return a String.
    Then you can expose that Java class as a data control and drag the result of the method onto the page.
    A bit about JDBC with PL/SQL and CLOB:
    http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/basic.htm#i1008346
    http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/oralob.htm
    And a bit about exposing a Java class as a data control:
    http://blogs.oracle.com/shay/2009/07/java_class_data_control_and_ad.html

  • Sql (Select) result in string

    Hi , I found this code in internet but it´s put a result in range on excel. 
    I would like some code with end is some like  "MyVarString = objMySQLRecordsetResult"
    For example: In my select result = "User01" , I would like put this value in a var string.
    The code ends ...
            'ActiveSheet.Range("A1").CopyFromRecordset objMyRecordset
    I want ...
    Test01 = Recordset objMyRecordset
    tks for your help !!
    Public Sub GetDataFromADO()
        'Declare variables'
            Dim objMyConn As ADODB.Connection
            Dim objMyCmd As ADODB.Command
            Dim objMyRecordset As ADODB.Recordset
            Set objMyConn = New ADODB.Connection
            Set objMyCmd = New ADODB.Command
            Set objMyRecordset = New ADODB.Recordset
            Dim TESTE01 As String
        'Open Connection'
            objMyConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.15.0;Data Source="
    & ActiveWorkbook.Path & "\Database.accdb" & "; Jet OLEDB:Database Password= `MY PASSWORD"
            objMyConn.Open
        'Set and Excecute SQL Command'
            Set objMyCmd.ActiveConnection = objMyConn
            objMyCmd.CommandText = "select DUSER from DUSER WHERE DUSER = 'USUR01 "
            objMyCmd.CommandType = adCmdText
       'Open Recordset'
            Set objMyRecordset.Source = objMyCmd
            objMyRecordset.Open
            objMyRecordset.OpenRecordset
        'Copy Data to Excel'
            'ActiveSheet.Range("A1").CopyFromRecordset objMyRecordset
    End Sub

    Try:
    Public Sub GetDataFromADO()
    Dim Conn As New ADODB.Connection
    Dim Rs As New ADODB.Recordset
    'Open Connection'
    Conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.15.0;Data Source=" & ActiveWorkbook.Path & "\Database.accdb" & "; Jet OLEDB:Database Password= `MY PASSWORD"
    Conn.Open
    'Open Recordset'
    Rs.Open "select DUSER from DUSER WHERE DUSER = 'USUR01'", Conn, adOpenDynamic, adLockReadOnly
    'Copy Data to Excel'
    ActiveSheet.Range("A1").CopyFromRecordset Rs
    Rs.Close
    Conn.Close
    End Sub
    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

  • Colorize report results depending on sql selects

    Hy,
    is it possible to colorize report results depending on sql selects.
    For example: select id, name from db where name = 'frankfurt' or name = 'munic'
    All Results munic in red colour.
    Thanks
    Tom

    Hi,
    I have tried using the following in a decode statement of a Region report (type is SQL Query), and all it seems to do is form the HTML text as expected, but does not actually do what I want (i.e. display the field as red):-
    SELECT a_code, a_status, decode(a_fld,a_fld,'&ltfont color=&quotFF0000&quot&gt'||a_fld||'&lt/font&gt','other') "CA" from a_table
    What appears in the report is literally (I've put in single quotes in case this line is interpretted in the forum):
    '<font color="FF0000">1234</font>'
    I'm missing something - to force the HTML to be rendered as such. The field is displayed as a Standard Report Column, but it's just taking the decode search field as an ordinary piece of text. There's something that needs setting, but I can't find it - does anyone know?
    Thanks in advance
    Dave

  • How to declare a global variable from a PL/SQL package

    Hi All,
    Using a global variable is a bad practise for all language. However, in my case, I have a PL/SQL package defines all constants, and I want to use them directly via SQL statement, for instance,
    PACKAGE my_const
    IS
         DEFAULT_ZIP_CODE CONSTANT VARCHAR2(5) := '00000';
    END;And I cannot referrence this variable from my select statement as
    SELECT my_const.DEFAULT_ZIP_CODE from dual;I have to create a function via my package, as,
    FUNCTION get_default_zip_code RETURN VARCHAR2
    IS
    BEGIN
         RETURN DEFAULT_ZIP_CODE;
    END;and
    SELECT my_const.get_default_zip_code from dual;I don't want to create functions to referrence the default varaibles. Does anyone have any clues?
    thanks
    Edited by: user4184769 on Jul 19, 2010 8:36 AM

    riedelme wrote:
    thanks for the info. Your scope explanation makes sense even though it is not intuitive to me. I think the usage of package variables should be supported by SQL (they're just values to be copied) Maybe look at it from another language's perspective. You want to use a global PL package variable in Java/C#/Delphi/VB/etc. How would you do it?
    None of these languages can crack open the data segment of a PL code unit, inspect the variables in it, and extract a value from it. Instead, it needs to be done as follows:
    Using sqlplus as the client illustrates how all these languages will need to do it:
    SQL> var value varchar2(20);
    SQL> begin
      2>     :value := SomePackage.someVar;
      3> end;
      4> /So why should SQL behave differently? It is not the same as the PL language. It is not a subset of the PL language. Yeah, PL/SQL blurs the line between these 2 languages making it very simple for us to mix their source code. But PL/SQL is SQL integrated with PL - not PL integrated with SQL. PL has tight hooks into SQL, creating cursors for you, defining bind variables, binding variables and doing the whole Oracle Call Interface bit for you.
    But SQL has no need for PL code, just as it has no need for Java code, or Delphi code or VB code. Yes, it is possible for it to call Java stored procs. As it is possible for it to call PL procs. But these are via the formal call interface of those languages - not via tight integration hooks that blur the languages and make SQL and Java, or SQL and PL, look like a single integrated source code unit.
    Thus SQL has the pretty much the same constraints in calling the PL language as other languages do. What SQL can do is use the PL engine's call interface and tell it "+execute this function and return the result of the function+".

  • Reusing query results in PL/SQL

    I have a procedure in a package that I want to query several times using the analytical function row_number to get, say, the 5th row and the 95th row:
    select days_missed_negative_is_late
    into l_5pct
    from (select days_missed_negative_is_late,
    row_number() over(order by days_missed_negative_is_late asc) rn
    from (*some complicated query*)
    order by days_missed_negative_is_late))
    where rn = 5;
    then I do the whole thing again, except the last line reads "rn=95". This seems inefficient. I would like to build the results one time then query it twice:
    select days_missed_negative_is_late
    into l_5pct
    from something
    where rn = 5;
    select days_missed_negative_is_late
    into l_5pct
    from something
    where rn = 95;
    or the equivalent functionality, of course. Again, this is in a PL/SQL package. Any ideas of the best way to build the results and read them several times?

    Here is an example.
    1 select object_name from
    2 (select object_name,row_number() over(order by created) rn
    3 from all_objects
    4 where rownum<101)
    5* where rn in(5,95)
    SQL> /
    OBJECT_NAME
    I_CON2
    DEPENDENCY$
    You could for example 1) use a cursor and loop or
    2) select and bulk collect.
    I hope this helps.

  • Pl/sql package won't allow private function

    Hello,
    I'm trying to make a function in a package private. Oracle gives me this message everytime I load the package.
    18/2 PL/SQL: SQL Statement ignored
    18/9 PLS-00231: function 'FUN' may not be used in SQL
    18/9 PL/SQL: ORA-00904: : invalid identifier
    If I move the function declartion into the package specification, everything works. What am I doing wrong?
    Here's the (contrived) code:
    create or replace package tst_pkg
    is
         procedure silly;
    end; -- end package specification
    create or replace package body tst_pkg
    is
    /* fun: silly function for testing */
    function fun( f_num number ) return number
    is
         ret_val number;
    begin
         ret_val := f_num;
         return ret_val;
    end fun;
    /* silly: silly procedure to test a function call in a package */
    procedure silly
    is
         t_num number;
    begin
         select fun( 1 ) into t_num from dual;
    end;
    end; -- end package body
    Thanks,
    David

    create or replace function f_test_123 (p_num number) return number is
    l_value number ;
    begin
    return p_num ;
    end f_test_123;
    create or replace package p_test_123 is
    procedure p_test (p_num number) ;
    end p_test_123;
    create or replace package body p_test_123 is
    procedure p_test (p_num number) is
    l_test number ;
    begin
    dbms_output.enable (10000) ;
    select f_test_123 (p_num) into l_test from dual ;
    dbms_output.put_line ('Result = ' || to_char(l_test) ) ;
    end p_test ;
    end p_test_123;
    show err
    set serveroutput on
    execute p_test_123.p_test (789)
    Result = 789
    PL/SQL procedure successfully completed.
    I think part SQL and part is PLSQL

  • Service_doctor.sql -- There are errors in one or more PL/SQL package

    Hi,
    Script service_doctor.sql is run through repository owner. It is giving following error message.
    There are errors in one or more PL/SQL packages and functionPlatform properties have been loaded correctly
    Platform location has been seeded correctly
    NLS messages have been loaded correctly
    The platform service is not availableService script is accessible to the database server
    Connection information stored within the repository is correct
    PL/SQL procedure successfully completed.
    Please guide me what can be done to solve the error.
    Thank you in advance.
    Amit Shah.

    Hi Amit,
    I am facing this error every time I run the service_doctor.sql. After that once I have executed this script -- select * from user_errors -- to see what possibly could be wrong. It returned me one procedure name -- WB_OLAP_LOAD_DIMENSION_GENUK. But I was not very sure what to do with this.
    Now also I am getting the same error --- >>>>>> There are errors in one or more PL/SQL packages and function. But it didn't stop me from doing anything in OWB / Process flow / Workflow environment and I can work fine.
    Just wanted to share this with you. However, the result that you are getting shows (>>>>>> The platform service is not available) that Control center service is not up. Please execute the start_service.sql and after that it you run service_doctor again, you'll get only the first error -- >>>>>> There are errors in one or more PL/SQL packages and function --- but that shouldn't stop you from doing anything in OWB.
    If anyone knows what causes the --- >>>>>> There are errors in one or more PL/SQL packages and function -- error, and what are the implications of this in OWB environment, and what is the solution to it, please do share.
    Cheers,
    Swagata

  • Creating PL/SQL Package with all the types

    CREATE OR REPLACE
    TYPE rec_type AS OBJECT (
    first_name VARCHAR2(20),
    last_name VARCHAR2(20)
    CREATE OR REPLACE
    TYPE REC_TYPE_TAB AS TABLE OF rec_type
    I am able to create the above types in oracle and used in PL/SQL packages. And like this I have somany types. I would like to if I can create a package with the types to make the life easier. Could you please tell me how to do it.
    your help is greately appreciated..
    --Krish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    sb92075 wrote:
    TYPE add only aggravation, complexity, & should be avoidedI disagree.
    When used correctly types can be the simplest solution.
    For example when passing multiple values to a stored procedure. Avoiding the type in the below example would lead to further complexity and aggravation not lessen it.
    SQL> create or replace procedure p
      2      (
      3      p_object_list in sys.odcivarchar2list,
      4      p_result out sys_refcursor
      5      ) as
      6  begin
      7      open p_result for
      8          select owner, object_name, object_type
      9          from all_objects
    10          where object_name in
    11              (
    12              select column_value from
    13              table(p_object_list)
    14              )
    15          order by
    16              owner, object_name, object_type;
    17  end;
    18  /
    Procedure created.
    SQL> exec p(sys.odcivarchar2list('DUAL','ALL_OBJECTS'),:c)
    PL/SQL procedure successfully completed.
    SQL> print c
    OWNER                          OBJECT_NAME                    OBJECT_TYPE
    PUBLIC                         ALL_OBJECTS                    SYNONYM
    PUBLIC                         DUAL                           SYNONYM
    SYS                            ALL_OBJECTS                    VIEW
    SYS                            DUAL                           TABLE

  • Creating PL/SQL packages

    Hello,
    The problem I am confronted with is reusing generated models.
    In the process of DataMinig several steps are used: prepare data, Attribute selection (using AI), and building, testing and applying models.
    If PL/SQL packages are used two problems occur:
    First: Long, hand driven process of building:
    Model generation in ODM,
    PL/SQL package building in ODM and Export to SQL file,
    importing package to DB, compiling and running.
    I am sorry, but I don't understand why is it necessary to export PL/SQL packages in a file? As if these products aren't both Oracle products?
    Second: If data (in time) changes and AI selects new attributes, then all next steps fail, since column names, and even some values, are hard coded! Therefore it is necessary to go trough the build and export process all over again. This really hurts.
    Do you have a suggestion how to get around this problem?
    I already considered using a SPSS Clementine, but since it is not an Oracle product I still believe, the original Oracle solution should give me some advantages.
    Oh and another issue.
    I tried using PL/SQL generator (Ver.: 10.1.3.0.17) in JDeveloper (ver.: 10.1.3.0.4), but it gave me an error:
    java.lang.NoClassDefFoundError: oracle/dmt/dm4j/DM4JConnectionManager
         at oracle.dmt.dm4j.extension.CodeGenerator.invoke(Unknown Source)
         at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:310)
         at oracle.ide.wizard.WizardManager$2.run(WizardManager.java:358)
         at oracle.ide.util.IdeUtil.invokeAfterRepaint(IdeUtil.java:1093)
         at oracle.ide.wizard.WizardManager$1.run(WizardManager.java:366)
         at oracle.ide.util.IdeUtil$1$1.run(IdeUtil.java:1073)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Thanks for the reply,
    Igor

    Hi,
    The code generation available in ODMr would allow you to deploy the build, apply or test process as generated code.
    I am not sure what your application goal is, but if you simply want to deploy a model be used in an apply process that is rather straight forward.
    You would build the model using ODMr. Then create an Apply Activity, again using ODMr.
    The Apply Activity can then be used to generate code (pl/sql) using the JDev RTM release (10.1.3.2 or above). We will also have a version that will work with SQLDev shortly.
    The generated code is immediately placed into the db for you.
    If you want to score in a separate db you can either create a db link from that db or move both the model and the apply pl/sql code to the new db (using dba utilities).
    If you want to rebuild a model, where you would add/remove attributes, change transformations etc. then you will have to regenerate the code.
    If you simply want to rebuild the model without changing any transformations and settings you could also deploy the model build generated code.
    As for the JDev failure, we are going to look into that. Have you tried the JDev 10.1.3.3 release available on the Oracle web site?
    Thanks, Mark

  • Creating PL/SQL package in SQL Developer 4.0.0.12

    Hi,
    I have built a model in SQL Developer 4.0.0.12 and I want to create it's PL/SQL package.
    In ODMiner 11.1.0.4 from "Tools" > "Create pl/sql package" I can get a script for creating package and every thing is OK.
    but in SQL Developer I select "Deploy" from every node's context menu and it generates a folder containing some scripts related to every node. I don't see any relevant script for creating any package.
    How can I create relevant PL/SQL package from my workflow?
    Thank you for any help you can provide in this situation.

    Please refer to this White paper for how to generate PL/SQL package for workflow deployment:
    Oracle Data Miner (Extension of SQL Developer 4.0)
    Generate a PL/SQL script for workflow deployment
    http://www.oracle.com/technetwork/database/options/advanced-analytics/odmrcodegenwhitepaper-2042206.pdf

  • Creating a webservice from PL/SQL Package in JDev 11g

    Hi All...
    I have a PL/SQl package and I am using JDEv 11g. I want to create it as a webservice. I want to deploy it in a remote server. Can I deploy it from my client machine. In server Weblogic already started. What are the prerequisites, that we need to deploy a wbservice. I done the following steps.
    1. Create an application.
    2. Right click the package and select Generate Java option.
    3. It create a Java class in the Application sources.
    4. Double click the class and select Create Web Service. It created the web service.
    5. When I select the webservice and click Run it shows the following error. It going to the Default \server. Actually I need it in a remote server.
    [Running application NewWebService on Server Instance DefaultServer...]
    ---- Deployment started. ---- Apr 20, 2009 1:15:40 PM
    Target platform is (Weblogic 10.3).
    Running dependency analysis...
    2009-04-20 13:15:40.205: Writing WAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService\NewWebService-LastNoWebService-webapp
    2009-04-20 13:15:40.222: Wrote WAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService\NewWebService-LastNoWebService-webapp
    2009-04-20 13:15:40.357: Writing EAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService
    2009-04-20 13:15:40.374: Wrote EAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService
    Deploying Application...
    <Apr 20, 2009 1:15:40 PM IST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application NewWebService is not versioned.>
    <Apr 20, 2009 1:15:40 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1240213540593' for task '3'. Error is: 'java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext'
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    >
    <Apr 20, 2009 1:15:40 PM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'NewWebService'.>
    <Apr 20, 2009 1:15:40 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    >
    [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application NewWebService on DefaultServer.: sqlj.runtime.ref.DefaultContext.
    weblogic.application.WrappedDeploymentException: sqlj.runtime.ref.DefaultContext
    #### Deployment incomplete. #### Apr 20, 2009 1:15:40 PM
    oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
    Caused by: oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
         ... 12 more
    #### Cannot run application NewWebService due to error deploying to DefaultServer.
    [Application NewWebService stopped and undeployed from Server Instance DefaultServer]
    6. when i goto the consoleof weblogic server, already an instance created. But nothing displayed under WebServices.
    7. Select the instance and press 'Start'. While deploying an error came.
    java.lang.Exception: [DeploymentService:290049]Deploy failed for id '1,240,213,727,265' since no targets are reachable.
    Please help me..
    its very urgent...
    Regards,
    Resmi.

    Oh, no - another very urgent question. The world must be about to end ;)
    Resmi, Have a read of [url http://forums.oracle.com/forums/thread.jspa?threadID=883293]this - JDeveloper 11g, as of today, doesn't (at least is not supposed to) support publishing PL/SQL procedures/packages as a web service.
    John

  • Error when publishing a PL/SQL package as a Webservice

    Hi all,
    I am using the JDeveloper (10.1.3.1.0) to publish a PL/SQL package as a Webservice, and I am having some troubles on the generation process.
    The problem that I am facing is on the generated code for the database side, where some methods have a “$GET_” at the end of its name.
    This “$GET_” is handled by the database as a special word, and the package can’t be compiled.
    If the ‘$’ character is removed from all the methods, the package can be compiled and the Webservice works fine.
    What’s wrong? Is there a bug on the generation process of the JDeveloper?
    Regards,
    Rui Torres

    OK, This is the PL/SQL package:
    Function:
    FUNCTION Obtener_paises RETURN res_webservice AS
    v_respuesta res_webservice;
    i PLS_INTEGER:=1;
    CURSOR C_paises IS
    SELECT cpais, tpais
    FROM paises
    ORDER BY tpais;
    BEGIN
    v_respuesta := res_webservice(null,null);
    v_respuesta.error := res_error(null,null,null);
    v_respuesta.error.cerror := 0;
    v_respuesta.error.cerror_ora := 0;
    v_respuesta.error.terror := null;
    v_respuesta.datos := res_datos ();
    FOR v_pais IN C_paises LOOP
    v_respuesta.datos.extend;
    v_respuesta.datos(i) := reg_datos(null,null);
    v_respuesta.datos(i).codigo := v_pais.cpais;
    v_respuesta.datos(i).descripcion := v_pais.tpais;
    i := i + 1;
    END LOOP;
    Insertar_log(NULL,SYSDATE,'C','Obtener_paises',NULL,'ERROR:0');
    RETURN v_respuesta;
    EXCEPTION
    WHEN OTHERS THEN
    v_respuesta.error.cerror := 1;
    v_respuesta.error.cerror_ora := SQLCODE;
    v_respuesta.error.terror := substr(SQLERRM,1,80);
    Insertar_log(NULL,SYSDATE,'C','Obtener_paises',NULL,'ERROR:1 '||substr(SQLERRM,1,120));
    RETURN v_respuesta;
    END Obtener_paises;
    TYPES USED:
    CREATE OR REPLACE
    TYPE res_webservice AS OBJECT (error res_error, datos res_datos);
    CREATE OR REPLACE
    TYPE res_error AS OBJECT (cerror NUMBER(1), cerror_ora VARCHAR2(12), terror VARCHAR2(80));
    CREATE OR REPLACE
    TYPE res_datos AS TABLE OF reg_datos;
    CREATE OR REPLACE
    TYPE reg_datos AS OBJECT(codigo VARCHAR2(12), descripcion VARCHAR2(150));
    Thanks in advanced...
    Could happen this bacause of these defined types???

Maybe you are looking for

  • Not overriding the coherence-cache-config.xml but showing the error...

    Hi, I have created a file called tangosol-coherence-override.xml file in the specified path which is " C:\Program Files\Oracle\Coherence for .NET" and the coherence.jar file is located in path which is "C:\Program Files\Oracle\Coherence for .NET\lib"

  • Different Order Types within a Collective Order

    Dear PP Gurus, I have a requirement for having different order types with in a collective order. For example, in a BOM of 3 levels, the order type for each assembly should be different say ZPP1, ZPP2 and ZPP3. For this, I have maintained separate pro

  • Creation of Variables in BEx reporting

    Hi, I want to know the Creation process or steps for creation of variables in BEx Reporting. Please let me know. Thanks & Best Regards, Venkata.

  • Help! pop-up problems!

    my brother just bought a macbook. and he's using the leopard system. (i'm a mac user of 2 years) but he's having major problems with popups when using hotmail. i checked to see if the pop-up blocker is on, and it is, it's enabled. but whenever he log

  • Function Module to create AFS Outbound delivery for sales order

    Guys, I am looking for a function module to create deliveries for a sales order IN IS-AFS. I cannot make BAPI_DELIVERYPROCESSING_EXEC work. Also, if I use the IDOC type /AFS/DELVRY03 via message type WHSCON and function module IDOC_INPUT_DELVRY it do