Find dependency on Packaged Function

Hi All
I want to find dependencies on packaged function. i.e. the objects that depend on packaged procedure.
let say we have a package P1 and it has 3 Functions F1,F2,F3. I want to find what all other objects (package or procedure or function) depend on P1.F1.
I know how to find dependency on Package as a whole but dont know how to find dependency on packaged function only.
I also know as a work around i can search in all_source table and find in the reference to P1.F1 and get that.
But is their any other way anyone else might have used to find package function dependency?
Thanks

A package is considered as a single object, so no breakdown of functions I'm afraid.
That said, if this is something you need on daily basis, you could write a helper function using your mentioned workaround, doing the breakdown for you. Then you could even integrate that in sqldev's IDE through a user defined XML extension...
Have fun,
K.

Similar Messages

  • Dependency analysis for function in  plsql package

    Hi there,
    I am trying to resolve a bug in a function which is inside a package. I want to know which package,functions are affected by the change so I can retest it. I have not changed the parameters or return type from function just the code inside it. Is there a table I can query that gives a dependency "tree"?
    Thanks

    user469956 wrote:
    Hi there,
    I am trying to resolve a bug in a function which is inside a package. I want to know which package,functions are affected by the change so I can retest it. I have not changed the parameters or return type from function just the code inside it. Is there a table I can query that gives a dependency "tree"?
    ThanksThis is the beauty of a package. Since you have not changed the parameters or return type from function just the code inside it, all you need is issue:
    CREATE OR REPLACE
      PACKAGE BODY package-name
      IS
    modified-package-body
    END package-name
    /Do not replace/recompile package specification!!! Again, this is the beauty of a package: as long as you do not replace/recompile package specification, modifying package body does not invalidate any dependent objects.
    SY.
    P.S. If you want to get dependencies, use DBA_DEPENDENCIES/ALL_DEPENDENCIES/USER_DEPENDENCIES data dictionary views.

  • Please help...Can't find dependent libraries.

    I've searched and read, and tried several things but every time I run my application I get this:
    java.lang.UnsatisfiedLinkError: C:\JBuilderX\Projects\AlwaysOnTop\AlwaysOnTop.dll: Can't find dependent libraries
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:834)
         at alwaysontop.MainFrame.<clinit>(MainFrame.java:108)
         at alwaysontop.AlwaysOnTopApp.<init>(AlwaysOnTopApp.java:22)
         at alwaysontop.AlwaysOnTopApp.main(AlwaysOnTopApp.java:68)
    Exception in thread "main"
    Here is exactly what I did, maybe someone can spot what I did wong:
    1) Created AlwaysOnTop like this:
    package alwaysontop;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class MainFrame extends JFrame
    static
       System.loadLibrary("AlwaysOnTop");
       //Runtime.getRuntime().loadLibrary("AlwaysOnTop"); //Tried this too...same thing
      public static native void setWindowAlwaysOnTop(String title, boolean flag);
    ...2) I then built the application
    3) I opened a command prompt and went to the classes directory just on top of alwaysontop directory. It looks like this:
    C:\Projects\AlwaysOnTop\classes\alwaysontop
    So, I was in the C:\Projects\AlwaysOnTop\classes level
    3) Next I generated the header file like this:
    javah -jni -classpath alwaysontop MainFrame
    4) Copied MainFrame.h over to the CPP project area.
    5) Created a C file (not a C++, tried that first, then tried C style after reading something that recomended it). This file looks like this:
    #include "jni.h"
    #include "MainFrame.h"
    #include <stdio.h>
    #include <windows.h>
    #pragma argsused
    int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
            return 1;
    JNIEXPORT void JNICALL Java_Win32Native_setWindowAlwaysOnTop(JNIEnv *env, jclass obj, jstring strWindowTitle, jboolean bAlwaysOnTop)
            HWND hwnd = NULL;
            const char *str = (*env)->GetStringUTFChars(strWindowTitle,0);
            hwnd = ::FindWindow(NULL,str);
            (*env)->ReleaseStringUTFChars(strWindowTitle,str);
            if (bAlwaysOnTop)
              SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            else
              SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            return;
    }6) Copied the DLL that got generated to thw Windows\System32 directory.
    7) Ran the application from JBuilder.
    8) Got the error...banged head into wall for umteenth time.
    Note that the java.library.path looks like this:
    C:\JBuilderX\jdk1.4\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\DMI\WIN32\BIN;C:\Program Files\Microsoft SDK\Bin\.;C:\Program Files\Microsoft SDK\Bin\WinNT\.;C:\JavaSDKs\j2sdk1.4.2_01\bin;C:\Ant\bin; ...
    So the C:\Windows\System32 is there!
    What do I need to do for Java to be able to find the dependant libraries?
    THANKS!

    Make sure your DLL exports a function named exactly
    Java_alwaysontop_MainFrame_setWindowAlwaysOnTop
    without any C++ name mangling or other mismatch. You
    can use a tool like dumpbin for this.
    -slj-
    You might be on to something. I couldn't get dumpbin working (no output...tried several options) so I used another tool and it showed the following as exports:
    Entry Point = 004020F8h
    Ordinal = 1
    Name = __CPPdebugHook
    That is all! The imports look correct, so I think there really is nothing else being exported.
    Here is what my AlwaysOnTop.c file looks like:
    #include "jni.h"
    #include "alwaysontop_MainFrame.h"
    #include <stdio.h>
    #include <windows.h>
    #pragma argsused
    int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
            return 1;
    JNIEXPORT void JNICALL Java_alwaysontop_MainFrame_setWindowAlwaysOnTop(JNIEnv *env, jclass obj, jstring strWindowTitle, jboolean bAlwaysOnTop)
            HWND hwnd = NULL;
            const char *str = (*env)->GetStringUTFChars(strWindowTitle,0);
            hwnd = ::FindWindow(NULL,str);
            (*env)->ReleaseStringUTFChars(strWindowTitle,str);
            if (bAlwaysOnTop)
              SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            else
              SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            return;
    }My generated header file looks like this:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class alwaysontop_MainFrame */
    #ifndef _Included_alwaysontop_MainFrame
    #define _Included_alwaysontop_MainFrame
    #ifdef __cplusplus
    extern "C" {
    #endif
    #undef alwaysontop_MainFrame_FOCUS_TRAVERSABLE_UNKNOWN
    #define alwaysontop_MainFrame_FOCUS_TRAVERSABLE_UNKNOWN 0L
    #undef alwaysontop_MainFrame_FOCUS_TRAVERSABLE_DEFAULT
    #define alwaysontop_MainFrame_FOCUS_TRAVERSABLE_DEFAULT 1L
    #undef alwaysontop_MainFrame_FOCUS_TRAVERSABLE_SET
    #define alwaysontop_MainFrame_FOCUS_TRAVERSABLE_SET 2L
    /* Inaccessible static: focusTraversalKeyPropertyNames */
    /* Inaccessible static: LOCK */
    /* Inaccessible static: dbg */
    /* Inaccessible static: isInc */
    /* Inaccessible static: incRate */
    #undef alwaysontop_MainFrame_TOP_ALIGNMENT
    #define alwaysontop_MainFrame_TOP_ALIGNMENT 0.0f
    #undef alwaysontop_MainFrame_CENTER_ALIGNMENT
    #define alwaysontop_MainFrame_CENTER_ALIGNMENT 0.5f
    #undef alwaysontop_MainFrame_BOTTOM_ALIGNMENT
    #define alwaysontop_MainFrame_BOTTOM_ALIGNMENT 1.0f
    #undef alwaysontop_MainFrame_LEFT_ALIGNMENT
    #define alwaysontop_MainFrame_LEFT_ALIGNMENT 0.0f
    #undef alwaysontop_MainFrame_RIGHT_ALIGNMENT
    #define alwaysontop_MainFrame_RIGHT_ALIGNMENT 1.0f
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID -7644114512714619750i64
    /* Inaccessible static: metrics */
    /* Inaccessible static: class_00024java_00024awt_00024Component */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024ComponentListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024FocusListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024HierarchyListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024HierarchyBoundsListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024KeyListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024MouseListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024MouseMotionListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024MouseWheelListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024InputMethodListener */
    /* Inaccessible static: class_00024java_00024beans_00024PropertyChangeListener */
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID 4613797578919906343i64
    /* Inaccessible static: dbg */
    #undef alwaysontop_MainFrame_INCLUDE_SELF
    #define alwaysontop_MainFrame_INCLUDE_SELF 1L
    #undef alwaysontop_MainFrame_SEARCH_HEAVYWEIGHTS
    #define alwaysontop_MainFrame_SEARCH_HEAVYWEIGHTS 1L
    /* Inaccessible static: class_00024java_00024awt_00024Container */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024ContainerListener */
    /* Inaccessible static: class_00024java_00024awt_00024KeyboardFocusManager */
    /* Inaccessible static: systemSyncLWRequests */
    #undef alwaysontop_MainFrame_OPENED
    #define alwaysontop_MainFrame_OPENED 1L
    /* Inaccessible static: nameCounter */
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID 4497834738069338734i64
    /* Inaccessible static: dbg */
    /* Inaccessible static: class_00024java_00024awt_00024Window */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024WindowListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024WindowFocusListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024WindowStateListener */
    #undef alwaysontop_MainFrame_DEFAULT_CURSOR
    #define alwaysontop_MainFrame_DEFAULT_CURSOR 0L
    #undef alwaysontop_MainFrame_CROSSHAIR_CURSOR
    #define alwaysontop_MainFrame_CROSSHAIR_CURSOR 1L
    #undef alwaysontop_MainFrame_TEXT_CURSOR
    #define alwaysontop_MainFrame_TEXT_CURSOR 2L
    #undef alwaysontop_MainFrame_WAIT_CURSOR
    #define alwaysontop_MainFrame_WAIT_CURSOR 3L
    #undef alwaysontop_MainFrame_SW_RESIZE_CURSOR
    #define alwaysontop_MainFrame_SW_RESIZE_CURSOR 4L
    #undef alwaysontop_MainFrame_SE_RESIZE_CURSOR
    #define alwaysontop_MainFrame_SE_RESIZE_CURSOR 5L
    #undef alwaysontop_MainFrame_NW_RESIZE_CURSOR
    #define alwaysontop_MainFrame_NW_RESIZE_CURSOR 6L
    #undef alwaysontop_MainFrame_NE_RESIZE_CURSOR
    #define alwaysontop_MainFrame_NE_RESIZE_CURSOR 7L
    #undef alwaysontop_MainFrame_N_RESIZE_CURSOR
    #define alwaysontop_MainFrame_N_RESIZE_CURSOR 8L
    #undef alwaysontop_MainFrame_S_RESIZE_CURSOR
    #define alwaysontop_MainFrame_S_RESIZE_CURSOR 9L
    #undef alwaysontop_MainFrame_W_RESIZE_CURSOR
    #define alwaysontop_MainFrame_W_RESIZE_CURSOR 10L
    #undef alwaysontop_MainFrame_E_RESIZE_CURSOR
    #define alwaysontop_MainFrame_E_RESIZE_CURSOR 11L
    #undef alwaysontop_MainFrame_HAND_CURSOR
    #define alwaysontop_MainFrame_HAND_CURSOR 12L
    #undef alwaysontop_MainFrame_MOVE_CURSOR
    #define alwaysontop_MainFrame_MOVE_CURSOR 13L
    #undef alwaysontop_MainFrame_NORMAL
    #define alwaysontop_MainFrame_NORMAL 0L
    #undef alwaysontop_MainFrame_ICONIFIED
    #define alwaysontop_MainFrame_ICONIFIED 1L
    #undef alwaysontop_MainFrame_MAXIMIZED_HORIZ
    #define alwaysontop_MainFrame_MAXIMIZED_HORIZ 2L
    #undef alwaysontop_MainFrame_MAXIMIZED_VERT
    #define alwaysontop_MainFrame_MAXIMIZED_VERT 4L
    #undef alwaysontop_MainFrame_MAXIMIZED_BOTH
    #define alwaysontop_MainFrame_MAXIMIZED_BOTH 6L
    /* Inaccessible static: nameCounter */
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID 2673458971256075116i64
    /* Inaccessible static: class_00024java_00024awt_00024Frame */
    #undef alwaysontop_MainFrame_EXIT_ON_CLOSE
    #define alwaysontop_MainFrame_EXIT_ON_CLOSE 3L
    /* Inaccessible static: defaultLookAndFeelDecoratedKey */
    /* Inaccessible static: class_00024alwaysontop_00024MainFrame */
    * Class:     alwaysontop_MainFrame
    * Method:    setWindowAlwaysOnTop
    * Signature: (Ljava/lang/String;Z)V
    JNIEXPORT void JNICALL Java_alwaysontop_MainFrame_setWindowAlwaysOnTop
      (JNIEnv *, jclass, jstring, jboolean);
    #ifdef __cplusplus
    #endif
    #endifDoes anyone see anything wrong with that?
    Maybe I should use another compiler (VC++ maybe)?

  • Calling a package function inside a sql

    Hi friends!!!
    First of all happy Christmas! And them please help! :)
    We have a query calling a package function:
    SELECT * FROM DW025H WHERE DW025H_NR=MPPCI.ENCR ('0000000000000000');There is a primary key just with one column DW025H_NR and the problem is that is not accessing by INDEX UNIQUE SCAN,
    it's accessing by TABLE ACCESS FULL.
    May be the problem is that we are calling a procedure inside the query?
    I have been able to run that query accessing by primary key from my computer but a workmate hasn't!
    We both are connecting the same data base 10.2.0.4 and using Oracle SQL Developer!
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 5343K| 1406M| 15670 (7)| 00:02:43 |
    |* 1 | VIEW | DW025H | 5343K| 1406M| 15670 (7)| 00:02:43 |
    |* 2 | FILTER | | | | | |
    | 3 | TABLE ACCESS FULL| DW025H | 5343K| 1406M| 15670 (7)| 00:02:43 |
    Predicate Information (identified by operation id):
    1 - filter("DW025H_NR"="MPPCI"."ENCRIPTAPAN"('0000000000000000'))
    2 - filter(CASE "OPS$SISINFO"."IS_USER_DNI"() WHEN 1 THEN
    SYS_AUDIT('OPS$SISINFO','DW025H','CMINFOGR001',3) ELSE NULL END IS
    NULL)
    The correct path would be:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 276 | 3 (0)| 00:00:01 |
    |* 1 | FILTER | | | | | |
    | 2 | TABLE ACCESS BY INDEX ROWID| DW025H | 1 | 276 | 3 (0)| 00:00:01 |
    |* 3 | INDEX UNIQUE SCAN | PK_DW025H | 1 | | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter(CASE "OPS$SISINFO"."IS_USER_DNI"() WHEN 1 THEN
    SYS_AUDIT('OPS$SISINFO','DW025H ','CMINFOGR001',3) ELSE NULL END IS NULL)
    3 - access("DW025H_NR"="MPPCI"."ENCR"('0000000000000000'))
    Please any ideas!?!?!
    Thanks a lot!
    José
    Edited by: jamv on Dec 20, 2011 10:50 AM

    Hello
    Have a read of this and try to pull together the information in it and post it up here. That will help immensely with getting to the root of your problem...
    HOW TO: Post a SQL statement tuning request - template posting
    In the mean time:
    From the execution plan you have extra predicates that aren't present in the query you supplied, so that's either not the SQL or you have something like VPD switched on.
    Anyway, there could be lots of reasons for the difference in execution plan. Sorry if this is very basic and possibly patronising question but it's always worth checking the basics I think - are you both definitely connecting to the same database? If so, have a look in v$sqlarea for this SQL statement and find the SQL_ID, use this to query v$sql and look at the child_number column.
    select
        sql_id
    from
        v$sqlarea
    where
        sql_text like '%SELECT * FROM DW025H WHERE DW025H_NR=MPPCI.ENCR%(''0000000000000000'')%'
    and
        sql_text not like '%v$sqlarea%'
    select child_number from v$sql where sql_id='<enter the sql id returned by the query above>'as an example...
    XXXX> select /* my sql statement*/ rownum id from dual;
            ID
             1
    1 row selected.
    Elapsed: 00:00:00.10
    XXXX> select sql_id from v$sqlarea where sql_text like '%my sql statement%'
    and sql_text not like '%v$sqlarea%';
    SQL_ID
    a6ss4v79udz6g
    1 row selected.
    Elapsed: 00:00:03.56
    XXXX> select child_number from v$sql where sql_id='a6ss4v79udz6g'
      2  /
    CHILD_NUMBER
               0
    1 row selected.   If you have more than one row in v$sql there could be differences in the optimiser environment. The supplied like shows you how to gather the information that should help find what the differences are if any.
    Also as a side note if you're calling PL/SQL functions from SQL, you can take advantage of subquery caching to help reduce the number of calls (depending on your version). As it stands, your function is most likely going to be called for every row - when there is only a single row returned, that's not necessarily a problem but for multiple rows, the overhead can quickly grow. If there's no way to get rid of the function call, select the function from dual instead i.e.
    SELECT * FROM DW025H WHERE DW025H_NR= (SELECT MPPCI.ENCR%('0000000000000000') FROM dual);This also (as I learnt a couple of weeks ago) works when you're using columns in the table your selecting from as parameters to the function.
    HTH
    David

  • How to find what planning sequences/functions update data in a cube?

    Hi, Experts:
    We have a real time cube being updated by planning sequences/functions. How can I find what planning sequences/functions are updating this cube?
    Thanks,
    Jenny

    Hi,
      You can go the transaction code: rsa1 and then select "Meta data Repository" option on the left side.
    You can use Meta data repository to view the dependent objects for a infocube or any other BW object.
    In your case, you can select "Infocube" option on the left side and then go on selecting your infocube.
    Now you will get all dependent objects created on this infocube, which will include your plannign functions also.
    Refer top the following link for more details on "Meta data Repository",
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/ea683c25e9096de10000000a114084/frameset.htm
    Regards,
    Balajee

  • Java.lang.UnsatisfiedLinkError: ocijdbc9.dll: Can't find dependent librarie

    Hi all,
    I have written a simple code to connect to Oracle9i in WindowsXP.
    Oracle is installed and running on Linux machne on the Intranet.
    I have set 'classes12.jar' in classpath and placed following dlls in "C:\WINDOWS\system32" path
    ocijdbc9.dll
    ocijdbc9_g.dll
    heteroxa9.dll
    heteroxa9_g.dll
    Following is the part of code:
    public String dbName = new String("jdbc:oracle:oci8:username/password@sid_192.168.0.128");
    public String dbClassName = new String("oracle.jdbc.driver.OracleDriver");
    Class.forName(dbClassName);
    conection = DriverManager.getConnection(dbName);
    statement = conection.createStatement();
    When I run this code got following errors:
    java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\ocijdbc9.dll: Can't find dependent libraries
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:834)
         at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:193)
         at menus.SQLShelfManager.openDBconnecton(SQLShelfManager.java:46)
         at menus.SQLShelfManager.main(SQLShelfManager.java:129)
    Exception in thread "main"
    Please guide me, what I am missing? Thanks in advance...

    There are only a very very few and rare good reasons to use the oci8 driver with Java (and I can't remember any of them at the moment). Performance is not one of them. If at all possible, you should use the Type IV (thin) driver instead.
    The classes12.jar (or zip) is for use with Java 1.2 and 1.3. There are different versions of this jar for each version of the database, but they're fundamentally cross-compatible; all the post-8i drivers are supposed to work with all the post-8i databases (and the 8i stuff also mostly works too). There's been a succession of bug fixes and minor functional changes, as well as some very substantial perfromance improvements. If you are developing brand-new code, I very stongly encourage you to use the very latest driver (currently 10.2.0.1, I think). If you are using a Java version greater than 1.3, then you should use the ojdbc14.jar instead (and don't try to use both classes12.jar and ojdbc14.jar, they have the sameclasses in them). I think the 10.2.0.1 ojdb14.jar was the first one certified for Java 1.5, and it's significantly faster than the 9i drivers. Anyone considering an upgrade of drivers should plan to do a good regression test; as mentioned before, there are some very small functional differences. You can download the latest drivers here:
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    If you insist on using oci, then you probably need to do an Oracle client installation on your Windows box. If you stay with the 9i driver, the full client install is huge; however, you can almost certainly use the 10g "Instant Client", which is a pared-down version, with just the minimal stuff to support an application. That's available here:
    http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

  • UnsatisfiedLinkError: Can't find dependent libraries

    Hello,
    Am currently developing an application based on JNI. I have, after linking required libraries in c and compiling it, created a dll file 'hidapi.dll', which i load in java program via System.loadLibrary("hidapi") and compile it. When i run it in my machine (after of course, putting the dll file in System32 folder - Am using Wn 7 for your info.. ), the code runs perfectly fine. So far so good.
    But when i put the dll file in another machine the dll file is not getting loaded... My code gives an exception java.lang.UnsatisfiedLinkError: C:\Windows\System32\hidapi.dll: Can't find dependent libraries... When i tried to have the verbose messages through -verbose:jni , I get the following message.
    [Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI]
    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Window
    s\System32\hidapi.dll: Can't find dependent libraries
    [Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ... JNI]
    [Dynamic-linking native method java.lang.Throwable.getStackTraceElement ... JNI]
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)[Dynamic-linking native method sun.awt.windows.WComponentPeer.nativeHandleEvent ... JNI]
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at hidsignalapi.UsbPctoolJni.<clinit>(UsbPctoolJni.java:46)
    hidsignalapi.UsbPctoolJni is the class where i load the dll file, and line 46 is exactly the line where i wrote 'System.loadLibrary("hidapi");'
    I saw in a few forums to ensure the class names are correct... But if that is the case, it must not run in my system too right? The only linked files are jni.h and a custom library hidapi.h. Should the hidapi.h too must be put in classpath? Has any body has any idea about this..?
    Thanks,
    Sreram

    It is technically possible to create a C/C++ application without using compiler libraries but it that is an esoteric subject that has nothing to do with anything you might be doing with JNI.That is exactly, being a java programmer, where am stuck.
    I am rather certain that the missing component, hidapi.dll, has nothing to do with C/C++ compiler libraries. Yes. I, in my Java code, am loading the hidapi.dll dynamically, to perform some communication with the USB device, which is a JNI C dll, I created using VS2010 and the C code uses the static library setupapi.lib (for communicating directly with the OS).
    And unless you have a static library for that, which is not the same as the dll, there is no way you are going to link to that statically.I have MS SDK V7.0A pre-installed (along with Visual Studio - VS2010) in my system which has the library. So it works in my System (Windows 7). Problem arises only when i try to run the same code in another system, which has no VS.
    Realistically what it really comes done to is that you must understand what dependencies your own application has first before you explore the options for delivering it.That is exactly what i am trying to do here.
    Now i have a few questions here.
    One: Do i need to install SDK in every system for the static linking and in tun my code to work? Or will it suffice if i put the setupapi.lib in path? Or should i convert the static linking to dynamic linking? (I realize i am asking more of C related questions in a Java forum, but I am sure your answers will help me in creating a working code.)
    Two: After pathetically failing to create a working dll with VS2010, I tried to compile the code using Mingw gcc compiler and my code (C & JNI code) compiles successfully, but I do not know how to create a dll file by properly linking with the library files.
    After compiling the code with the -c option, creating hid.o for the hid class and hidapi_wrap.o for the JNI wrapper, I tried to create a dll with the following command.
    D:\Sreram>gcc -Wl,-kill-at -o hidapi.dll hidapi_wrap.o hid.o
    hid.o: In function `hid_enumerate':
    D:\Sreram/hid.c:286: undefined reference to `_imp__SetupDiGetClassDevsA@16'
    D:\Sreram/hid.c:295: undefined reference to `_imp__SetupDiEnumDeviceInterfaces@20'
    D:\Sreram/hid.c:310: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'
    D:\Sreram/hid.c:324: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'
    D:\Sreram/hid.c:463: undefined reference to `_imp__SetupDiDestroyDeviceInfoList@4'
    c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../libmingw32.a(main.o): In function `main':
    C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16'
    collect2: ld returned 1 exit status
    Obvious that the linker has no clue about these functions which are defined in external library 'Setupapi.lib' & setupapi.dll and hence I tried linking the file by adding the command '-lsetupapi.lib' (without 's), '-llibsetupapi.a' and -l'setupapi.dll' in vain. The compiler says
    c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -llibsetupapi.a (with whatever linker option i give)
    collect2: ld returned 1 exit status
    What am i doing wrong here?
    And three: Even if i succeed in creating a working dll, will it work in other Windows operating systems - I know i had to create a separate library file (.so) in linux and whatever in mac - like Windows XP, Windows Server 2003, etc.?
    Thanks for your patient replies and excuse me for such a long reply.
    Sreram

  • How to use type, packages, functions, and procedures in another schema ?

    I have two target schema in one OWB project, such as A and B. In a mapping of A, I would like to use some types, packages, functions, and procedures from B. I have tried the method of synonym as suggested, but I could not find the metadata of these when importing ... The only type of synonym I can import is the synonym for table. Is there a bug for synonym?
    If I cannot use synonym for this issue, is there another way to solve the problem?

    Now, in some instances you will absolutely need to create the second module as Carsten describes, however it should also be noted that you can reference objects in things like Expressions even if you have not loaded up the metadata. It is only when you need strong binding that it becomes neccessary to import objects. For everything else, as long as the reference will resolve at compile-time then you are good to go.
    For example, I have a function in one target schema (S1) and a private synonym to it in another(s2). A mapping in the S2 schema has an expression object that uses the synonym to the function in the expression property for a couple of the output attirbutes. The synonym has not been loaded into metadata - indeed OWB has no knowledge of its existance. But it resolves at compile time so the mapping validates and generates successfully.
    Mike

  • I am trying to uninstall itunes to reinstall a newer version.  it cannot find the installation package.  i have deleted everyhting but itunes

    i would love to use itunes.  i updated to 11.1 this evening but when i plugged in my iphone it told me that i needed to uninstall itunes and reinstall.  I tried to uninstall but i never could.  i kept gettign the message taht it could not find teh installation package!!!!!

    Hello there, cgssurveyingllc.
    Uninstalling iTunes can be tricky, but  following Knowledge Base articles should provide assistance in uninstalling the iTunes Application depending on your Windows version:
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/HT1923
    or
    Removing and Reinstalling iTunes and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    If you still have issues with uninstalling using control panel there are additional detailed steps that should help with manually removing the content.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • ORA-00904 and packaged function in report

    Oracle 9.2.0.7
    APEX 2.0
    Is APEX not able to deal with SQL that calls a packaged function?
    I ask because I'm able to execute this query:
    SELECT s.doc_id,
    s.last_name || ', ' || s.first_name full_name,
    s.p_id,
    s.create_date
    , rwa_wfrole.get_role_list(s.proj_id, s.p_id) wfrole_label
    FROM signatures_vw s
    WHERE s.proj_id = 182
    AND s.status = 'APPROVED'
    ORDER BY s.create_date, s.last_name, s.first_name
    in SQL*Plus, but not in the SQL Workshop or in a report region. In the latter case I get "ORA-00904 invalid identifier" for "rwa_wfrole.get_role_list"... which is a packaged function. Actually, to be more precise, it's a package in a remote database. In the APEX instance, I have a synonym pointing to it.
    Thanks for insight.
    -John

    I can't reproduce this in 10g. I did find bug 4177810 (Fixed in 9.2.0.8 Server Patch Set) that looks a bit like this problem.
      Description
        An unexpected ORA-904 can occur for some internally generated SQL
        when the select list contains non-column constants and the select
        appears in the FROM clause. This can occur for SQL produced for
        parallel query or for remote / distributed queries.
        Workaround:
          Rewrite the query to avoid constant expressions in the FROM clause select lists.***************************
    There are also recommendations dating way back that you should include the schema name in the Create Synonym statement.
    Scott

  • Packaged function not compiling

    This one is driving me mad as I cannot see any possible
    reason for it.
    I have two packages containing functions. They are both owned by one schema, different to the schema I am using to build my form. They are both granted execute to public and have public synonyms which are the same as the package name.
    The schema I am using to build my form can access the functions in sqlplus by specifying package.function.
    In my form I have:
    variable1 := package1.function1;
    variable2 := package2.function2;
    The first line compiles OK. The second comes up with function2 must be declared. If I prefix it with owner. it is OK.
    I cannot find any difference between the packages to explain this behaviour. Any ideas anyone please.

    Steve
    I had discussed it with someone else. He claimed afterwards that he had thought of that solution but it was so obvious he didn't like to insult me by suggesting it. I don't know if I believe him.
    Pavel
    Nice idea but we have too much code to retrospectively tidy up. Also with changes of personnel over the years we have such a mixture of different naming conventions that they are pretty meaningless. However, I do prefix my pll procedures with lib to give a clue where to look for them.

  • How to find the exact package that I need?

    How can I find the exact package that I need, for example, in Ubuntu, I can add launcher in System -> Preferences -> Main Menu, but in Arch, I can not find this Main Menu, I know I need to install something, but don't know where to go?

    Ghost1227 wrote:depends... where are you now?
    LOL
    pacman -Ss <package-name>
    would help you out. You can also put in part of the name and it will return all the matches. As for a GUI -- you don't get that by default in Arch.
    There is a GUI wrapper for pacman called shaman, but iirc, it uses kdelibs and integrates well with KDE. It looks like you are using Gnome, but you can use shaman in Gnome too.

  • Oracle Package Function

    hello,
    I have written a package function but I cannot call it from .net environment correctly.
    I want to ask you that is there anything wrong in the package:
    Specification Part:
    CREATE OR REPLACE PACKAGE SAGECM AS
    TYPE T_CURSOR IS REF CURSOR;
    FUNCTION COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2,
    num_of_req OUT NUMBER
    RETURN NUMBER;
    END SAGECM;
    Body Part:
    CREATE OR REPLACE PACKAGE BODY SAGECM AS
    FUNCTION COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2,
    num_of_req OUT NUMBER
    RETURN NUMBER
    IS
    BEGIN
    SELECT count(*) INTO num_of_req FROM SAGECM_REQ WHERE ID=p_ID AND Version=p_version;
    return num_of_req;
    END COUNTREQ;
    END SAGECM;

    is there anything wrong in the packageYes. You are attempting to RETURN an OUT parameter. This is bad. I suspect you don't understand the difference between a procedure and a function....
    CREATE OR REPLACE PACKAGE SAGECM AS
    TYPE T_CURSOR IS REF CURSOR;
    FUNCTION COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2
    RETURN NUMBER;
    PROCEDURE COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2,
    num_of_req OUT NUMBER
    END SAGECM;
    CREATE OR REPLACE PACKAGE BODY SAGECM AS
      FUNCTION COUNTREQ
          p_ID IN VARCHAR2,
          p_version IN VARCHAR2
        RETURN NUMBER
      IS
        return_value NUMBER;
      BEGIN
        SELECT count(*) INTO return_value
        FROM SAGECM_REQ
        WHERE ID=p_ID AND Version=p_version;
        RETURN return_value;
      END COUNTREQ;
      PROCEDURE COUNTREQ
          p_ID IN VARCHAR2,
          p_version IN VARCHAR2,
          num_of_req OUT NUMBER
        ) IS
      BEGIN
        num_of_req := COUNTREQ(p_ID,p_version);
      END COUNTREQ;
    END SAGECM;
    /Note: the above is for illutrative purposes only and is not intended as an example of good programming practice!
    Find out more in the docs!
    Cheers, APC

  • How to know the packages,functions,triggers owned by schema

    I got the script to find the tables,columns and indexes belonged to a schema
    how to find the packages,functions triggers owned by a schema.
    I need to compare schema of PROD with UAT
    Any help will be appreciated

    is it possible to find the source of all those
    objects in a single scriptWhat do you mean?
    user_source will give the script?Yes.
    You can get script more easily with DBMS_METADATA
    SQL> drop FUNCTION "HR"."F11";
    Function dropped.
    SQL> CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
    as
    v_date varchar2(1000);
    begin
    select to_char(sysdate,'mmddyyyy') into v_date from dual;
    return v_date;
    end;  2    3    4    5    6    7
      8  /
    Function created.
    SQL> set pagesize 0
    SQL> set long 90000
    SQL> select DBMS_METADATA.GET_DDL (
    'FUNCTION',
    object_name,
    'HR')
    FROM    all_objects
    WHERE owner = 'HR'
    AND object_type ='FUNCTION'  3    4    5    6    7
      8  /
      CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
    as
    v_date varchar2(1000);
    begin
    select to_char(sysdate,'mmddyyyy') into v_date from dual;
    return v_date;
    end;
    Is there any script to identify source for all those
    objects

  • Calling Package Function dynamically using Forms_DDL

    I am trying to write a validation trigger which will validate entries within a text field. It will call a packaged function based on an entry within the Rule form field. As the data within the text field will vary (sometimes numeric, date, text etc), the validation function will also vary accordingly. Example details are shown below (this example will force the entry of a Y or an N):
    FORM FIELDS
    ARG_DEFAULT1 X (This is the parameter to be submitted to the function)
    RULE1 VAL_CHK_0001 (Function to be called).
    FUNCTION CODE
    FUNCTION VAL_CHK_0001 (P1 VARCHAR2) RETURN NUMBER IS
    SQL_RESULT NUMBER;
    ALERT_ID ALERT;
    ALERT_OK NUMBER;
    BEGIN
    IF UPPER(P1) NOT IN ('Y', 'N') THEN
    :GLOBAL.MSG := 'You must enter either "Y" for Yes or "N" for No - please re-enter';
    SQL_RESULT := '1';
    ALERT_ID := FIND_ALERT('VAL_ERROR_ALT');
    SET_ALERT_PROPERTY(ALERT_ID, TITLE, 'Validation Error');
    SET_ALERT_PROPERTY(ALERT_ID, ALERT_MESSAGE_TEXT, :global.msg);
    ALERT_OK := SHOW_ALERT(ALERT_ID);
    RAISE FORM_TRIGGER_FAILURE;
    RETURN SQL_RESULT;
    ELSE
    SQL_RESULT := '0';
    RETURN SQL_RESULT;
    END IF;
    END VAL_CHK_0001;
    VALIDATION TRIGGER CODE (CURRENT)
    DECLARE
    PKG_RUN VARCHAR2(200);
    BEGIN
    IF :PARAMETER_BK.RULE1 IS NOT NULL THEN
    PKG_RUN := ENV_VALIDATE_PKG.VAL_CHK_0001(:PARAMETER_BK.ARG_DEFAULT1)):
    FORMS_DDL(PKG_RUN);
    END IF;
    END;
    When the Rule1 field data is hard coded in (as shown above), it all runs fine and the Alert box is displayed as expected.
    I need the function name to refer to the rule1 parameter (and not a specific value) as shown below:
    PKG_RUN := 'ENV_VALIDATE_PKG.'||:PARAMETER_BK.RULE1||'('||:PARAMETER_BK.ARG_DEFAULT1||')';
    The form compiles without any errors but when the trigger runs, it completely ignores the Forms_ddl call and does nothing.
    I have hunted through this forum, Metalink, Ask Tom etc and have had no success in finding any solution. I have followed the instructions within NOTE:1017160.6 (How to programmatically call a procedure or function using Oracle Forms) which has got me this far. Nothing that I have read so far has suggested that what I am attempting to do is impossible.
    We are using Oracle Forms 10G with an Oracle 9.0.4 database.
    Any suggestions or advice will be greatly received!
    Thanks

    Like the others have said, Forms_DDL is a one-way street. You can only pass values to it, nothing can be returned. But you could probably get Forms_DDL to work if you wrote your validations as stored procedures that had only IN parameters. Then if the edit ran ok, just terminate normally, but if there is an edit error, to a Raise_application_error.
    Then you could use Forms_DDL to call the procedure, and check for Form_Success after the call. If it failed, you might be able to retrieve the error message from the Raise_application_error by checking SQLERRM. But that is completely untested, so I do not know whether it would work.
    The more sure method would be to call a package procedure on the database that calls Execute_Immediate, and then returns the result back to the calling form.
    Now a little advice: For generic routines such as this, pass dates and numbers as text, and you could cut down on the number of procedures you need to create and use.
    And last note: Do NOT define numeric variables, like SQL_Result, and then set the value using quotes. You are forcing the PL/SQL process to convert text to number. Always set numeric values like this:
    SQL_Result := 1;
    Now the question I am almost afraid to ask: What problem are you solving by creating these generic edit routines? I am wondering if you could just as easily write simple edit processes faster. ...the only way to completely parameterize editing would be to call a process on the database for each column value, passing the column name and value.

Maybe you are looking for