java.lang.UnsatisfiedLinkError: assertPermission Problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: java.lang.UnsatisfiedLinkError: assertPermission Problem

  1. #1
    Join Date
    Feb 2006
    Posts
    1

    Thumbs up java.lang.UnsatisfiedLinkError: assertPermission Problem

    hi
    i hav stuck up into this exception canu do smthng 4 this
    'i am importing these packages
    -----------------------------------------------------------------------

    mport com.ms.security.PermissionID;
    import com.ms.security.PolicyEngine;
    .....
    ......
    ........

    i have got the path for those packages
    now the problem is in these lines(which are in between the code of my applet)...

    .....
    ...........
    if(Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    ............
    .....
    .......
    when i run my applet in appletviewer i get following exceptions

    java.lang.UnsatisfiedLinkError: assertPermission
    at com.ms.security.PolicyEngine.assertPermission(Native Method)
    at bocazas.init(bocazas.java:7164)
    at sun.applet.AppletPanel.run(AppletPanel.java:354)
    at java.lang.Thread.run(Thread.java:534)


    can u help me???

    -ashish

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    255
    Quote Originally Posted by ashishrathore
    java.lang.UnsatisfiedLinkError: assertPermission
    at com.ms.security.PolicyEngine.assertPermission(Native Method)
    at bocazas.init(bocazas.java:7164)
    at sun.applet.AppletPanel.run(AppletPanel.java:354)
    at java.lang.Thread.run(Thread.java:534)
    You should have checked the Java API for this. An UnsatisfiedLinkError is thrown if the JVM is unable to find a native library for a method declared as native
    Happiness is good health and a bad memory.

  3. #3
    Join Date
    Mar 2006
    Posts
    2

    same

    I hav the same problem. Can you explain a bit more about the solution ?

  4. #4
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    62
    At a certain level in the jvm, all methods connect to the OS through native methods (methods probably written in C/C++) The JVM maintains a path to all the native libraries which contain the native methods. (e.g. look in <JavaInstallDir>/jre/lib/i386). When Java code is compiled and it uses native methods, the JVM will search for the native method in all the native libraries it finds in the path it maintains. If it cannot find the required method, an UnsatisfiedLinkError occurs.

    Hope this helps,
    Noel
    Efficiency is intelligent laziness

  5. #5
    Join Date
    Mar 2006
    Posts
    2

    same

    Hello neolob,

    Ok I understand it is related with Native libraries after all.
    Event I copy relates dlls (OCFPCSC1.DLL, winscard.dll) to all windows and jre\bin directories and copy related jars (pcsc-wrapper-2.0.jar, base-opt.jar and base-core.jar) to all the JREs lib/ext directories.

    My smartcardloginapplet.class runs in MSIE default jre, but not with sun java jre and always gives the following error.

    The problem might be something different.


    java.lang.UnsatisfiedLinkError: assertPermission
    at com.ms.security.PolicyEngine.assertPermission(Native Method)
    at opencard.opt.ms.MicrosoftSystemAccess.<init> (MicrosoftSystemAccess.java:33)
    at SmartLoginApplet.init(SmartLoginApplet.java:50)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


    and the jvm.cfg files have :

    -client KNOWN
    -server KNOWN
    -hotspot ALIASED_TO -client
    -classic WARN
    -native ERROR
    -green ERROR



    --
    Hakan

Similar Threads

  1. Problem with Search
    By Irina in forum ASP.NET
    Replies: 0
    Last Post: 11-29-2002, 10:47 PM
  2. Replies: 0
    Last Post: 12-13-2001, 12:06 PM
  3. a problem with font and language
    By Roseta in forum VB Classic
    Replies: 0
    Last Post: 11-14-2001, 03:24 AM
  4. Arabic problem view
    By Ayman in forum VB Classic
    Replies: 0
    Last Post: 04-03-2000, 01:08 AM
  5. Problem with CryptoAPI and JCE
    By Jason Bock in forum VB Classic
    Replies: 0
    Last Post: 03-21-2000, 06:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center