java 调用ctp异常 求助大神

weixin_40859398 2018-06-19 10:40:30
Connected to the target VM, address: '127.0.0.1:9408', transport: 'socket'
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.hraink.futures.ctp.thostmduserapi.CThostFtdcMdApi
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Failed to find a vtable for type org.hraink.futures.ctp.thostmduserapi.CThostFtdcMdApi
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.TimeT
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.TimeT$timeval_customizer
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.StructIO$DefaultCustomizer
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.TimeT$timeval
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.StructObject
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.NativeObject
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type org.bridj.AbstractIntegral
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Registering type java.lang.Number
Not enough args for CThostFtdcMdApi* CThostFtdcMdApi.CreateFtdcMdApi()
六月 19, 2018 10:38:19 下午 org.bridj.BridJ log
信息: Method public static native org.bridj.Pointer<org.hraink.futures.ctp.thostmduserapi.CThostFtdcMdApi> org.hraink.futures.ctp.thostmduserapi.CThostFtdcMdApi.CreateFtdcMdApi(org.bridj.Pointer<java.lang.Byte>,boolean,boolean) is not virtual but its address could not be resolved in the library.
六月 19, 2018 10:38:20 下午 org.bridj.BridJ log
信息: Registering type org.bridj.cpp.CPPObject

java.lang.UnsatisfiedLinkError: org.hraink.futures.ctp.thostmduserapi.CThostFtdcMdApi.CreateFtdcMdApi(Lorg/bridj/Pointer;ZZ)Lorg/bridj/Pointer;
at org.hraink.futures.ctp.thostmduserapi.CThostFtdcMdApi.CreateFtdcMdApi(Native Method)
at org.hraink.futures.jctp.md.JCTPMdApi.createFtdcTraderApi(JCTPMdApi.java:50)
at org.hraink.futures.jctp.md.JCTPMdApi.createFtdcTraderApi(JCTPMdApi.java:40)
at org.hraink.futures.ctp.md.TestMd.spiTest(TestMd.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)

Disconnected from the target VM, address: '127.0.0.1:9408', transport: 'socket'

Process finished with exit code -1
...全文
445 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
stacksoverflow 2018-06-20
  • 打赏
  • 举报
回复
参考 https://github.com/nativelibs4java/nativelibs4java/issues/52

50,639

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧