【发布时间】:2021-09-28 02:36:22
【问题描述】:
我们有一个 ASP.Net Web 表单应用程序,它使用 JNBridge Pro 使用 Java 库项目,这在本地运行得非常好。 该公司已决定采用 Azure 并将大部分 Web 应用程序迁移到 Azure Web Apps,这是一个很好的举措。 但是,当尝试迁移这个使用 JNBridge 的项目时,到目前为止我还没有成功配置 JNBridge 库。 我尝试了各种方法,但最终出现以下错误
*System.TypeInitializationException: The type initializer for 'com.jnbridge.jnbcore.ObjectWrapper' threw an exception. ---> System.TypeInitializationException: The type initializer for 'com.jnbridge.jnbcore.ObjectHelper' threw an exception. ---> System.TypeInitializationException: The type initializer for 'com.jnbridge.jnbproxy.JavaSides' threw an exception. ---> System.UnauthorizedAccessException: No such interface supported
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementObjectSearcher.Initialize()
at System.Management.ManagementObjectSearcher.Get()
at com.jnbridge.jnbproxy.proxym.RLMProductionLicenseManager.isHyperVHost()
at com.jnbridge.jnbproxy.proxym.RLMProductionLicenseManager.isOnVM()
at com.jnbridge.jnbproxy.proxym.RLMProductionLicenseManager.initializeAndLoadLicense(String licenseLocation)
at com.jnbridge.jnbproxy.proxym.RLMProductionLicenseManager.loadLicense()
at com.jnbridge.jnbproxy.proxym.ProxyMFactory.getInstance(String lmType)
at com.jnbridge.jnbproxy.JavaSides..cctor()
--- End of inner exception stack trace ---
at com.jnbridge.jnbproxy.JavaSides.getInitialEntry()
at com.jnbridge.jnbcore.ObjectHelper..cctor()
--- End of inner exception stack trace ---
at com.jnbridge.jnbcore.ObjectWrapper..cctor()
--- End of inner exception stack trace ---
at com.jnbridge.jnbcore.ObjectWrapper..ctor()
at java.lang.Object..ctor()
at com.xantura.api.admin.EventMonitor..ctor()*
我是 Azure Web App 的新手,所以我猜我一定是在做一些傻事,我检查了 dotNetToJavaConfig 部分以及与该部分关联的所有路径,它们看起来都不错。
任何帮助将不胜感激。
非常感谢
【问题讨论】: