Exception in thread "main" System.Reflection.ReflectionTypeLoadException

794 views
Skip to first unread message

Aruna

unread,
Aug 6, 2010, 4:10:21 AM8/6/10
to jni4net
Hi

I have written a java class from i am trying to load a c# project dll
using Bridge.LoadAndRegisterAssemblyFrom(asem..) and execute one of
the methods in c# class.I am getting the following error

Exception in thread "main"
System.Reflection.ReflectionTypeLoadException: Unable to load one or
more of the requested types. Retrieve the LoaderExceptions property
for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at net.sf.jni4net.utils.Registry.RegisterAssembly(Assembly
assembly, Boolean bindJVM)
at net.sf.jni4net.Bridge.RegisterAssembly(Assembly assembly)
at net.sf.jni4net.Bridge.LoadAndRegisterAssemblyFrom(File
assemblyFile)
at net.sf.jni4net.__Bridge.LoadAndRegisterAssemblyFrom3(IntPtr
__envp, JniLocalHandle __class, JniLocalHandle assemblyFile)
at net.sf.jni4net.Bridge.LoadAndRegisterAssemblyFrom(Native Method)
at Program1.main(Program1.java:48)

I am using .net framework 4.0
Can anyone help on this?

Pavel Šavara

unread,
Aug 8, 2010, 5:12:53 PM8/8/10
to jni...@googlegroups.com
I guess you start the application in directory which don't have all
DLLs(dependencies) in it.

> --
> You received this message because you are subscribed to jni...@googlegroups.com
> http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
> http://jni4net.sf.net/
>

Reply all
Reply to author
Forward
0 new messages