从 Netbeans 转移到 Eclipse,现在“严重:PWC6117:找不到文件“null””

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29742701/
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-09-19 22:34:05  来源:igfitidea点击:

Transferred from Netbeans to Eclipse, now "Severe: PWC6117: File "null" not found"

javaeclipsemavennetbeans

提问by Percy

I transferred my Java maven netbeans glassfish web application to Eclipse. It consists of a .jsp and some controller servlets for when the user clicks on stuff.

我将我的 Java maven netbeans glassfish Web 应用程序转移到 Eclipse。它由一个 .jsp 和一些控制器 servlet 组成,用于当用户点击东西时。

It runs in Netbeans (i rightclick the jsp and run it, and the webpage loads). Some functionality in some controller methods is broken but the webpage still opens fine when i run it.

它在 Netbeans 中运行(我右键单击 jsp 并运行它,然后网页加载)。某些控制器方法中的某些功能已损坏,但当我运行它时网页仍然可以正常打开。

In Eclipse, I rightclick the jsp and run on server and get the following (scroll to end):

在 Eclipse 中,我右键单击 jsp 并在服务器上运行并得到以下内容(滚动到结尾):

2015-04-20T09:09:28.066+0100|Info: Running GlassFish Version: GlassFish Server Open Source Edition  4.1  (build 13)
2015-04-20T09:09:28.068+0100|Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
2015-04-20T09:09:28.379+0100|Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2015-04-20T09:09:28.380+0100|Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2015-04-20T09:09:28.385+0100|Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
2015-04-20T09:09:28.609+0100|Info: Authorization Service has successfully initialized.
2015-04-20T09:09:29.171+0100|Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
2015-04-20T09:09:29.894+0100|Info: Grizzly Framework 2.3.15 started in: 458ms - bound to [/0.0.0.0:8080]
2015-04-20T09:09:30.073+0100|Info: visiting unvisited references
2015-04-20T09:09:30.286+0100|Info: Grizzly Framework 2.3.15 started in: 335ms - bound to [/0.0.0.0:8181]
2015-04-20T09:09:30.360+0100|Info: Grizzly Framework 2.3.15 started in: 37ms - bound to [/0.0.0.0:4848]
2015-04-20T09:09:30.410+0100|Info: Grizzly Framework 2.3.15 started in: 2ms - bound to [/0.0.0.0:3700]
2015-04-20T09:09:30.771+0100|Info: Java security manager is disabled.
2015-04-20T09:09:30.773+0100|Info: Entering Security Startup Service.
2015-04-20T09:09:30.776+0100|Info: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
2015-04-20T09:09:30.823+0100|Info: Security Service(s) started successfully.
2015-04-20T09:09:31.041+0100|Info: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
2015-04-20T09:09:31.052+0100|Info: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
2015-04-20T09:09:31.055+0100|Info: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
2015-04-20T09:09:31.080+0100|Info: Created virtual server server
2015-04-20T09:09:31.090+0100|Info: Created virtual server __asadmin
2015-04-20T09:09:31.348+0100|Info: Setting JAAS app name glassfish-web
2015-04-20T09:09:31.349+0100|Info: Virtual server server loaded default web module 
2015-04-20T09:09:32.301+0100|Info: visiting unvisited references
2015-04-20T09:09:32.455+0100|Info: visiting unvisited references
2015-04-20T09:09:32.476+0100|Info: visiting unvisited references
2015-04-20T09:09:32.481+0100|Info: visiting unvisited references
2015-04-20T09:09:32.482+0100|Info: visiting unvisited references
2015-04-20T09:09:32.763+0100|Info: Portable JNDI names for EJB Info: [java:global/animelist1/Info, java:global/animelist1/Info!entities.Info]
2015-04-20T09:09:32.825+0100|Info: Portable JNDI names for EJB AnnJAXB: [java:global/animelist1/AnnJAXB, java:global/animelist1/AnnJAXB!main.AnnJAXB]
2015-04-20T09:09:32.836+0100|Info: Portable JNDI names for EJB Ann: [java:global/animelist1/Ann!entities.Ann, java:global/animelist1/Ann]
2015-04-20T09:09:32.850+0100|Info: Portable JNDI names for EJB Anime: [java:global/animelist1/Anime!entities.Anime, java:global/animelist1/Anime]
2015-04-20T09:09:32.884+0100|Info: WELD-000900: 2.2.2 (Final)
2015-04-20T09:09:33.140+0100|Info: HV000001: Hibernate Validator 5.0.0.Final
2015-04-20T09:09:33.413+0100|WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
2015-04-20T09:09:33.414+0100|WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
2015-04-20T09:09:33.606+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2015-04-20T09:09:33.622+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2015-04-20T09:09:33.646+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2015-04-20T09:09:34.749+0100|Info: Loading application [animelist1] at [/animelist1]
2015-04-20T09:09:34.753+0100|Info: Loading application animelist1 done in 5,562 ms
2015-04-20T09:09:34.769+0100|Info: GlassFish Server Open Source Edition  4.1  (13) startup time : Felix (2,265ms), startup services(6,789ms), total(9,054ms)
2015-04-20T09:09:35.197+0100|Info: Grizzly Framework 2.3.15 started in: 130ms - bound to [/0.0.0.0:7676]
2015-04-20T09:09:35.284+0100|Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@4ae263bf as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@49a71302.
2015-04-20T09:09:35.354+0100|Info: C:\Program Files\glassfish4\glassfish\domains\domain1\autodeploy\bundles does not exist, please create it.
2015-04-20T09:09:36.159+0100|Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://J-PC:8686/jndi/rmi://J-PC:8686/jmxrmi
2015-04-20T09:09:36.234+0100|Info: keepstate options resolved to true, saving appId 93684827868430336 for application animelist1.
2015-04-20T09:09:36.840+0100|Info: visiting unvisited references
2015-04-20T09:09:37.021+0100|Info: visiting unvisited references
2015-04-20T09:09:37.036+0100|Info: visiting unvisited references
2015-04-20T09:09:37.047+0100|Info: visiting unvisited references
2015-04-20T09:09:37.048+0100|Info: visiting unvisited references
2015-04-20T09:09:37.049+0100|Info: visiting unvisited references
2015-04-20T09:09:37.153+0100|Info: Portable JNDI names for EJB AnnJAXB: [java:global/animelist1/AnnJAXB, java:global/animelist1/AnnJAXB!main.AnnJAXB]
2015-04-20T09:09:37.169+0100|Info: Portable JNDI names for EJB Ann: [java:global/animelist1/Ann!entities.Ann, java:global/animelist1/Ann]
2015-04-20T09:09:37.186+0100|Info: Portable JNDI names for EJB Anime: [java:global/animelist1/Anime!entities.Anime, java:global/animelist1/Anime]
2015-04-20T09:09:37.201+0100|Info: Portable JNDI names for EJB Info: [java:global/animelist1/Info, java:global/animelist1/Info!entities.Info]
2015-04-20T09:09:37.302+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2015-04-20T09:09:37.315+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2015-04-20T09:09:37.327+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2015-04-20T09:09:38.201+0100|Info: Loading application [animelist1] at [/animelist1]
2015-04-20T09:09:38.252+0100|Info: animelist1 was successfully deployed in 2,101 milliseconds.
2015-04-20T09:09:38.680+0100|Severe: PWC6117: File "null" not found

I am brand new to Eclipse, and new to programming. Is there something I might have needed to alter when opening the project in eclipse? It was a maven project and i opened it with maven in eclipse, everything went smoothly.

我是 Eclipse 的新手,也是编程的新手。在 Eclipse 中打开项目时,我可能需要更改某些内容吗?这是一个maven项目,我在eclipse中用maven打开它,一切都很顺利。

Alternatively, is there a way I can find more detail about the error? When I google PWC6117: File "null" not foundit seems to be specific errors in peoples code and my code was working fine on netbeans so i'm not sure how to narrow it down

或者,有没有办法可以找到有关错误的更多详细信息?当我用谷歌搜索时,PWC6117: File "null" not found它似乎是人们代码中的特定错误,我的代码在 netbeans 上运行良好,所以我不知道如何缩小范围

Thankyou

谢谢

回答by jsky

I had a similar problem and it was to do with my welcome file not being defined.In your situation it may've been define in Netbeans but not in Eclipse.

我有一个类似的问题,这与我的欢迎文件没有被定义有关。在您的情况下,它可能已在 Netbeans 中定义,但未在 Eclipse 中定义。

回答by Lucky

Since your context has loaded, your application will always be loaded with the following url pattern

由于您的上下文已加载,您的应用程序将始终使用以下 url 模式加载

protocol//:hostname:port/context-name

protocol//:hostname:port/context-name

Refer How to set the contextfor your web application. By default context name is your project name. However you can change whatever you want in the web.xmlfile.

请参阅如何为您的 Web 应用程序设置上下文。默认情况下,上下文名称是您的项目名称。但是,您可以更改web.xml文件中的任何内容。

So you'll have to load the application using the url,

所以你必须使用 url 加载应用程序,

http://localhost:8080/animelist1

http://localhost:8080/animelist1

回答by The Bitman

You should check if there it is an index.jspin the WEB-INF/jsp/folder. Or whatever you set as a welcome file in the web.xml.

你应该检查是否有它是一个index.jspWEB-INF/jsp/的文件夹。或者您在web.xml.