Using DBMS_LOCK  in function gives error

Dear Guru's
I need to use the DBMS_LOCK.sleep. Hence to get more info i searched the forum and I found this code from the forum
CREATE OR REPLACE
FUNCTION sleep (secs_in IN INTEGER) RETURN NUMBER
is
BEGIN
DBMS_LOCK.sleep(secs_in);
RETURN secs_in;
END;
and tried it in my envrionment..
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL*Plus: Release 10.1.0.4.2
Warning: Function created with compilation errors.
SQL> show errors
Errors for FUNCTION SLEEP:
LINE/COL ERROR
4/5 PL/SQL: Statement ignored
4/5 PLS-00201: identifier 'DBMS_LOCK' must be declared
I tried using the DBMS_LOCK in a Nameless procedure like this
begin
dbms_lock.sleep(5);
end;
there was no error message and i got a message that it has been executed successfully
I tried it similarly in a stored procedure , then also i got the same error message
Please enlighten me on this issue.
with warm regards
ssr

Sounds like you've got execute privs on dbms_lock granted to your user as part of a role. You need to have a direct grant on dbms_lock in order for what you're trying to do to work. (ie. you need to get someone with the appropriate privs to run the following: grant excute on dbms_lock to your_user;)

Similar Messages

  • Ldap function gives errors in apex 4.1.1

    Hi all,
    I have a custom function for ldap authentication.
    create or replace
    FUNCTION bgt_ldap_authenticatie_func (
          p_username IN VARCHAR2
        , p_password IN VARCHAR2
    RETURN BOOLEAN
    AS
        l_ldap_host     VARCHAR2(100) := 'domain';
        l_ldap_port     VARCHAR2(4)   := '389';
        l_session       DBMS_LDAP.SESSION;
        l_retval        PLS_INTEGER;
        l_login_result  BOOLEAN := true;
        l_error VARCHAR2(4000);
    BEGIN
        IF p_password IS NULL THEN
            l_login_result := FALSE;
        ELSE
            -- I. LDAP-Login
            BEGIN
                -- LDAP Exceptions
                DBMS_LDAP.USE_EXCEPTION := TRUE;
                -- LDAP-Handle initialiseren ...
                l_session := DBMS_LDAP.INIT(
                      hostname  => l_ldap_host
                    , portnum   => l_ldap_port
                l_retval := DBMS_LDAP.SIMPLE_BIND_S(
                      ld        => l_session
                    , dn        => 'domain\' || LOWER(p_username)
                    , passwd    => p_password
                -- Afmelden van LDAP Server.
                l_retval := DBMS_LDAP.UNBIND_S(ld => l_session);
                -- Registratie was succesvol.
                l_login_result := TRUE;
            EXCEPTION WHEN OTHERS THEN
                l_login_result := FALSE;
            END;
        END IF;
        RETURN l_login_result;
    END;This is working fine on Apex 3.2 and Oracle 10g.
    I now have a development environment with apex 4.1.1 and Oracle 11g.
    I have run above function, with success (no compilation errors).
    I then go to authentication schemes to create my ldap authentication:
    host: domain
    port: 389
    Distinguished Name (DN) String: ou=domain,ou=New Security Groups,ou=Applications,cn=Budgeting_Dev
    Use Exact Distinguished Name (DN): Yes     
    LDAP Username Edit Function: return bgt_ldap_authenticatie_func;      
    When I click on the create button, I get
    1 error has occurred
        ORA-06550: line 5, column 8: PLS-00382: expression is of wrong type ORA-06550: line 5, column 1: PL/SQL: Statement ignoredWhy is it that I'm getting an error when trying to create the authentication when the function has been successfully compiled?
    Thanks,
    Diana

    Hi Diana,
    in addition to Christian comment, the "LDAP Username Edit Function" attribute expects a function which returns VARCHAR2 and not BOOLEAN as your function returns. It should also not be used to actually perform a LDAP lookup, instead it returns the LDAP Username you want to give APEX to perform the LDAP lookup.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • AVG as an analytic function - gives error ORA-0439

    I'm trying my first implementation of AVG as an analytic function. I took the following query which gave a simple average:
    SELECT
    PERSON.LASTNAME,
    COUNT(TO_NUMBER(RPTOBS.OBSVALUE)) CNT,
    AVG(TO_NUMBER(RPTOBS.OBSVALUE)) AVRG
    FROM
    TUT.PERSON PERSON,
    TUT.RPTOBS RPTOBS
    WHERE
    PERSON.PID = RPTOBS.PID AND
    RPTOBS.HDID = 54
    GROUP BY
    PERSON.LASTNAME;
    and was rewrote this to give an average of the values of the last 3 dates (I think..)
    SELECT
    PERSON.LASTNAME,
    RPTOBS.OBSDATE,
    AVG(TO_NUMBER(RPTOBS.OBSVALUE))
    OVER
    (PARTITION BY PERSON.LASTNAME
    ORDER BY RPTOBS.OBSDATE
    ROWS BETWEEN UNBOUNDED PRECEDING AND 2 FOLLOWING)
    AS AVRG3
    FROM
    TUT.PERSON PERSON,
    TUT.RPTOBS RPTOBS
    WHERE
    PERSON.PID = RPTOBS.PID AND
    RPTOBS.HDID = 54;
    (this seemed to be a direct translation of a similar query in the SQL Reference.
    I am getting an error message of:
    ORA-0439 - feature not enabled - OLAP Window Functions
    Can some one tell me why?
    Thanks,
    Will Salomon
    [email protected]

    I haven'y done it personally, but I am told that it's really as simple as de-insatlling the Standard Edition software and then installing the Enterprise Edition. Th einstaller will prompt you for an Oracle SID and you just have to point it to your existing database.
    You may wish to test this proposition before risking your actual system. But, in any case, take a back up.
    With 9i things are simpler: everyting gets installed, you're just not allowed to use the EE features if you haven't paid for them.
    Cheers, APC

  • When using cd my mac gives error

    when i want to use a cd or dvd, my mac mini gives an error..
    some music cd's work, but with dvd there is allways an error, for exemple by installing something.. Does any one know's what it is??
    Vise gives the error 1008:5,-5000

    Hi kiento-
    Greetings and welcome to the Apple Discussion boards
    Some users have reported success using an optical drive lens cleaning kit. I would give that a try first.
    If that doesn't doesn't solve the problem it is possible that the optical drive is defective. You can either chose to replace the drive yourself, have it replaced at a service center, or purchase an external firewire CD/DVD drive.
    Luck-
    -DaddyPaycheck

  • Consuming Websphere Portlets in spaces using WSRP WSDL url gives error.

    Sr#3-6516739281
    Ver- 11.1.1.6.0 spaces.
    Hi ,
    Customer consuming a websphere portlets in spaces
    Producer: Websphere portal server
    Consumer - Webcenter spaces 11.1.1.6.0
    WSDL url - http://192.168.0.50:9080/producer/wsdl/wsrp_service.wsdl
    WSRP 2.0 portlets hosted on IBM WebSpere application server (v. 7.1) are not rendered at all in spaces. Registration part goes fine and when click the test button after registration it says successful.
    but when we go the spaces page the portlet is not rendered and says - Portlet consumer error and the following stack trace traced in spaces server logs .
    The thrown exception is:
    <3-Dec-2012 4:21:33 o'clock PM EST> <Error> <oracle.portlet.binding> <BEA-000000> <An error has occured for Portlet Binding portlet2581387127.
    oracle.adf.model.portlet.binding.PortletModelException: Unable to get portlet response (Internal Error) for portlet binding portlet2581387127.
         at oracle.adf.model.portlet.binding.PortletBinding$InnerPortletModel.getPortletRendition(PortletBinding.java:1476)
         at oracle.adfinternal.model.portlet.binding.ActivityPortletModelWrapper.getPortletRendition(ActivityPortletModelWrapper.java:151)
         at oracle.adfinternal.view.faces.renderkit.rich.portlet.PortletRenderer.encodeAll(PortletRenderer.java:916)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.customizable.PanelCustomizableRenderer.encodeChildrenVertically(PanelCustomizableRenderer.java:1039)
         at oracle.adfinternal.view.faces.renderkit.rich.customizable.PanelCustomizableRenderer.encodeAll(PanelCustomizableRenderer.java:350)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at org.apache.myfaces.trinidad.rend
    This works fine in .net and other consumers.
    Please see the screen shots attached to SR-
    WCP_PortletProducerRegistration.png - registration screen in spaces
    WCP_Error.png - Error when try to see the portlet in spaces page.
    WC_Spaces.out -logs with the above error.
    We also tried to register this is Jdevelooper. This gives different error in registration it self.
    screen shot- JDeveloper-WSRPProducerRegistration.docx
    Please shed some light on this to proceed further.

    Sr#3-6516739281
    Ver- 11.1.1.6.0 spaces.
    Hi ,
    Customer consuming a websphere portlets in spaces
    Producer: Websphere portal server
    Consumer - Webcenter spaces 11.1.1.6.0
    WSDL url - http://192.168.0.50:9080/producer/wsdl/wsrp_service.wsdl
    WSRP 2.0 portlets hosted on IBM WebSpere application server (v. 7.1) are not rendered at all in spaces. Registration part goes fine and when click the test button after registration it says successful.
    but when we go the spaces page the portlet is not rendered and says - Portlet consumer error and the following stack trace traced in spaces server logs .
    The thrown exception is:
    <3-Dec-2012 4:21:33 o'clock PM EST> <Error> <oracle.portlet.binding> <BEA-000000> <An error has occured for Portlet Binding portlet2581387127.
    oracle.adf.model.portlet.binding.PortletModelException: Unable to get portlet response (Internal Error) for portlet binding portlet2581387127.
         at oracle.adf.model.portlet.binding.PortletBinding$InnerPortletModel.getPortletRendition(PortletBinding.java:1476)
         at oracle.adfinternal.model.portlet.binding.ActivityPortletModelWrapper.getPortletRendition(ActivityPortletModelWrapper.java:151)
         at oracle.adfinternal.view.faces.renderkit.rich.portlet.PortletRenderer.encodeAll(PortletRenderer.java:916)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.customizable.PanelCustomizableRenderer.encodeChildrenVertically(PanelCustomizableRenderer.java:1039)
         at oracle.adfinternal.view.faces.renderkit.rich.customizable.PanelCustomizableRenderer.encodeAll(PanelCustomizableRenderer.java:350)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at org.apache.myfaces.trinidad.rend
    This works fine in .net and other consumers.
    Please see the screen shots attached to SR-
    WCP_PortletProducerRegistration.png - registration screen in spaces
    WCP_Error.png - Error when try to see the portlet in spaces page.
    WC_Spaces.out -logs with the above error.
    We also tried to register this is Jdevelooper. This gives different error in registration it self.
    screen shot- JDeveloper-WSRPProducerRegistration.docx
    Please shed some light on this to proceed further.

  • Adding Used DC under CRMWEB gives error " .dcdef  checked out by others"

    Hello E-Commerce Experts,
    We need to extend E-Commerce 7.0 b2b application (claims and returns). After much struggle, we could finally deploy the custom application. We now would like to extend it and have new fields added.
    We need to to defined a used dependency in the web module project crm/eservice/web/cr_b2b for customer extension DC provided for java action classes (crm/home/crm/ext) but are getting an error saying:
    DC definition could not be checked out: the file .dcdef is checked out by others. None of the objects have been checked out by any other developers.
    Please advise as to how to resolve this error.
    Additionally, we would like to add CRMJAVA SC as a development component, so we could refer the existing java files. But we are not able to import it properly. It shows up as an empty SC in NWDS after being imported.
    Your help would be highly appreciated.
    Thanks!

    I was able to resolve my error. I had created some other instances of the same project under a different workspace.
    Follow these steps for every workspace  you might have created your project in (except the current workspace):
    For every open activity ( Windows -> Show View -> Open Activities)
    - Select your open activity  -> Right Click -> Revert  and then Delete the activity  (Right click -> delete)
    Delete all your open activities.
    Open your current project and Resync all DCs.
    Now try to add used DC for the web module project.
    It should work.

  • Attempting to use "backup and Restore" giver error message

    In November 2014 I backed up my PC ( see below ) onto  a 2TB ecternal drive ( Lacie).  This ok and can restore.  Spare space 1.2TB
    Now when I attempt to Backup again, using Windows Backup and restore, with same settings  I get an error message :
    "The requested operation cannot be performed on a file with a user-mapped section open"  This appears after some time of activity. There is no mention of WHICH file causes the problem.  I have repeated with different settings ie with
    part backups only, or just one drive only.
    The PC runs Windows 7 ( 64 bit) there is an SSD c: drive and a d: drive mostly data with some programs installed here.
    I would very much appreciate some advice.

    Hi and thank you Mandy.
    After many failed attempts - even backing up a few files to test - I was getting nowwhere.  Eventually I succeeded after disabling start menus and uninstalling some programs.  I also disabled my Kaspersky anti-virus completely and disconnected
    the internet!!  This time the backup and system image appeared to be OK .
    You have helped, Mandy, by identifying the anti-virus as a possible culprit!!  Thank you.  Next time I backup I will just
    temporally disable it and see what happens.
    Kind regards
    Malcolm

  • Ldifwrite created file used in ldapadd/ldapmodify gives errors

    We want to backup entries in the Users container.
    1. The ldif file created by ldifwrite:
    ldifwrite -c oidtwo -b "cn=Users,dc=dn,dc=dev,dc=pg,dc=gov" -f backup.ldif
    2. ldapadd -p 389 -h localhost -D "cn=orcladmin" -w oiddp -f backup.ldif
    3. Got errors in orcloci ...in VI we found that the orcloci entries are not formatted properly, and we fixed this manually.
    4. We got another error:
    adding new entry cn=orcladmin, cn=Users, dc=dn,dc=dev,dc=pg,dc=gov
    ldap_add: DSA is unwilling to perform
    ldap_add: additional info: You cannot add entries containing authpasswords.
    Just wonder if this is the right way to back up this container?
    Thanks!

    You'll need to remove authpassword attributes as those are created at create time. Its mentioned in one of the steps of moving to a new server (Metalink Note:276688.1). The XSL they used is below:
    <!--
    File : del_authpassword.xsl
    Version : 1.0
    Author : mgueury
    Description:
    Remove the authpassword from the DSML files
    -->
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xml:output method="xml"/>
    <xsl:template match="*|@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="*|@*|node()"/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="attr">
    <xsl:choose>
    <xsl:when test="@name='authpassword;oid'">
    </xsl:when>
    <xsl:when test="@name='authpassword;orclcommonpwd'">
    </xsl:when>
    <xsl:otherwise>
    <xsl:copy>
    <xsl:apply-templates select="*|@*|node()"/>
    </xsl:copy>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    You'll want to start with dumping it to XML:
    ldapsearch -h $OID_HOSTNAME -p $OID_PORT -X -D "cn=orcladmin" -w $IAS_PASSWORD -b "cn=users,dc=dev_domain,dc=com" -s sub "objectclass=inetorgperson" > portal_users.xml
    Then run that against the XSL to remove the attribute:
    xml -f -s del_authpassword.xsl -o portal_users.xml portal_users_new.xml

  • IMovie Export using Quicktime in 1080p gives error OSStatus error -2125

    Hi, I am new to using iMovie, started using it few days back.  So far i have been unable to "Export using Quicktime" in 1920*1080p option.
    I was able to export using "Export to Quicktime" in 640*480p (.mp4 format) option and was able to use "Export Movie" with 1920*1080p (.mov format) option.
    Trying to export using "Export using Quicktime" in 1080p always failed so far.  I tried at least a dozen times with different settings.  Initially i was getting the following two errors randomly, but later, the last 4-5 trials i keep getting only the first error.
    1. OSStatus error - 2125
    2. Not enough room in the heap zone.
    Project details are - it is a 34 min. video and size came to 5.3GB when exported using "Export Movie" (.mov format) using 1080p option. 
    It indicates 2 hours to export it, takes 2 hours and interestingly, the OSStats error - 2125 error happens at the end of the export. I can see in the finder the increasing size of the file the process is creating.  It has been a really frustrating experience with iMovie so far.  I even tried duplicating the project with a different name and tried export, did not help.
    I have >300GB of free space on my hard drive and 8 GB of RAM.  I don't have any heavy applications running on the system. 
    I read forums about this error and tried the following so far with no help.
    1. Tried changing names of the iMovie project few times to see if that helps. 
    2. Set the sleep settings of the computer as well as monitor to Never.
    3. Reached out to apple support about it and they suggested me to setthe sleep settings to never and then try.  But that did not help.
    I am stuck with this error OSStatus error - 2125. 
    The settings I am trying with are:
    Export to MPEG-4
    H.264 video format
    20Mbps bit rate
    30 fps
    One question is, once I exported a project in one format or setting, do I have to create a new project to export it in different settings or I can just use the same project?
    Can someone please help?  Any help about this is greatly appreciated.   Thank you.

    I am having the same issue. Have been searchin gfor 3 days for an answer. I am able to export as MOV file, but not MP4. I bought QT Pro 7 to convert THE MOV to MP4 and it doesnt work either. I then bought iskysoft Video Converter and it wont convert the MOV to MP4 either. (will convert smaller files)
    I have 700 GB of free space on drive. I have tried a movie that is 3 hours, one that is one hour, and one that is 54 minutes..All same thing.. Error -2125. Although it will work with smaller movies under 30 mins.
    Surely there has to be an answer to this? It seems it has been an ongoing issue for quite some time, yet there is no solution.

  • Case stament use in where clause  grive error

    i want to use this conditions but gives error. Please give me the solution of it
    WHERE
    CASE
    WHEN CANCELLED_DATE IS NULL THEN
    TO_DATE(INV_GL_DATE,'DD-MON-YY') <= TO_DATE (:P_DATE1,'DD-MON-YY')
    ELSE
    TO_DATE(INV_GL_DATE,'DD-MON-YY') >= TO_DATE(:P_DATE1,'DD-MON-YY')
    END) --- <= TO_DATE(:P_DATE1,'DD-MON-YY')

    Hi,
    Remember that a CASE expression always evaluates to a single value in one of the SQL datatypes, such as VARCHAR2, NUMBER or DATE. (There is no Boolean datatype in SQL.)
    You can't say
    WHERE   CASE ... END;for the same reason that you can't say
    WHERE   'Hello, world!';orWHERE   100;or
    WHERE   SYSDATE;CASE expressions are really valuable because they allow you do perform IF-THEN-ELSE logic in places where you normally can't, like the SELECT clause.
    The WHERE clause is a place where you can perform IF-THEN-ELSE logic anyway, so there's rarely a need for a CASE expression in a WHERE clause. It's just as efficient and just as clear (if not more so) to put all your conditions directly in the WHERE clause, like Max demonstrated.
    Edited by: Frank Kulash on Feb 26, 2010 10:13 AM
    user11995078 wrote:
    Thanks Dear But how can we use with case and decodeWhy do you want to?
    CASE does not help in this problem, any more than regular expressions or CONNECT BY or MODEL help. They are all great tools for particular jobs, but not for this job. Asking "How can I use CASE to do this?" Is like asking "How can I use a hammer to tighten a bolt?" Perhaps there is a way, but it's likely to be contrived and ridiculous.
    Here's the least ridiculous way I can think of:
    WHERE     ( TO_DATE (INV_GL_DATE, 'DD-MON-YY') 
         - TO_DATE (:P_DATE1,     'DD-MON-YY')
         ) * CASE
                 WHEN  cancelled_date  IS NULL  THEN  1
                    `                            ELSE -1
             END <= 0

  • Multivalue error when using the previous() function

    I am getting a multivalue error when using the previous() function on a dimension object in the report.  I thought that the previous function was supposed to look at the current report and then look at the previous record's contents.  How could this possibly give me a multivalue error when the value is clearly output in the previous row?  Anyone have any ideas?
    By the way, this is a valuable function for the types of reports that I design.  The next() function would be even more valuable.
    Thanks for your help.

    Hi Michael,
    Could you please test the following solutions it might help you to resolve the issue.
    Solution1:
    Use slice and dice to reset all the tables that have #multivalue in it. The only problem with this workaround is they have to do the formatting manually.
    Solution2:
    Also, test the issue by changing the object to dimension if it is a measure or to measure if it is a dimension.
    Regards,
    Sarbhjeet Kaur

  • In Ref cursor, user defined functions give "invalid column" error in EJB.

    Hello,
    I have written PL/SQL stored procedures/functions in Oracle 8i. They return the result set as a ref cursor.
    These procedures are accessed by EJB (weblogic) using Type 4 (100% Java) JDBC Driver.
    My problem is - if I use a user defined function to fetch a value in the select statement of the reference cursor, the EJB gives an error msg - invalid column name.
    If instead of using the function I get the value directly from the table, it works fine. Refer the code below :
    //In the PL/SQL function -
    //instead of writing :
    Open rc for
    Select empcode, empname
    from emp ;
    //If I write :
    Open rc for
    Select empcode, mypack.getempname(empcode)
    from emp ;
    //getempname(empcode) is a function in
    //in a package named 'mypack'
    //and returns name for empcode.
    //The java code gives error
    //error : invalid column name
    //While both are working fine and
    //returning currect result in SQL Navigator.
    Help me solve this mystery ?
    Thanks in advance.
    Swati.
    null

    Hi:
    When use inline Function to simplify the SQL statements, there is one thing that one should conside--Purity Level.
    if you create standalone stored pl/sql function. Oracle implicitly determines the PURITY level during compilation of the stored objects or at execution of an anonymous pl/sql block.
    if you implement Package inline Function( in your case),unlike standalone stored pl/sql functions, the PL?SQL Engine does not determine the purity level of package functions. Therefore, you must explicity assign the correct purity levels for the function to be called inline.
    the code like:
    create or replace package mypack is
    function getempname(empcode emp%empid%type)
    return varchar2;
    PRAGMA RESTRICT_REFERENCES(getempname,WNDS,WNPS,RNPS);
    end mypack;
    I think it can solve your problem if you use enough "pure"to be called inline function. Or you can create the standalone function to do it.
    good luck!
    Yali
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Swati Agrawal ([email protected]):
    Hello,
    I have written PL/SQL stored procedures/functions in Oracle 8i. They return the result set as a ref cursor.
    These procedures are accessed by EJB (weblogic) using Type 4 (100% Java) JDBC Driver.
    My problem is - if I use a user defined function to fetch a value in the select statement of the reference cursor, the EJB gives an error msg - invalid column name.
    If instead of using the function I get the value directly from the table, it works fine. Refer the code below :
    //In the PL/SQL function -
    //instead of writing :
    Open rc for
    Select empcode, empname
    from emp ;
    //If I write :
    Open rc for
    Select empcode, mypack.getempname(empcode)
    from emp ;
    //getempname(empcode) is a function in
    //in a package named 'mypack'
    //and returns name for empcode.
    //The java code gives error
    //error : invalid column name
    //While both are working fine and
    //returning currect result in SQL Navigator.
    Help me solve this mystery ?
    Thanks in advance.
    Swati.
    <HR></BLOCKQUOTE>
    null

  • Problem adding item to list using a function.  Error - Null pointer

    Hi Guys,
    I'm not sure what the problem is, but for some reason I am unable to add an item to a list using a function. I can add an item when I call it in the same function that the list is created, but I cannot add the item from anoter function. Here is the code:
    Main:
    import java.awt.Color;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class main {
          * @param args
         public static void main(String[] args) {
              JFrame JFrame = new JFrame();
              JFrame.setSize(400,400);
              testpanel panel1 = new testpanel();
              panel1.setBackground(Color.red);
              JPanel panel2 = new testpanel();
              panel2.setBackground(Color.BLUE);
              JFrame.add(panel1);
              JFrame.add(panel2);
              JFrame.setLayout(new FlowLayout());
              //THIS GIVES ERROR:
              //NullPointerException
              panel1.addListItem("test");
              JFrame.setVisible(true);
    }And here is the testpanel class:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * testpanel.java
    * Created on Apr 7, 2010, 6:10:24 PM
    import java.awt.List;
    import java.awt.ScrollPane;
    import java.awt.event.ActionListener;
    * @author Snowraver1
    public class testpanel extends javax.swing.JPanel {
         public void addListItem(String string){
              list.add(string);
        /** Creates new form testpanel */
        public testpanel() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
        private void initComponents() {
            jButton1 = new javax.swing.JButton();
            ScrollPane scrollPane = new ScrollPane();
            List list = new List();
            jButton1.setText("jButton1");
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(49, Short.MAX_VALUE)
                    .addComponent(jButton1)
                    .addGap(46, 46, 46))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(123, 123, 123)
                    .addComponent(jButton1)
                    .addContainerGap(139, Short.MAX_VALUE))
            this.add(scrollPane);
            scrollPane.add(list);
        }// </editor-fold>//GEN-END:initComponents
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private javax.swing.JButton jButton1;
        private ScrollPane scrollPane;
        private List list;
        // End of variables declaration//GEN-END:variables
    }Thanks for the help!
    -- Snow

    You should check how you are initializing your variables in your testpanel class. You initialize your button correctly, but your other class variables are being overridden. As a result, your class variables still have a value of 'null'.

  • Error using Combine Files Function

    I'm running Acrobat Standard Ver. 8 and I've got >150 .rtf files that need to be converted into a single pdf file.  Using the combine files utility when it tries to open the files, it gives me a protection error, ie, "please make sure you have read access to the file".  I get the same errors with Word documents.  I created these files and can access them just fine with Word.  Any suggestions?  My IT people are stumped.
    Thanks for the help.

    I think the Combine feature is designed for files that are already pdfs. You can convert entire folders into pdfs simulataneously then use the combine function.

  • Using CopyValue function with error

    Hi All,
    I have a requirement to send the three values coming in the one source field to three different target fields.
    E.g: Source field is "src1" and having the values 1,2 ,3 These values should be sent to the target fields such as
    first target field "Trg1" should get the value as "1" and the second target field "Trg2" should get the value as "2".
    third target field should getv value as "3"
    I have used copyvalue function. it is working fine but if any value from "src 1" is blank.
    I will have the runtime error as follow
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_WORKORDER_TO_ORDCHG_ORDERSO5_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_WORKORDER/StatementName2/TEST/acc
    Will appreciate your advise on how to resolve this.
    Regards,
    FNG

    I have mapped as follows
    sourc1 ->  mapWithDefault [NIL}  ->  copyvalue [0]  -> targt 1
    sourc1 ->  mapWithDefault [NIL}  ->  copyvalue [1]  -> targt 2
    sourc1 ->  mapWithDefault [NIL}  ->  copyvalue [2]  -> targt 2
    No substring function used.
    But still having error
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_WORKORDER_TO_ORDCHG_ORDERSO5_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_WORKORDER/StatementName2/TEST/acc
    I noticed from the source xml structure in the inbound payload, when sourc1 is blank, the tag is not created.
    so question is how to create sourc1 tag if the sourc1 is come as blank ?

Maybe you are looking for

  • I have two accounts now, how do I trim them down?

    It seems like I have two accounts now and can buy apps and various things through both accounts depending on which one comes up.  One is Pre-MobileMe and the other is a mobile me account and now heading twards iCloud.... so How do I trim them down an

  • HOW DO I INSTALL PHOTOSHOP ON MY MAC DESKTOP USING CREATIVE CLOUD?

    I INSTALLED CC TO MY LAPTOP WITH NO REAL ISSUE. I HAVE INSTALLED CC TO MY DESKTOP BUT I AM NOT GETTING THE POP-UP WINDOW THAT ALLOWS ME TO DOWNLOAD PHOTOSHOP & LIGHTROOM. NEED TO INSTALL/DOWNLOAD PHOTOSHOP STILL...

  • Adobe flash download help ???

    Hello.  I repeatedly successfully ??? download adobe flash player only to repeatedly have a box pop up when I attempt to listen or access something online saying "Opps, you need to download the latest adobe flash player to access this"  HELP... how c

  • Color Correction Auto Levels results uneven

    Good Mornig, My Color Correction Auto Levels results are uneven. I applied them to a short clip to Test, and they look fine when they apply...but every now and then there is a flicker for a few frames/seconds and it reverts to original colors. I have

  • Working with Standaard Report

    hi ABAPERS, i have a query, there is a TCODE FBL5N (Customer Line Item Dispaly), there i have to pick two fields Reference key1(XREF1) & Reference Key2(XREF2)... and i need to place them in FD10NA (Customer Balance Display) TCODE.... is it possible t