并非所有请求的模块都可以启用- org-netbeans-modules-nbjavac.jar

deikduxw  于 2022-11-10  发布在  Java
关注(0)|答案(4)|浏览(119)

While working with NetBeans I have an error:
Not all requested modules can be enabled: [StandardModule:org.netbeans.modules.nbjavac jarFile: C:\Users...\AppData\Roaming\NetBeans\11.2\modules\org-netbeans-modules-nbjavac.jar]
I believe it's connected to my problem with NetBeans hints for Java not being showed.
The file exists in C:\Users\...\AppData\Roaming\NetBeans\11.2\modules\org-netbeans-modules-nbjavac.jar .
It's the only module noted as missed.
I am aware of popular problem will multiple modules noted as not possible to be enabled due to wrong JDK path. My path to JDK seems to be about right:

netbeans_jdkhome="D:\Program Files\Java\jdk1.8.0_231"

If I comment it out (as suggested in some solutions), than hints are working but project does not start because of multiple errors on TomEE (which works perfectly fine with the JDK uncommented):
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.openejb.loader.TomcatClassPath$3 (file:/D:/Programming/apache-tomee-webprofile-7.0.2/lib/openejb-loader-7.0.2.jar) to method java.net.URLClassLoader.addURL(java.net.URL) WARNING: Please consider reporting this to the maintainers of org.apache.openejb.loader.TomcatClassPath$3 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 06-Jan-2020 06:24:23.213 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator' 06-Jan-2020 06:24:23.230 SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Catalina.start org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[8005]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112) at org.apache.catalina.startup.Catalina.load(Catalina.java:606) at org.apache.catalina.startup.Catalina.load(Catalina.java:629) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
06-Jan-2020 06:24:23.231 WARNING [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Calling stop() on failed component [StandardServer[8005]] to trigger clean-up did not complete. org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[8005]] at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:238) at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:264) at org.apache.catalina.startup.Catalina.start(Catalina.java:659) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495) Caused by: org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_stop]) for component [StandardService[Catalina]] in state [INITIALIZED] at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:213) at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:812) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226) ... 8 more
Is there a way to use my JDK and use hints?

t2a7ltrp

t2a7ltrp1#

我通过在NetBeans(11.3)中重新安装nb-javac插件(2.0)解决了完全相同的问题
1.打开NetBeans
1.转到工具〉插件〉已安装
1.启用复选框**“显示详细信息”**
1.搜索javac以查找行**“nb-javac Java编辑支持库”**
1.选择并卸载
1.重新启动NetBeans

  1. NetBeans建议在信息框中安装nb-javac。只需单击链接并按照说明进行操作即可

针对NetBeans 12.1和NetBeans 12.2的更新这解决了错误消息“无法启用nb-javac插件”的问题

yiytaume

yiytaume2#

在我的例子中,当我尝试安装Hibernate库并在NetBeans中激活它时,错误发生了,我所做的是:
1.转到:http://plugins.netbeans.org/plugin/73454/nb-javac-library并下载与NetBeans版本对应的插件
1.解压缩归档文件,然后转到NetBeans:工具-〉插件-〉下载(选项卡)-〉添加插件,然后选择您刚刚解压缩的.nbm文件
1.卸载尝试安装的插件,重新启动NetBeans,然后重新安装尝试安装的插件

hec6srdp

hec6srdp3#

因此,我解决了同样的问题,首先去C:\Users...\AppData\Roaming\NetBeans\11.2\modules文件夹,并删除org-netbeans-modules-nbjavac.jar
之后,我重新启动了Netbeans IDE。请转到:
Windows -〉IDE工具-〉通知
以打开通知窗口,然后单击***“建议安装nb-javac库以改善Java编辑体验并启用保存时编译”***以重新安装nb-javac库。
之后重新开始为我工作。

qzlgjiam

qzlgjiam4#

在我的例子IDE 12.1中,我重新激活了nb-Javac JAVA编辑支持库。这不是从文件〉新项目,而是从主页激活功能。然后我点击了IDE日志。.,,,,.它工作了..,,..

相关问题