Quantcast
Channel: Recent Discussions — Mixed Reality Developer Forum
Viewing all articles
Browse latest Browse all 10543

Connecting to local network ActiveMQ

$
0
0

Hello,

I am currently encountering problems when tryintg to connect my HoloLens application with ActiveMQ. Everything works fine when in the Unity Editor but when running through the HoloLens, it immediately crashes. Is there anything special on how I need to import external DLLs through Unity?

Here is how the problem happens :

`
using Apache.NMS;
using Apache.NMS.Util;
using Apache.NMS.ActiveMQ;

IConnectionFactory factory = new ConnectionFactory("tcp://192.168.X.X:61616"); `

Error message :
`'MixedRealityToolkit-Unity.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\MixedRealityToolkit-UnityVS.Debug_x86.holo\System.dll'. Module was built without symbols.
Exception thrown: 'System.TypeLoadException' in Apache.NMS.ActiveMQ.dll
'MixedRealityToolkit-Unity.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\MixedRealityToolkit-UnityVS.Debug_x86.holo\System.Diagnostics.StackTrace.dll'. Cannot find or open the PDB file.
at Apache.NMS.ActiveMQ.ConnectionFactory..ctor(Uri brokerUri, String clientID)
at Apache.NMS.ActiveMQ.ConnectionFactory..ctor(Uri brokerUri)
at ActiveMQManager.Start()

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Could not load type 'System.ICloneable' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)`

To get this far, I had to enable the "Do not process" checkbox in Unity, otherwise I got a Serialization Weaver error like this :

UnityException: Failed to run serialization weaver with command "Temp\StagingArea\Data\Managed\Apache.NMS.dll" "-pdb" "-verbose" "-unity-engine=Temp\StagingArea\Data\Managed\UnityEngine.dll" "Temp\StagingArea\TempSerializationWeaver" "-lock=UWP\project.lock.json" "-additionalAssemblyPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Facade" "-additionalAssemblyPath=C:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0" "-additionalAssemblyPath=C:\Program Files (x86)\Windows etc etc.

Here are my hypothesis :
1. I need some magic trick that is currently unknown to me if I want to use external DLLs in HoloLens.
2. HoloLens and Dlls(At least the Apache.NMS ones) were never meant to be together.

I also tried
[DllImport("Apache.NMS.ActiveMQ")] private static extern IConnectionFactory ConnectionFactory(Uri brokerUri);
Which also resulted in errors, with AssemblyConverter.exe this time.

Anyone got any luck with similar problems? Or other ways to make a Unity Hololens talk to ActiveMQ?


Viewing all articles
Browse latest Browse all 10543

Trending Articles