gpt4 book ai didi

jakarta-ee - 此 Glassfish 警告 : context path differs from bundle 的含义

转载 作者:行者123 更新时间:2023-12-04 02:07:31 25 4
gpt4 key购买 nike

我不太确定此错误消息表示什么:

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..

据我所知,似乎没有“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
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$

另请参阅此处的评论:

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

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

这个错误表示什么?

也可以看看:

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

最佳答案

这只是一个警告,您可以根据需要忽略它。

发出警告是因为您可能在 / 的上下文根目录中有一个前导斜杠(即 glassfish-web.xml ) (应该在 WAR 的 WEB-INF 文件夹中)。

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

<?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>

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

关于jakarta-ee - 此 Glassfish 警告 : context path differs from bundle 的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25740363/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com