Professional Web Applications Themes

Empty java.library.path in linux stored procedure - IBM DB2

Hello I'd like to load a native library in my linux java stored procedure using System.loadLibrary("mylib"); But the JVM didn't find the library while searching in java.library.path, because this property is empty at runtime. I tried creating a symlink to my lib in /usr/lib, but it didn't help either. Is there a way I can specify java.library.path? I didn't find a way to specify arguments which would then be passed to the JVM by DB2 (e.g. -Djava.library.path=libpath would solve my problem) Thanks for your help...

  1. #1

    Default Empty java.library.path in linux stored procedure

    Hello

    I'd like to load a native library in my linux java stored procedure
    using
    System.loadLibrary("mylib");
    But the JVM didn't find the library while searching in
    java.library.path, because this property is empty at runtime.

    I tried creating a symlink to my lib in /usr/lib, but it didn't help
    either.

    Is there a way I can specify java.library.path?
    I didn't find a way to specify arguments which would then be passed to
    the JVM by DB2
    (e.g. -Djava.library.path=libpath would solve my problem)

    Thanks for your help
    Almund Sebi Guest

  2. #2

    Default Re: Empty java.library.path in linux stored procedure

    JNI calls from java sps are not supported. You can work around this by
    making the call to your function a cataloged C stored procedure.

    Almund Sebi wrote:
    > Hello
    >
    > I'd like to load a native library in my linux java stored procedure
    > using
    > System.loadLibrary("mylib");
    > But the JVM didn't find the library while searching in
    > java.library.path, because this property is empty at runtime.
    >
    > I tried creating a symlink to my lib in /usr/lib, but it didn't help
    > either.
    >
    > Is there a way I can specify java.library.path?
    > I didn't find a way to specify arguments which would then be passed to
    > the JVM by DB2
    > (e.g. -Djava.library.path=libpath would solve my problem)
    >
    > Thanks for your help
    Sean McKeough Guest

  3. #3

    Default Re: Empty java.library.path in linux stored procedure

    There may be a way using DB2ENVLIST (db2set).
    Just a guess.

    PM

    "Almund Sebi" <nyookgmx.net> a écrit dans le message de news:
    [email]947ecaa1.0308120400.16197409posting.google.com[/email]...
    > Hello
    >
    > I'd like to load a native library in my linux java stored procedure
    > using
    > System.loadLibrary("mylib");
    > But the JVM didn't find the library while searching in
    > java.library.path, because this property is empty at runtime.
    >
    > I tried creating a symlink to my lib in /usr/lib, but it didn't help
    > either.
    >
    > Is there a way I can specify java.library.path?
    > I didn't find a way to specify arguments which would then be passed to
    > the JVM by DB2
    > (e.g. -Djava.library.path=libpath would solve my problem)
    >
    > Thanks for your help

    PM \(pm3iinc-nospam\) Guest

  4. #4

    Default Re: Empty java.library.path in linux stored procedure

    Thank you.

    I solved the .loadlibrary problem by unfencing the stored procedure.
    Almund Sebi Guest

  5. #5

    Default Re: Empty java.library.path in linux stored procedure

    Quote Originally Posted by Almund Sebi View Post
    Thank you.

    I solved the .loadlibrary problem by unfencing the stored procedure.
    How did you solve thsi problem? I'm getting the same error.
    Unregistered Guest

  6. #6

    Question Re: Empty java.library.path in linux stored procedure

    Hi
    can u pls elaborate how to solve this prob ???

    Pls share info .........
    Unregistered Guest

Similar Threads

  1. Replies: 0
    Last Post: August 8th, 11:18 AM
  2. System.out.println from java stored procedure
    By efiryago@profitlogic.com in forum IBM DB2
    Replies: 0
    Last Post: August 5th, 06:56 PM
  3. Replies: 0
    Last Post: August 2nd, 08:07 PM
  4. Java stored procedure
    By Tim Engler in forum IBM DB2
    Replies: 2
    Last Post: July 10th, 03:01 PM
  5. Replies: 0
    Last Post: January 8th, 06:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139