Re: Java converted to .NET with IKVM, works as stand alone application but not as MVC 4 web application (database connection)

Jeroen Frijters <[email protected]> Tue, 7 Apr 2015 12:19:32 +0000
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
Hi,

This really should be in the FAQ. It has nothing to do with MVC and everything with ASP.NET. In an ASP.NET application there is no main assembly so the IKVM class loader can't find your assembly when the code is trying to dynamically load a class. The fix is to register your assemblies explicitly by calling:

ikvm.runtime.Startup.addBootClassPathAssembly(Assembly.Load("YourDll"));

Regards,
Jeroen

> -----Original Message-----
> From: Allan Evans [mailto:[email protected]]
> Sent: Monday, April 6, 2015 21:11
> To: [email protected]
> Subject: [Ikvm-developers] Java converted to .NET with IKVM, works as
> stand alone application but not as MVC 4 web application (database
> connection)
> 
> Hi Everyone,
> 
> 
> 
> We have a Java product that does profiling (calculates statistics of a
> table) – the user provides a JDBC connection string and the product
> returns JSON reporting on various statistics about the data in the
> table. We’ve asked our development team to use IKVM to figure out a way
> of converting it to a DLL so that some of our .NET partners can use the
> product in their applications.
> 
> 
> 
> I’m a technical person, but not a developer so some of their issues are
> a bit beyond my expertise, but I gather they can get it working as a
> .NET application locally, but they aren’t able to get the database
> connections working from their MVC 4 web application.
> 
> 
> 
> In searching around the web it seems a few people have used IKVM for
> similar things, but I was just wondering our developers aren’t
> approaching it correctly or if MVC applications are not ever going to
> work with IKVM (or if a specific version of MVC has to be used).
> 
> 
> 
> Any advice would be appreciated …  I can post much more details
> information about the steps they’ve taken if this is appropriate.
> 
> 
> 
> Thanks
> 
> 
> 
> Allan
> 
> 
> 
> Allan Evans
> QFire Software Pty Ltd, Customer Care
> 
> e: [email protected] <mailto:[email protected]>
> | m: 0405 263 588
> 
> www.qfiresoftware.com <http://www.qfiresoftware.com>  | skype:
> allan.h.evans
> 
> 

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers