strange Error 1006: %function_name% is not a function

瘦欲@ 提交于 2019-12-13 03:20:33

问题


I encounter the following error:

Error 1006: %function_name% is not a function

We have 2 util classes in out project named as ArrayUtils. All functions in them are public static. Another developer added function %function_name% to one of ArrayUtils. I use this method in my code. I recompiled whole application. It compiles OK and IDE (IntelliJ IDEA) detects this method normally (imports are correct). But at runtime I got mentioned above error. The most strange thing is that this code works as it should on other developer's machine.

P.S. Browser cache, IntelliJ IDEA cache and maven (we use is as build tool) local repository were cleared, nothing helped.


回答1:


There are 2 reasons of this error:

  1. you have ArrayUtils class in another precompiled library and you have access to ArrayUtils via linkage and you trying to link library with old version of class.
  2. you have another library, that now contains dependency of that ArrayUtils and your linkage was replaced by that. So, in result you have 2 ArrayUtils in your project scope. Try to find it and remove one.


来源:https://stackoverflow.com/questions/12616770/strange-error-1006-function-name-is-not-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!