java.lang.UnsatisfiedLinkErrorplease help me its very urgent

Hi all,

In my application i am trying write errrors in to windows application log. so i created a simple java standalone application to simulate that . Its runs fine by using java command .

After that i integrated that to my application .there i am getting error

java.lang.UnsatisfiedLinkError: InitializeApplicationLog

it shows that it successfully loaded the dll file. and while running methods it giving error.

please help me to solve this issue

Its very urgent. I am struggling from 3 days.

-

1) I copied WindowsEventWrapper.dll (already exist) in to C:\/WindowsAppLogDLL folder

2) created one java wrapper class with the name WindowsEventWrapper.java

publicclass WindowsEventWrapper

{

publicnativelong InitializeApplicationLog(String applicationName, String resourceFilename)

throws java.lang.RuntimeException, java.lang.IllegalArgumentException, java.lang.OutOfMemoryError;

publicnativevoid LogApplicationEvent(long logHandle, String applicationEvent,

int eventIdentifier,int eventLevel)

throws java.lang.RuntimeException, java.lang.IllegalArgumentException, java.lang.OutOfMemoryError;

}

3) this is the code to call to native metods

WindowsEventWrapper winWrapper =null;

try

{

System.load("C:/WindowsAppLogDLL/WindowsEventWrapper.dll");

System.out.println("dll loaded");

}

catch (Error ee)

{

System.out.println("Error"+ee);

System.out.println("Loading _wrapperDLLName dll failed, check PATH");

}

if(winWrapper==null)

{

System.out.println("WINwRAPPER was NULL and now object created");

winWrapper =new WindowsEventWrapper();

}

try

{

moduleKey = winWrapper.InitializeApplicationLog("CEMTestLog","C:\\MyTrials\\MyMessages.dll" );

winWrapper.LogApplicationEvent(moduleKey,"Sample error message",32354, 0);

}

catch ( UnsatisfiedLinkError e1 )

{

[3190 byte] By [javashivua] at [2007-11-27 2:03:36]
# 1
> After that i integrated that to my application If the signature changed, including the package, then you should run jnih again.
jschella at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Please don't hesitate to answer: what is jnih? Should it be javah?BTW why do I waste my time to correct your errors?:)
Michael.Nazarov@sun.coma at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
I am new to this JNI. can u please help me how to use jnih and run
javashivua at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4
> Please don't hesitate to answer: what is jnih? Should> it be javah?You are correct.> > BTW why do I waste my time to correct your errors?Because unlike you I admit my errors and understand when I am wrong.
jschella at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
> I am new to this JNI. can u please help me how to use> jnih and runAs noted it should be javah.You did run that already once correct?
jschella at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 6
This error was just a typo so it's easy to understand. In other side there are many more difficult situation so even experienced person unable to understand without some amount of time. And if this person just don't want to do so then error or lack of knowledge became useless flame.
Michael.Nazarov@sun.coma at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 7

> This error was just a typo so it's easy to

> understand. In other side there are many more

> difficult situation so even experienced person unable

> to understand without some amount of time. And if

> this person just don't want to do so then error or

> lack of knowledge became useless flame.

And now you are just extending your petty tirades into another thread.

jschella at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 8
I'm just keeping my behavior while you keeping your.
Michael.Nazarov@sun.coma at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 9
> I'm just keeping my behavior while you keeping your.Mine are based on facts. Yours on emotion. I updated the other thread pointing out your errors of fact.
jschella at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 10
Hi all, My error got resolved. In cpp file there was mismatch of method type signature. I corrected that and rebuilt dll. Now its working fine.Thanks a lot -Shiv
javashivua at 2007-7-12 1:46:08 > top of Java-index,Java HotSpot Virtual Machine,Specifications...