From: En Ye <ye....@gm...> - 2005-09-16 04:16:30
|
Peter, Thank you very much for your advice. After solving the "java.lang.UnsatisfiedLinkError" exception by adding native peer class, I reran the same program. Then I encountered a new exception as following: java.lang.NoSuchMethodException: java.io.File.list() =09at sun.misc.Launcher$ExtClassLoader.getExtURLs(sun\misc\Launcher.java:16= 1) =09at sun.misc.Launcher$ExtClassLoader.<init>(sun\misc\Launcher.java:137) =09at sun.misc.Launcher$1.run(sun\misc\Launcher.java:121) =09at java.security.AccessController.doPrivileged(java\security\AccessContr= oller.java:53) =09at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(sun\misc\Launcher.= java:118) =09at sun.misc.Launcher.<init>(sun\misc\Launcher.java:51) =09at sun.misc.Launcher.<clinit>(sun\misc\Launcher.java:39) =09at java.security.Security.getEngineClassName(java\security\Security.java= :529) =09at java.security.Security.getEngineClassName(java\security\Security.java= :595) =09at java.security.Security.getImpl(java\security\Security.java:1044) =09at java.security.KeyPairGenerator.getInstance(java\security\KeyPairGener= ator.java:146) =09at DHKeyAgreement3.run(DHKeyAgreement3.java:54) =09at DHKeyAgreement3.main(DHKeyAgreement3.java:38). I know the exception was thown because the File model class in the "javapathfinder\env\jpf\java\io" doesn't provide "list" function while the original File class does. So could you kindly tell me how can I solve this problem? It is seemly impossible to only add a stubbed "list" function to the File model class since the "list" function needs to return a String array. If I just delete the File model class, what will it affect the JavaPathFinder? Thanks in advance for your help. En On 9/6/05, Peter C. Mehlitz <pcm...@em...> wrote: > En, >=20 > Yes, you are right - ObjectStream native methods are not supported > yet. It's probably better to intercept the BigInteger.<clinit> in a > native peer (like StringBuffer does too) than to fiddle directly with > the ObjectStreamClass, since I assume it really needs the native > methods. We don't support serialization yet, anyways. >=20 > -- Peter >=20 > On Sep 4, 2005, at 9:01 PM, En Ye wrote: >=20 > > Hi all, > > > > When I used JavaPathFinder to verify a Java Class DHKeyAgreement3 > > (source code is attached at the end). I encountered an exception > > listed below: > > > > java.lang.UnsatisfiedLinkError: > > java.io.ObjectStreamClass.initNative (no peer) > > at java.io.ObjectStreamClass.<clinit>(java\io > > \ObjectStreamClass.java:133) > > at java.io.ObjectStreamField.<init>(java\io > > \ObjectStreamField.java:71) > > at java.io.ObjectStreamField.<init>(java\io > > \ObjectStreamField.java:45) > > at java.math.BigInteger.<clinit>(java\math\BigInteger.java:3008) > > at DHKeyAgreement3.<clinit>(DHKeyAgreement3.java:204) > > at DHKeyAgreement3.main(DHKeyAgreement3.java:37) > > .. > > I guess the exception was thrown because the JPF cannot find an > > appropriate native peer class for java.io.ObjectStreamClass (JPF don't > > provide this native peer class). If it is right, can I create a native > > peer class for it to eliminate the exception? And if I can, can I do > > it as the following: > > (1) create a MJI model class for java.io.ObjectStreamClass and put it > > in the env\jpf folder > > (2) use "GenPeer" to generate a native peer class for > > java.io.ObjectStreamClass and put in the env\jvm folder > > ? Or it there any other solution? Is there any related documentation > > on it? Thanks in advance for your help. > |