java 警告:跳过条目,因为它不是绝对 URI。NetBeans 中的 GlassFish

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25222861/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 07:37:07  来源:igfitidea点击:

WARNING: Skipping entry because it is not an absolute URI. GlassFish in NetBeans

javanetbeansglassfish

提问by Xerath

I successfully installed GlassFish. However, when I start a server, I get this two warning messages:

我成功安装了 GlassFish。但是,当我启动服务器时,会收到以下两条警告消息:

WARNING: Skipping entry because it is not an absolute URI.

警告:跳过条目,因为它不是绝对 URI。

What is that about ?

那是关于什么的?

Launching GlassFish on Felix platform
Aug 09, 2014 10:38:38 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Aug 09, 2014 10:38:38 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Aug 09, 2014 10:38:38 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@162cf6a in service registry.
Registry Info:: Total repositories: 1, Total modules = 293
...

采纳答案by unwichtich

You can safely ignore this warning.

您可以放心地忽略此警告。

It comes from com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner. This part of GlassFish installs/registers the GlassFish modules from the modulesfolder. It loops through a list of URIs, i.e. the file paths of the modules.

它来自com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner. GlassFish 的这一部分从modules文件夹安装/注册 GlassFish 模块。它循环遍历 URI 列表,即模块的文件路径。

If an URI is not absolute, i.e. it is relative or it has no scheme component, then this class logs this warning. In this case the URIs are not absolute because GlassFish probably uses the paths relative from the GlassFish root.

如果 URI 不是绝对的,即它是相对的或没有方案组件,则此类会记录此警告。在这种情况下,URI 不是绝对的,因为 GlassFish 可能使用相对于 GlassFish 根的路径。

回答by Jamie MacDonald

unwichtich is right that the warning can be ignored but you can also get rid of it.

unwichtich 是正确的,警告可以被忽略,但你也可以摆脱它。

To get rid of the warning edit the file <glassfish_home>/glassfish/config/osgi.propertiesand change the core.bundlesproperty from:

要消除警告,请编辑文件<glassfish_home>/glassfish/config/osgi.properties并将core.bundles属性更改为:

core.bundles=\
    ${com.sun.aas.installRootURI}modules/endorsed/ \
    ${obr.bundles} \
    ${hk2.bundles} \
    ${com.sun.aas.installRootURI}modules/glassfish.jar

to:

到:

core.bundles=\
    ${com.sun.aas.installRootURI}modules/endorsed/ \
    ${hk2.bundles} \
    ${com.sun.aas.installRootURI}modules/glassfish.jar

The warning is happening because BundleProvisioner reads a property in osgi.properties named glassfish.osgi.auto.startand it in turn references other properties like core.bundles.

发生警告是因为 BundleProvisioner 读取 osgi.properties 中名为glassfish.osgi.auto.start的属性,然后它又引用其他属性,如core.bundles

The property that was removed above, obr.bundles, is currently commented out. The comment is expanded to a space which BundleProvisioner reads and issues a warning about.

上面删除的属性obr.bundles目前已被注释掉。注释扩展到 BundleProvisioner 读取并发出警告的空间。