IIS Server - JVM Error in ASP IIS

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > December 2005 > JVM Error in ASP IIS





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author JVM Error in ASP IIS
kapil

2005-12-29, 6:04 pm

Hi everybody,
I am facing an error while running JNI COM object in ASP. I was
wondering if someone have the solution to the problem.
Thanks in advance.
The problem is...


Steps are:


1.Created one C++ Win32 dll to call a Java code Using JNI.
In that I am Creating JVM and Destroying the JVM.


to create the JVM Code-


JavaVMOption options[2];
options[0].optionString ="-Djava.class.path=" ";
options[1].optionString = buffer;
vm_args.version = JNI_VERSION_1_4;
vm_args.options = options;
vm_args.nOptions = 2;
vm_args.ignoreUnrecognized = 1;
JNI_CreateJavaVM (&jvm, (void**)&env,&vm_args);


For destroying it Code-


jvm->DestroyJavaVM();


2.Created 1 COM wrapper in VB to call the method of Win32 dll.
when using the COM Wrapper with .NET application its working fine.
But,when using the COM with ASP ,opening the page in Browser once it is

working fine,but next time when opening it says that JVM is not
created.
When restarting the IIS server it gives the right result.
To get the correct result everytime i need to restart the IIS server
and inetinfo preocess.
Can anybody tell me what is the problem and how to resolve it.


Thanks

mk

2005-12-30, 7:56 am

Hi,

this behaviour is quite strange, but I can reproduce it with an even
simpler example.
I have written a simple ISAPI extension dll in pure C using JNI to just
start and stop a VM each time a request get processed (to be sure that
the VM is terminated and restarted independent of ISAPI dll caching).

Actually this produces the same behaviour: Every second attempt fails,
even the VM termination succeeded and the jvm.dll got unloaded fine.

When I put the same code into an EXE and letting it run in a loop, it
works every time.

So the problems seems to be IIS related. Maybe there is a Java killer
inside of IIS... ?

Markus

P.S.: I'm using IIS 5.0 inside of W2K (latest SP + Rollup).

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com