Java (Apache Tomcat) + COM objects

0

I have a third party application which is running on Apache Tomcat on Windows. That application is using dll library which is using COM objects (with CoCreateInstance..). Library and COM objects are compiled in visual c++ 2010.
Everything works fine on Java 5, but on Java 6 and above Java crashes with EXCEPTION_ACCESS_VIOLATION (0xc0000005).
Part of library where it crashes looks like:

try{
  ...
  if (COMobject == NULL)  {throw ...} // if Comobject is null throw proper exception
  ...
  hr = COMobject->Method   //this is where program is crashing
  ...
}
catch ..

code is checking if COMobject is null then invoking method from that object and whole part is in try.. catch, but this c++ catch is not triggered - instead whole java is getting crash.
This applies to different methods of that object, method can be invoked sometimes couple times, but sometimes only once before it crashes.
Can someone help me with this issue ?

java
tomcat
com
asked on Stack Overflow Mar 12, 2020 by Paweł Kozieł

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0