You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/12/29 10:18:59 UTC

[GitHub] [servicecomb-java-chassis] mf1632015 opened a new issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

mf1632015 opened a new issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502
 
 
   JDK12 启动java-chassis-demo里面的所有的例子,无论是provider还是consumer都会报空指针异常,经过排查发现,下面的代码处,常量MODIFIERS_FIELD是null。我怀疑,JDK12的Field类已经不能获得它的成员变量了。我也试了下,Field.getDeclaredFields()返回的是一个空数组。
   ![image](https://user-images.githubusercontent.com/29472151/71555447-686a0c80-2a67-11ea-9551-ed8a323ae741.png)
   错误异常截图如下:
   ![image](https://user-images.githubusercontent.com/29472151/71555470-a9622100-2a67-11ea-8f58-b13b4d96fa34.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] WillemJiang commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
WillemJiang commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569565297
 
 
   JDK11 是一个长期支持版本。 https://www.oracle.com/technetwork/java/java-se-support-roadmap.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] mf1632015 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
mf1632015 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569492319
 
 
   图片上传失败了,报空指针异常的位置位于org.apache.servicecomb.foundation.common.utils.ReflectUtils#MODIFIERS_FIELD
   static {
       MODIFIERS_FIELD.setAccessible(true);
     }
   
   异常信息没有保存,就是上图的MODIFIERS_FIELD是空指针,如果从源代码看的话,就是JDK12的Field这个反射类没办法继续反射了。Field.class.getDeclaredFields()是个空数组

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-589460853
 
 
   JDK 12 为了安全性, 所有破坏对象封装性的的操作都是不允许的了。 目前 java-chassis 还有部分特性以及一些三方件还使用这些特性,无法运行于 JDK 12。 发布的 2.0.0 版本已经可以在 JDK 11运行, 目前  JDK 11 是 JAVA 的 TLS 版本,建议优先采用这个版本。 
   
   这个问题先关闭, 相关JDK 封装特性的修改已经创建  apache 任务, java-chassis 需要在后续版本支持 JDK 12及其以上版本。 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 closed issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
liubao68 closed issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-589460853
 
 
   JDK 12 为了安全性, 所有破坏对象封装性的的操作都是不允许的了。 目前 java-chassis 还有部分特性以及一些三方件还使用这些特性,无法运行于 JDK 12。 发布的 2.0.0 版本已经可以在 JDK 11运行, 目前  JDK 11 是 JAVA 的 TLS 版本,建议优先采用这个版本。 
   
   这个问题先关闭, 相关JDK 封装特性的修改已经创建  apache 任务, java-chassis 需要在后续版本支持 JDK 12及其以上版本。 
   
   BTW: 本 issue 涉及的问题 2.0.0 也已经修复,上面说的是理论情况。  但是没验证 JDK 12, 只验证了 JDK 11, JDK 12 限制比 JDK 11更加严格。 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] WillemJiang commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
WillemJiang commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569563677
 
 
   @liubao68  我觉得是时候考虑一下支持jdk11了。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569562800
 
 
   JDK9以上有很多不兼容特性。java-chassis暂时还没有针对以上版本进行适配和测试。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] zhfeng commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
zhfeng commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569563786
 
 
   https://stackoverflow.com/questions/56039341/get-declared-fields-of-java-lang-reflect-fields-in-jdk12

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] zhfeng commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
zhfeng commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569563855
 
 
   @WillemJiang jdk11 有LTS的版本吗?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] mf1632015 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。

Posted by GitBox <gi...@apache.org>.
mf1632015 commented on issue #1502: JDK12demo启动报错:NullPointerException,换回JDK8没问题。
URL: https://github.com/apache/servicecomb-java-chassis/issues/1502#issuecomment-569493055
 
 
   沟通了组内的大牛,他怀疑是java的默认安全级别提升了。不过jdk12已经被我卸载了,我有机会复现下看看。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services