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

时间:2015-04-20 08:26:28

标签: java eclipse maven netbeans

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

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

在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

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

或者,有没有办法可以找到有关错误的更多细节?当我谷歌PWC6117: File "null" not found时,它似乎是人们代码中的特定错误,我的代码在netbeans上工作正常,所以我不确定如何缩小它

三江源

3 个答案:

答案 0 :(得分:1)

我遇到了类似的问题,这与我的welcome file not being defined.有关 在你的情况下,它可能已经在Netbeans中定义,但在Eclipse中没有定义。

答案 1 :(得分:0)

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

protocol//:hostname:port/context-name

请参阅How to set the context以获取您的网络应用程序。默认情况下,上下文名称是项目名称。但是,您可以在web.xml文件中更改所需内容。

因此,您必须使用网址

加载应用程序

http://localhost:8080/animelist1

答案 2 :(得分:0)

您应该检查index.jsp文件夹中是否有WEB-INF/jsp/。或者您在web.xml中设置为欢迎文件的任何内容。