这个glassfish警告的含义:上下文路径与bundle不同 [英] meaning of this glassfish warning: context path differs from bundle

查看:401
本文介绍了这个glassfish警告的含义:上下文路径与bundle不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  INFO:访问未访问引用
INFO:访问未访问引用
INFO :访问未访问引用
INFO:访问未访问引用
INFO:访问未访问引用
INFO:EJB5181:EJB的可移植JNDI名称Hello:[java:global / SalutationApp / SalutationApp-ejb / Hello,信息:在[SalutationApp-war]中加载应用程序[SalutationApp#SalutationApp-war.war]
信息:SalutationApp已成功部署在976毫秒。
警告:来自ServletContext的上下文路径:/ SalutationApp-war与bundle的路径不同:SalutationApp-war
INFO:myRemoteMethod ..

据我所知,似乎没有application.xml文件...已被弃用?

  thufir @ dur:〜/ NetBeansProjects / SalutationApp / dist $ 
thufir @ dur:〜/ NetBeansProjects / SalutationApp / dist $ ll
total 16
drwxrwxr-x 2 thufir thufir 4096 Sep 9 01:42 ./
drwxrwxr-x 8 thufir thufir 4096 Sep 9 01:42 ../
-rw-rw-r-- 1 Thufir Thufir 7139 Sep 9 01:42 SalutationApp.ear
thufir @dur:〜/ NetBeansProjects / SalutationApp / dist $
thufir @dur:〜/ NetBeansProjects / SalutationApp / dist $ jar -xf SalutationApp.ear
thufir @ dur:〜/ NetBeansProjects / SalutationApp / dist $
thufir @dur:〜/ NetBeansProjects / SalutationApp / dist $ ll
共32
drwxrwxr-x 3 thufir thufir 4096 Sep 9 01:42 ./
drwxrwxr-x 8 thufir thufir 4096 Sep 9 01:42 ../
drwxrwxr-x 2 thufir thufir 4096 Sep 9 01:42 META-INF /
-rw-rw-r-- 1 thufir thufir 7139 Sep 9 01:42 SalutationApp.ear
-rw-rw-r-- 1 thufir thufir 1908 Sep 9 01:42 SalutationApp-ejb.jar
-rw-rw-r-- 1 thufir thufir 4652 Sep 9 01:42 SalutationApp-war.war
thufir @dur:〜/ NetBeansProjects / SalutationApp / dist $
thufir @ dur:〜/ NetBeansProjects / SalutationApp / dist $ ll META-INF /
total 12
drwxrwxr-x 2 thufir thufir 4096 Sep 9 01:42 ./
drwxrwxr-x 3 thufir thufir 4096 Sep 9 01:42 ../
-rw-rw-r-- 1 thufir thufir 103 Sep 9 01:42 MANIFEST.MF
thufir @ dur: 〜/ NetBeansProjects / SalutationApp / dist $
thufir @ dur:〜/ NetBeansProjects / SalutationApp / dist $ cat META-INF / MANIFEST.MF
Manifest-Version:1.0
Ant-Version:Apache Ant 1.9.2
创建者:1.7.0_51-b31(Oracle Corporation)

thufir @dur:〜/ NetBeansProjects / SalutationApp / dist $



$ b


$ b


是应用程序-ejb.jar fil e在$ b $中的application.xml文件中列出ear文件的META-INF目录? Application-ejb.jar是ear文件的
根目录吗? - Sam Nunnally 13年11月24日在4:03


设置企业应用程序



这让我想知道我的应用程序的结构。目前,应用程序以期望的输出运行 - 一个调用EJB的servlet。



这个错误指示了什么?



另见:

https://netbeans.org/bugzilla/show_bug.cgi?id=232326

解决方案

只是一个警告,你可以忽略它,如果你想。

警告是因为您的context-root中可能有一个前导斜杠(即 / ), code> glassfish-web.xml (应该在WAR的 WEB-INF 文件夹中)。



如果您删除了前导斜杠,您可能会摆脱警告,因此您的 glassfish-web.xml 看起来与此类似:

 <?xml version =1.0encoding =UTF-8?> 
<!DOCTYPE glassfish-web-app PUBLIC - // GlassFish.org //DTD GlassFish Application Server 3.1 Servlet 3.0 // ENhttp://glassfish.org/dtds/glassfish-web-app_3_0 -1.dtd>
< glassfish-web-app error-url =>
< context-root> SalutationApp-war< / context-root>
< / glassfish-web-app>

如果您没有 glassfish-web.xml 你可以创建一个看起来像这个例子。您也可以为您的应用程序选择更好的上下文根。


I'm not quite sure what this error message is indicating:

INFO:   visiting unvisited references
INFO:   visiting unvisited references
INFO:   visiting unvisited references
INFO:   visiting unvisited references
INFO:   EJB5181:Portable JNDI names for EJB Hello: [java:global/SalutationApp/SalutationApp-ejb/Hello, java:global/SalutationApp/SalutationApp-ejb/Hello!ejb.Hello]
INFO:   Loading application [SalutationApp#SalutationApp-war.war] at [SalutationApp-war]
INFO:   SalutationApp was successfully deployed in 976 milliseconds.
WARNING:   Context path from ServletContext: /SalutationApp-war differs from path from bundle: SalutationApp-war
INFO:   myRemoteMethod..

So far as I can tell, there doesn't seem to be an "application.xml" file...has that been deprecated?

thufir@dur:~/NetBeansProjects/SalutationApp/dist$ 
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ ll
total 16
drwxrwxr-x 2 thufir thufir 4096 Sep  9 01:42 ./
drwxrwxr-x 8 thufir thufir 4096 Sep  9 01:42 ../
-rw-rw-r-- 1 thufir thufir 7139 Sep  9 01:42 SalutationApp.ear
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ 
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ jar -xf SalutationApp.ear 
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ 
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ ll
total 32
drwxrwxr-x 3 thufir thufir 4096 Sep  9 01:42 ./
drwxrwxr-x 8 thufir thufir 4096 Sep  9 01:42 ../
drwxrwxr-x 2 thufir thufir 4096 Sep  9 01:42 META-INF/
-rw-rw-r-- 1 thufir thufir 7139 Sep  9 01:42 SalutationApp.ear
-rw-rw-r-- 1 thufir thufir 1908 Sep  9 01:42 SalutationApp-ejb.jar
-rw-rw-r-- 1 thufir thufir 4652 Sep  9 01:42 SalutationApp-war.war
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ 
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ ll META-INF/
total 12
drwxrwxr-x 2 thufir thufir 4096 Sep  9 01:42 ./
drwxrwxr-x 3 thufir thufir 4096 Sep  9 01:42 ../
-rw-rw-r-- 1 thufir thufir  103 Sep  9 01:42 MANIFEST.MF
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ 
thufir@dur:~/NetBeansProjects/SalutationApp/dist$ cat META-INF/MANIFEST.MF 
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.7.0_51-b31 (Oracle Corporation)

thufir@dur:~/NetBeansProjects/SalutationApp/dist$ 

see also comments here:

Is the Application-ejb.jar file listed in the application.xml file in the META-INF dir of the ear file? Is the Application-ejb.jar in the root of the ear file? – Sam Nunnally Nov 24 '13 at 4:03

Setting up Enterprise Application

which makes me wonder about the structure of my application. Currently, the application runs with the expected output -- a servlet which invokes an EJB.

What is this error indicative of?

see also:

https://netbeans.org/bugzilla/show_bug.cgi?id=232326

解决方案

This is just a warning, you can ignore it if you want.

The warning is raised because you probably have a leading slash (i.e. /) in your context-root in glassfish-web.xml (should be in the WEB-INF folder of the WAR).

You may get rid of the warning if you remove the leading slash so your glassfish-web.xml looks similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
  <context-root>SalutationApp-war</context-root>
</glassfish-web-app>

If you don't have a glassfish-web.xml you can create one which looks like the example. You may also choose a better context-root for your application.

这篇关于这个glassfish警告的含义:上下文路径与bundle不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆