System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'ons.ONSClient4CPPPINVOKE' threw an exception.
Source=Aliyun.MQ
StackTrace:
at ons.ONSClient4CPPPINVOKE.new_ONSFactoryProperty()
at ons.ONSFactoryProperty..ctor() in C:\Users\admin\Desktop\aliyun.mq\Aliyun.MQ\SDK\ONSFactoryProperty.cs:line 52
at ons.onscsharp.Main(String[] args) in C:\Users\admin\Desktop\aliyun.mq\demo\ConsoleApp1\Program.cs:line 15
内部异常 1:
TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
内部异常 2:
DllNotFoundException: Unable to load DLL 'ONSClient4CPP': 找不到指定的模块。 (Exception from HRESULT: 0x8007007E)
.exe文件所在文件夹中有没有ONSClient4CPP.dll
这个文件?
没有 sdk 没这东西
@conan_lin: 这里有:https://github.com/antaintan/easyrocketmq/tree/master/Lib
加上去 之后
01/26/18 09:35:45:140.096 INFO 12736 - send message trace threadpool 4[..\src\producer\DefaultMQProducer.cpp:42]
01/26/18 09:35:45:140.096 INFO 12736 - NameServer was not been configured by arg or environment, then get nameServer from configured domain and WSADDR[..\src\ons-client\ProducerImpl.cpp:39]
01/26/18 09:35:45:140.096 INFO 12736 - fetchNSAddr with domain:http://onsaddr-internal.aliyun.com:8080/rocketmq/nsaddr4client-internal begin[..\src\common\TopAddressing.cpp:28]
01/26/18 09:35:45:140.096 INFO 12736 - protocol: http, port: 8080, host:onsaddr-internal.aliyun.com, path:/rocketmq/nsaddr4client-internal, [..\src\common\TopAddressing.cpp:37]
01/26/18 09:35:48:144.268 ERROR 12736 - socket connect failure, connect timeout or connect failure[..\src\common\sync_http_client.cpp:80]
01/26/18 09:35:48:144.268 ERROR 12736 - fetchNSAddr with domain failed, connect failure or wrnong response[..\src\common\TopAddressing.cpp:46]
01/26/18 09:35:48:144.268 INFO 12736 - fetchNSAddr with domain:http://onsaddr-internet.aliyun.com/rocketmq/nsaddr4client-internet begin[..\src\common\TopAddressing.cpp:28]
01/26/18 09:35:48:144.268 INFO 12736 - protocol: http, port: 80, host:onsaddr-internet.aliyun.com, path:/rocketmq/nsaddr4client-internet, [..\src\common\TopAddressing.cpp:37]