Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

接入nacos后rpc调用找不到接口的bug #76

Closed
lijiancn01 opened this issue Oct 29, 2020 · 1 comment
Closed

接入nacos后rpc调用找不到接口的bug #76

lijiancn01 opened this issue Oct 29, 2020 · 1 comment

Comments

@lijiancn01
Copy link

nacos调用时id每次都重新生成,跟nacos配置的接口id匹配不上啊。
每次都报java.lang.NullPointerException: API is not published.
@Override public String generateId(EntityDef objectType, String apiPath) { String generateId = null; if (this.enableHistory && EntityDef.RELEASE == objectType) { generateId = DatawayUtils.generateID(); } else { try { MessageDigest mdTemp = MessageDigest.getInstance("SHA1"); mdTemp.update(apiPath.getBytes()); byte[] digest = mdTemp.digest(); generateId = new BigInteger(digest).toString(24); } catch (NoSuchAlgorithmException e) { throw ExceptionUtils.toRuntimeException(e); } } return ((EntityDef.INFO == objectType) ? "i_" : "r_") + generateId.toLowerCase(); }

临时解决方案:配置HASOR_DATAQL_DATAWAY_NACOSDAL_HISTORY=false 可以暂时解决。

@zycgit
Copy link
Collaborator

zycgit commented Dec 31, 2020

已知的一个 Bug , 4.2.2 中重写了 nacos 作为存储的那部分逻辑。之前的是在是有点复杂容易出错。

新的逻辑和老的逻辑目前是不兼容的,主要是体现在 保存在 nacos 中 api 索引信息的结构。 api 自身数据结构没有改变。

@zycgit zycgit closed this as completed Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants