JAX-RS Rest 服务停止在 Eclipse Glassfish 上部署
JAX-RS Rest services stopped deploying on Eclipse Glassfish
我已经使用 Eclipse 在 Glassfish 4.1.1 上开发 Jersey JAX-RS 应用程序大约一年了。今天早些时候,我对某些 类 进行了一些正常更改,但是当我尝试构建时,Eclipse 没有更新 类。我在 Stack Overflow 上搜索,找到 this answer.
所以我做了以下步骤:
- 项目 > 清理 您正在处理的项目。
- Project > Build Automatically - 已启用,因此代码会根据保存的更改在您的工作区中重建。
- Window > 首选项 并确保您安装的 JRE 和编译器匹配 Java 版本
我安装的 jre 是 jdk1.8.0_73
,我的编译器兼容级别是 1.8
现在当我对 Java 文件进行更改时,下面的服务器选项卡仍然不会显示
[Started, Republish]
应该是这样,但保持在
[Started, Synchronized].
情况变得更糟。现在,当我尝试使用 POSTMAN 访问其余服务并查询我已使用它一百万次时 returns 404 表示请求的资源不可用。
所以基本上 none 的 REST 服务由于某种原因正常启动。
如果我为我的应用程序点击 index.html 它会正常运行,但是当 AngularJS 尝试从 REST 后端加载内容时,它会收到 404 错误。
我没有对 Eclipse/Glassfish 进行任何更改,因为它昨天运行良好。这完全停止了开发。任何人都知道可能出了什么问题?非常烦人。
我不是 Eclipse、Glassfish 或 jersey 方面的专家,所以请放轻松 :)
这是我启动服务器时的构建日志,也许有人能注意到发生了什么....
2016-10-02T15:24:47.575+0100|Info: Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)
2016-10-02T15:24:47.576+0100|Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
2016-10-02T15:24:47.664+0100|Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2016-10-02T15:24:47.665+0100|Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2016-10-02T15:24:47.670+0100|Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
2016-10-02T15:24:47.775+0100|Info: Authorization Service has successfully initialized.
2016-10-02T15:24:47.825+0100|Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
2016-10-02T15:24:47.948+0100|Info: JTS5014: Recoverable JTS instance, serverId = [100]
2016-10-02T15:24:47.965+0100|Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
2016-10-02T15:24:48.037+0100|Info: Grizzly Framework 2.3.23 started in: 54ms - bound to [/0.0.0.0:8080]
2016-10-02T15:24:48.051+0100|Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
2016-10-02T15:24:48.055+0100|Info: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:8181]
2016-10-02T15:24:48.057+0100|Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
2016-10-02T15:24:48.062+0100|Info: Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:4848]
2016-10-02T15:24:48.093+0100|Info: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:3700]
2016-10-02T15:24:48.316+0100|Info: visiting unvisited references
2016-10-02T15:24:48.655+0100|Info: Java security manager is disabled.
2016-10-02T15:24:48.656+0100|Info: Entering Security Startup Service.
2016-10-02T15:24:48.658+0100|Info: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
2016-10-02T15:24:48.677+0100|Info: Security Service(s) started successfully.
2016-10-02T15:24:48.829+0100|Info: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
2016-10-02T15:24:48.833+0100|Info: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
2016-10-02T15:24:48.835+0100|Info: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
2016-10-02T15:24:48.849+0100|Info: Created virtual server server
2016-10-02T15:24:48.851+0100|Info: Created virtual server __asadmin
2016-10-02T15:24:48.995+0100|Info: Setting JAAS app name glassfish-web
2016-10-02T15:24:48.996+0100|Info: Virtual server server loaded default web module
2016-10-02T15:24:49.419+0100|Info: visiting unvisited references
2016-10-02T15:24:49.447+0100|Info: visiting unvisited references
2016-10-02T15:24:49.448+0100|Info: visiting unvisited references
2016-10-02T15:24:49.449+0100|Info: visiting unvisited references
2016-10-02T15:24:49.450+0100|Info: visiting unvisited references
2016-10-02T15:24:49.451+0100|Info: visiting unvisited references
2016-10-02T15:24:49.451+0100|Info: visiting unvisited references
2016-10-02T15:24:49.452+0100|Info: visiting unvisited references
2016-10-02T15:24:49.453+0100|Info: visiting unvisited references
2016-10-02T15:24:49.453+0100|Info: visiting unvisited references
2016-10-02T15:24:49.454+0100|Info: visiting unvisited references
2016-10-02T15:24:49.471+0100|Info: visiting unvisited references
2016-10-02T15:24:49.472+0100|Info: visiting unvisited references
2016-10-02T15:24:49.473+0100|Info: visiting unvisited references
2016-10-02T15:24:49.474+0100|Info: visiting unvisited references
2016-10-02T15:24:49.475+0100|Info: visiting unvisited references
2016-10-02T15:24:49.476+0100|Info: visiting unvisited references
2016-10-02T15:24:49.477+0100|Info: visiting unvisited references
2016-10-02T15:24:49.478+0100|Info: visiting unvisited references
2016-10-02T15:24:49.479+0100|Info: visiting unvisited references
2016-10-02T15:24:49.571+0100|Info: WELD-000900: 2.2.13 (Final)
2016-10-02T15:24:50.041+0100|Info: HV000001: Hibernate Validator 5.1.2.Final
2016-10-02T15:24:50.250+0100|WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
2016-10-02T15:24:50.250+0100|WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
2016-10-02T15:24:50.407+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.413+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.
2016-10-02T15:24:50.415+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.
2016-10-02T15:24:50.427+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.
2016-10-02T15:24:50.428+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.
2016-10-02T15:24:50.429+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.
2016-10-02T15:24:50.430+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.433+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.436+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.
2016-10-02T15:24:50.437+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.
2016-10-02T15:24:50.438+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.
2016-10-02T15:24:50.439+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.
2016-10-02T15:24:50.440+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.441+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.442+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.444+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.
2016-10-02T15:24:50.444+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.445+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.445+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.
2016-10-02T15:24:50.447+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.
2016-10-02T15:24:50.448+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.
2016-10-02T15:24:50.448+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.
2016-10-02T15:24:50.450+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.
2016-10-02T15:24:50.451+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.
2016-10-02T15:24:51.764+0100|Info: Loading application [pododdle] at [/pododdle]
2016-10-02T15:24:51.766+0100|Info: Loading application pododdle done in 3,949 ms
2016-10-02T15:24:51.766+0100|Info: GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (1,264ms), startup services(4,275ms), total(5,539ms)
2016-10-02T15:24:51.821+0100|Info: Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:7676]
2016-10-02T15:24:52.061+0100|Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@7bbbb6a8 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@b18c4.
2016-10-02T15:24:52.082+0100|Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://PododdlePC:8686/jndi/rmi://PododdlePC:8686/jmxrmi
看起来这个错误是由于项目没有正确构建引起的。检查构建路径后,似乎有两个 jar 文件神秘地丢失了!他们是:
jersey-media-multipart-2.21.1.jar
mimepull-1.9.3.jar
我不知道 glassfish 服务器的 /lib 目录中的 jar 文件是如何删除的,也许我不应该喝那瓶额外的威士忌。一旦将它们重新添加进去,一切都会突然恢复正常。这个错误让我有点困惑——我原以为如果 jar 不可用,它会给出一个编译错误。无论如何,由于另一个烦人的错误而损失了 5 天。
我已经使用 Eclipse 在 Glassfish 4.1.1 上开发 Jersey JAX-RS 应用程序大约一年了。今天早些时候,我对某些 类 进行了一些正常更改,但是当我尝试构建时,Eclipse 没有更新 类。我在 Stack Overflow 上搜索,找到 this answer.
所以我做了以下步骤:
- 项目 > 清理 您正在处理的项目。
- Project > Build Automatically - 已启用,因此代码会根据保存的更改在您的工作区中重建。
- Window > 首选项 并确保您安装的 JRE 和编译器匹配 Java 版本
我安装的 jre 是 jdk1.8.0_73
,我的编译器兼容级别是 1.8
现在当我对 Java 文件进行更改时,下面的服务器选项卡仍然不会显示
[Started, Republish]
应该是这样,但保持在
[Started, Synchronized].
情况变得更糟。现在,当我尝试使用 POSTMAN 访问其余服务并查询我已使用它一百万次时 returns 404 表示请求的资源不可用。
所以基本上 none 的 REST 服务由于某种原因正常启动。
如果我为我的应用程序点击 index.html 它会正常运行,但是当 AngularJS 尝试从 REST 后端加载内容时,它会收到 404 错误。
我没有对 Eclipse/Glassfish 进行任何更改,因为它昨天运行良好。这完全停止了开发。任何人都知道可能出了什么问题?非常烦人。
我不是 Eclipse、Glassfish 或 jersey 方面的专家,所以请放轻松 :)
这是我启动服务器时的构建日志,也许有人能注意到发生了什么....
2016-10-02T15:24:47.575+0100|Info: Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)
2016-10-02T15:24:47.576+0100|Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
2016-10-02T15:24:47.664+0100|Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2016-10-02T15:24:47.665+0100|Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2016-10-02T15:24:47.670+0100|Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
2016-10-02T15:24:47.775+0100|Info: Authorization Service has successfully initialized.
2016-10-02T15:24:47.825+0100|Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
2016-10-02T15:24:47.948+0100|Info: JTS5014: Recoverable JTS instance, serverId = [100]
2016-10-02T15:24:47.965+0100|Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
2016-10-02T15:24:48.037+0100|Info: Grizzly Framework 2.3.23 started in: 54ms - bound to [/0.0.0.0:8080]
2016-10-02T15:24:48.051+0100|Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
2016-10-02T15:24:48.055+0100|Info: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:8181]
2016-10-02T15:24:48.057+0100|Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
2016-10-02T15:24:48.062+0100|Info: Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:4848]
2016-10-02T15:24:48.093+0100|Info: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:3700]
2016-10-02T15:24:48.316+0100|Info: visiting unvisited references
2016-10-02T15:24:48.655+0100|Info: Java security manager is disabled.
2016-10-02T15:24:48.656+0100|Info: Entering Security Startup Service.
2016-10-02T15:24:48.658+0100|Info: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
2016-10-02T15:24:48.677+0100|Info: Security Service(s) started successfully.
2016-10-02T15:24:48.829+0100|Info: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
2016-10-02T15:24:48.833+0100|Info: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
2016-10-02T15:24:48.835+0100|Info: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
2016-10-02T15:24:48.849+0100|Info: Created virtual server server
2016-10-02T15:24:48.851+0100|Info: Created virtual server __asadmin
2016-10-02T15:24:48.995+0100|Info: Setting JAAS app name glassfish-web
2016-10-02T15:24:48.996+0100|Info: Virtual server server loaded default web module
2016-10-02T15:24:49.419+0100|Info: visiting unvisited references
2016-10-02T15:24:49.447+0100|Info: visiting unvisited references
2016-10-02T15:24:49.448+0100|Info: visiting unvisited references
2016-10-02T15:24:49.449+0100|Info: visiting unvisited references
2016-10-02T15:24:49.450+0100|Info: visiting unvisited references
2016-10-02T15:24:49.451+0100|Info: visiting unvisited references
2016-10-02T15:24:49.451+0100|Info: visiting unvisited references
2016-10-02T15:24:49.452+0100|Info: visiting unvisited references
2016-10-02T15:24:49.453+0100|Info: visiting unvisited references
2016-10-02T15:24:49.453+0100|Info: visiting unvisited references
2016-10-02T15:24:49.454+0100|Info: visiting unvisited references
2016-10-02T15:24:49.471+0100|Info: visiting unvisited references
2016-10-02T15:24:49.472+0100|Info: visiting unvisited references
2016-10-02T15:24:49.473+0100|Info: visiting unvisited references
2016-10-02T15:24:49.474+0100|Info: visiting unvisited references
2016-10-02T15:24:49.475+0100|Info: visiting unvisited references
2016-10-02T15:24:49.476+0100|Info: visiting unvisited references
2016-10-02T15:24:49.477+0100|Info: visiting unvisited references
2016-10-02T15:24:49.478+0100|Info: visiting unvisited references
2016-10-02T15:24:49.479+0100|Info: visiting unvisited references
2016-10-02T15:24:49.571+0100|Info: WELD-000900: 2.2.13 (Final)
2016-10-02T15:24:50.041+0100|Info: HV000001: Hibernate Validator 5.1.2.Final
2016-10-02T15:24:50.250+0100|WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
2016-10-02T15:24:50.250+0100|WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
2016-10-02T15:24:50.407+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.413+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.
2016-10-02T15:24:50.415+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.
2016-10-02T15:24:50.427+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.
2016-10-02T15:24:50.428+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.
2016-10-02T15:24:50.429+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.
2016-10-02T15:24:50.430+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.433+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.436+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.
2016-10-02T15:24:50.437+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.
2016-10-02T15:24:50.438+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.
2016-10-02T15:24:50.439+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.
2016-10-02T15:24:50.440+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.441+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.442+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.444+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.
2016-10-02T15:24:50.444+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.445+0100|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2016-10-02T15:24:50.445+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.
2016-10-02T15:24:50.447+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.
2016-10-02T15:24:50.448+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.
2016-10-02T15:24:50.448+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.
2016-10-02T15:24:50.450+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.
2016-10-02T15:24:50.451+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.
2016-10-02T15:24:51.764+0100|Info: Loading application [pododdle] at [/pododdle]
2016-10-02T15:24:51.766+0100|Info: Loading application pododdle done in 3,949 ms
2016-10-02T15:24:51.766+0100|Info: GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (1,264ms), startup services(4,275ms), total(5,539ms)
2016-10-02T15:24:51.821+0100|Info: Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:7676]
2016-10-02T15:24:52.061+0100|Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@7bbbb6a8 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@b18c4.
2016-10-02T15:24:52.082+0100|Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://PododdlePC:8686/jndi/rmi://PododdlePC:8686/jmxrmi
看起来这个错误是由于项目没有正确构建引起的。检查构建路径后,似乎有两个 jar 文件神秘地丢失了!他们是:
jersey-media-multipart-2.21.1.jar
mimepull-1.9.3.jar
我不知道 glassfish 服务器的 /lib 目录中的 jar 文件是如何删除的,也许我不应该喝那瓶额外的威士忌。一旦将它们重新添加进去,一切都会突然恢复正常。这个错误让我有点困惑——我原以为如果 jar 不可用,它会给出一个编译错误。无论如何,由于另一个烦人的错误而损失了 5 天。