Re: using ikvm within the context of a dll: java.lang.ClassCastException: Unable to cast object of type 'java.util.PropertyResourceBundle' to type 'sun.util.resources.OpenListResourceBundle'.

Jeroen Frijters <[email protected]> Sat, 30 Apr 2016 05:29:35 +0000
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
Hi Oliver,

I’m not entirely certain, but I think you misunderstand how .NET assembly loading works. It’s not a class loader issue. The IKVM boot class loader knows about all IKVM.OpenJDK.* assemblies.

I did file an OpenJDK bug for this, because it is not a supported scenario (neither for OpenJDK, nor for IKVM). In OpenJDK 9 the class library will be modularized and things will hopefully get a little better.

Regards,
Jeroen

From: Oliver Egger [mailto:[email protected]]
Sent: Friday, April 29, 2016 18:35
To: Jeroen Frijters <[email protected]>; [email protected]
Cc: ehc-implementors <[email protected]>
Subject: Re: [Ikvm-developers] using ikvm within the context of a dll: java.lang.ClassCastException: Unable to cast object of type 'java.util.PropertyResourceBundle' to type 'sun.util.resources.OpenListResourceBundle'.

Hi Jeroen

Thanks for your quick answer.

Is this a classpath loader issue that the classes are not visible from the dependent dll's?
Is the bug already raised in OpenJDK and might it be that it get resolved in a future release?

Best regards
Oliver

On 29 April 2016 at 15:55, Jeroen Frijters <[email protected]<mailto:[email protected]>> wrote:
Hi Oliver,

No, all IKVM.OpenJDK.*.dll assemblies must be in the application’s bin directory.

The exception is caused by a bug in OpenJDK that is triggered when it can’t load a required class.

Regards,
Jeroen

From: Oliver Egger [mailto:[email protected]<mailto:[email protected]>]
Sent: Friday, April 29, 2016 15:23
To: [email protected]<mailto:[email protected]>
Subject: [Ikvm-developers] using ikvm within the context of a dll: java.lang.ClassCastException: Unable to cast object of type 'java.util.PropertyResourceBundle' to type 'sun.util.resources.OpenListResourceBundle'.

hi

first thanks for that cool product, we are using it with ehealthconnector project to provide a .net api, see https://sourceforge.net/projects/ehealthconnector/

but I have a slight problem ...

- i have a jar (ehc.jar) converted to a dll with ikvmc (ehc.dll)

- when i use the dll within a visual studio .net project and create an executable (ehcdemo.exe) with references to ehc.dll and IKVM.OpenJDK.*.dll the program runs through
      ehcdemo.exe
           |---------ehc.dll
           |---------IKVM.OpenJDK.*.dll

- when i try to create a dll instead of the ehcdemo.exe and use that dll (ehcdemo.dll) in my app.exe program i get a java.lang.ClassCastException: Unable to cast object of type 'java.util.PropertyResourceBundle' to  type 'sun.util.resources.OpenListResourceBundle'.

      app.exe
           |---------ehcdemo.dll
                           |---------ehc.dll
                           |---------IKVM.OpenJDK.*.dll

I can fix above exception if i add all IKVM.OpenJDK.*.dll references directly to my app

      app.exe
         |---------IKVM.OpenJDK.*.dll
         |---------ehcdemo.dll
                           |---------ehc.dll
                           |---------IKVM.OpenJDK.*.dll

however I would like that app.exe has no references directly to the IKVM.OpenJDK.*.dll.

Is that possible? If you would have any pointers where to start looking for a solution I would appreciate it very much! I'm not that much a .NET Person so please excuse me if my question is out of topic for ikvm.

Best regards
Oliver

--
oliver egger

mobile: +41765795005
email: [email protected]<mailto:[email protected]>
twitter: @oliveregger<https://twitter.com/oliveregger>
http://www.ahdis.ch/

ahdis gmbh
agile health data information systems
bertastrasse 4
8003 zürich
switzerland



--
oliver egger

mobile: +41765795005
email: [email protected]<mailto:[email protected]>
twitter: @oliveregger<https://twitter.com/oliveregger>
http://www.ahdis.ch/

ahdis gmbh
agile health data information systems
bertastrasse 4
8003 zürich
switzerland



--
oliver egger

mobile: +41765795005
email: [email protected]<mailto:[email protected]>
twitter: @oliveregger<https://twitter.com/oliveregger>
http://www.ahdis.ch/

ahdis gmbh
agile health data information systems
bertastrasse 4
8003 zürich
switzerland

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers