- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在编写教程 Simple JMS example with Glassfish and a RESTful webservice将 Glassfish 4 与 Jersey 2 Servlet 容器(不是教程中的 Jersey 1)结合使用,而不使用 Maven。
最终出现错误 404。应用程序已成功部署,但我不知道为什么会收到错误。
当我查看 glassfish 目录时,应该在某处有已部署的应用程序。它可能位于glassfish/domains/domain1/applications/__internal/JMS1/..
,但该目录是空的。
我发现 glassfish 将 eclipse 生成的应用程序部署在 glassfish/domains/domain1/eclipseApps/JMS1/..
中。这样应用程序就部署成功了。
我做错了什么?我是否访问了错误的 URL 或类似内容?
日志
2018-03-12T16:34:32.824+0100|Information: Server shutdown initiated
2018-03-12T16:34:32.843+0100|Information: Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3071d086 from service registry.
2018-03-12T16:34:32.844+0100|Information: FileMonitoring shutdown
2018-03-12T16:34:32.853+0100|Information: JMXStartupService: Stopped JMXConnectorServer: null
2018-03-12T16:34:32.854+0100|Information: JMXStartupService and JMXConnectors have been shut down.
2018-03-12T16:34:33.034+0100|Schwerwiegend: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a3b7ca7]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@5431ce55]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2018-03-12T16:34:33.035+0100|Schwerwiegend: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a3b7ca7]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@5431ce55]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2018-03-12T16:34:33.036+0100|Schwerwiegend: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a3b7ca7]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@5431ce55]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2018-03-12T16:34:33.036+0100|Schwerwiegend: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a3b7ca7]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@5431ce55]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2018-03-12T16:34:33.037+0100|Schwerwiegend: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5a3b7ca7]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@5431ce55]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2018-03-12T16:34:33.142+0100|Information: JdbcRuntimeExtension, getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool]
2018-03-12T16:34:33.161+0100|Information: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopping...
2018-03-12T16:34:36.340+0100|Information: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopped.
2018-03-12T16:34:36.341+0100|Information: RAR7094: jmsra shutdown successful.
2018-03-12T16:35:22.889+0100|Information: Running GlassFish Version: GlassFish Server Open Source Edition 4.0 (build 89)
2018-03-12T16:35:22.892+0100|Information: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
2018-03-12T16:35:23.016+0100|Information: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2018-03-12T16:35:23.017+0100|Information: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2018-03-12T16:35:23.022+0100|Information: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
2018-03-12T16:35:23.426+0100|Information: Grizzly Framework 2.3.1 started in: 44ms - bound to [/0.0.0.0:8.080]
2018-03-12T16:35:23.508+0100|Information: Grizzly Framework 2.3.1 started in: 48ms - bound to [/0.0.0.0:8.181]
2018-03-12T16:35:23.516+0100|Information: Grizzly Framework 2.3.1 started in: 2ms - bound to [/0.0.0.0:4.848]
2018-03-12T16:35:23.791+0100|Information: Authorization Service has successfully initialized.
2018-03-12T16:35:23.833+0100|Information: Grizzly Framework 2.3.1 started in: 2ms - bound to [/0.0.0.0:3.700]
2018-03-12T16:35:24.140+0100|Information: visiting unvisited references
2018-03-12T16:35:24.693+0100|Information: visiting unvisited references
2018-03-12T16:35:24.927+0100|Information: visiting unvisited references
2018-03-12T16:35:25.020+0100|Information: visiting unvisited references
2018-03-12T16:35:25.033+0100|Information: visiting unvisited references
2018-03-12T16:35:25.604+0100|Information: SEC1002: Security Manager is OFF.
2018-03-12T16:35:25.604+0100|Information: SEC1010: Entering Security Startup Service
2018-03-12T16:35:25.606+0100|Information: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
2018-03-12T16:35:25.639+0100|Information: SEC1011: Security Service(s) Started Successfully
2018-03-12T16:35:25.822+0100|Information: this.makeModuleFor(org.glassfish.main.web.glue, null) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.web.glue [263]], State = [READY]
2018-03-12T16:35:25.822+0100|Information: this.makeModuleFor(org.glassfish.web.javax.servlet.jsp, null) returned OSGiModuleImpl:: Bundle = [org.glassfish.web.javax.servlet.jsp [149]], State = [READY]
2018-03-12T16:35:25.962+0100|Information: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
2018-03-12T16:35:25.970+0100|Information: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
2018-03-12T16:35:25.975+0100|Information: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
2018-03-12T16:35:26.001+0100|Information: Created virtual server server
2018-03-12T16:35:26.003+0100|Information: Created virtual server __asadmin
2018-03-12T16:35:26.096+0100|Information: Setting JAAS app name glassfish-web
2018-03-12T16:35:26.097+0100|Information: Virtual server server loaded default web module
2018-03-12T16:35:28.110+0100|Information: JTS5014: Recoverable JTS instance, serverId = [3700]
2018-03-12T16:35:28.706+0100|Information: JMS010: ADDRESSLIST in setJmsServiceProvider: mq://localhost:7676/
2018-03-12T16:35:28.706+0100|Information: JMS08: JMS Service Connection URL is : mq://localhost:7676/
2018-03-12T16:35:29.808+0100|Information: HV000001: Hibernate Validator 5.0.0.Final
2018-03-12T16:35:29.992+0100|Information: Grizzly Framework 2.3.1 started in: 2ms - bound to [/0.0.0.0:7.676]
2018-03-12T16:35:29.997+0100|Information: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version: 5.0 (Build 14-e) Compile: April 12 2013 0104
2018-03-12T16:35:29.997+0100|Information: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is Direct
2018-03-12T16:35:32.907+0100|Information: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:EMBEDDED
2018-03-12T16:35:32.945+0100|Information: JMS013: Assuming destination type javax.jms.Queue for MDB SimpleMessageDrivenBean from administered object SimpleQueue
2018-03-12T16:35:33.182+0100|Information: WELD-000900 2.0.0 (SP1)
2018-03-12T16:35:33.313+0100|Information: EJB5181:Portable JNDI names for EJB SimpleJMSRestfulWebService: [java:global/JMS1/restful-webservice/SimpleJMSRestfulWebService!de.datagroup.jms.SimpleJMSRestfulWebService, java:global/JMS1/restful-webservice/SimpleJMSRestfulWebService]
2018-03-12T16:35:34.231+0100|Warnung: Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled
2018-03-12T16:35:34.231+0100|Warnung: Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
2018-03-12T16:35:35.063+0100|Information: Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
2018-03-12T16:35:35.427+0100|Information: Loading application [JMS1#restful-webservice.war] at [restful-webservice]
2018-03-12T16:35:35.430+0100|Information: Loading application JMS1 done in 11.460 ms
2018-03-12T16:35:35.447+0100|Information: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
2018-03-12T16:35:35.457+0100|Information: GlassFish Server Open Source Edition 4.0 (89) startup time : Felix (2.316ms), startup services(12.652ms), total(14.968ms)
2018-03-12T16:35:35.597+0100|Information: Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
2018-03-12T16:35:37.138+0100|Information: Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
2018-03-12T16:35:37.295+0100|Information: Listening to REST requests at context: /management/domain.
2018-03-12T16:35:37.715+0100|Information: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@505bc480 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@5120886f.
2018-03-12T16:35:37.835+0100|Information: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://NBC0403232.consinto.com:8686/jndi/rmi://NBC0403232.consinto.com:8686/jmxrmi
2018-03-12T16:35:37.927+0100|Information: visiting unvisited references
2018-03-12T16:35:38.086+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-common, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common [48]], State = [READY]
2018-03-12T16:35:38.088+0100|Information: this.makeModuleFor(org.glassfish.hk2.hk2, 2.1.92) returned OSGiModuleImpl:: Bundle = [org.glassfish.hk2.hk2 [118]], State = [READY]
2018-03-12T16:35:38.088+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-plugin-service, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-plugin-service [58]], State = [READY]
2018-03-12T16:35:38.093+0100|Information: this.makeModuleFor(org.glassfish.main.deployment.deployment-client, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.deployment-client [67]], State = [READY]
2018-03-12T16:35:38.093+0100|Information: this.makeModuleFor(org.glassfish.main.registration.registration-api, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.registration-api [230]], State = [READY]
2018-03-12T16:35:38.093+0100|Information: this.makeModuleFor(org.glassfish.main.registration.registration-impl, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.registration-impl [231]], State = [READY]
2018-03-12T16:35:38.094+0100|Information: this.makeModuleFor(javax.servlet-api, 3.1.0) returned OSGiModuleImpl:: Bundle = [javax.servlet-api [147]], State = [READY]
2018-03-12T16:35:38.094+0100|Information: this.makeModuleFor(javax.servlet.jsp-api, 2.3.1) returned OSGiModuleImpl:: Bundle = [javax.servlet.jsp-api [148]], State = [READY]
2018-03-12T16:35:38.094+0100|Information: this.makeModuleFor(com.sun.el.javax.el, 3.0.0) returned OSGiModuleImpl:: Bundle = [com.sun.el.javax.el [132]], State = [READY]
2018-03-12T16:35:38.094+0100|Information: this.makeModuleFor(com.sun.jsftemplating, 2.1.0) returned OSGiModuleImpl:: Bundle = [com.sun.jsftemplating [186]], State = [READY]
2018-03-12T16:35:38.095+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.dataprovider, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.dataprovider [63]], State = [READY]
2018-03-12T16:35:38.095+0100|Information: this.makeModuleFor(com.sun.pkg.client, 1.0.0) returned OSGiModuleImpl:: Bundle = [com.sun.pkg.client [229]], State = [READY]
2018-03-12T16:35:38.095+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-cluster-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-cluster-plugin [46]], State = [READY]
2018-03-12T16:35:38.096+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jts-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jts-plugin [57]], State = [READY]
2018-03-12T16:35:38.096+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-corba-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-corba-plugin [51]], State = [READY]
2018-03-12T16:35:38.098+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-concurrent-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-concurrent-plugin [50]], State = [READY]
2018-03-12T16:35:38.098+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jca-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jca-plugin [54]], State = [READY]
2018-03-12T16:35:38.098+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jdbc-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jdbc-plugin [55]], State = [READY]
2018-03-12T16:35:38.098+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jms-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jms-plugin [56]], State = [READY]
2018-03-12T16:35:38.099+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-web-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-web-plugin [60]], State = [READY]
2018-03-12T16:35:38.099+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-common, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common [48]], State = [READY]
2018-03-12T16:35:38.099+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-updatecenter-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-updatecenter-plugin [59]], State = [READY]
2018-03-12T16:35:38.099+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-community-branding-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-community-branding-plugin [49]], State = [READY]
2018-03-12T16:35:38.099+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-ejb-lite-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-ejb-lite-plugin [52]], State = [READY]
2018-03-12T16:35:38.099+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-ejb-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-ejb-plugin [53]], State = [READY]
2018-03-12T16:35:38.100+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-common-full-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common-full-plugin [47]], State = [READY]
2018-03-12T16:35:38.202+0100|Information: visiting unvisited references
2018-03-12T16:35:38.220+0100|Information: visiting unvisited references
2018-03-12T16:35:38.222+0100|Information: visiting unvisited references
2018-03-12T16:35:38.302+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-common, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common [48]], State = [READY]
2018-03-12T16:35:38.302+0100|Information: this.makeModuleFor(org.glassfish.hk2.hk2, 2.1.92) returned OSGiModuleImpl:: Bundle = [org.glassfish.hk2.hk2 [118]], State = [READY]
2018-03-12T16:35:38.303+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-plugin-service, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-plugin-service [58]], State = [READY]
2018-03-12T16:35:38.303+0100|Information: this.makeModuleFor(org.glassfish.main.deployment.deployment-client, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.deployment-client [67]], State = [READY]
2018-03-12T16:35:38.303+0100|Information: this.makeModuleFor(org.glassfish.main.registration.registration-api, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.registration-api [230]], State = [READY]
2018-03-12T16:35:38.303+0100|Information: this.makeModuleFor(org.glassfish.main.registration.registration-impl, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.registration-impl [231]], State = [READY]
2018-03-12T16:35:38.304+0100|Information: this.makeModuleFor(javax.servlet-api, 3.1.0) returned OSGiModuleImpl:: Bundle = [javax.servlet-api [147]], State = [READY]
2018-03-12T16:35:38.304+0100|Information: this.makeModuleFor(javax.servlet.jsp-api, 2.3.1) returned OSGiModuleImpl:: Bundle = [javax.servlet.jsp-api [148]], State = [READY]
2018-03-12T16:35:38.304+0100|Information: this.makeModuleFor(com.sun.el.javax.el, 3.0.0) returned OSGiModuleImpl:: Bundle = [com.sun.el.javax.el [132]], State = [READY]
2018-03-12T16:35:38.304+0100|Information: this.makeModuleFor(com.sun.jsftemplating, 2.1.0) returned OSGiModuleImpl:: Bundle = [com.sun.jsftemplating [186]], State = [READY]
2018-03-12T16:35:38.305+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.dataprovider, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.dataprovider [63]], State = [READY]
2018-03-12T16:35:38.305+0100|Information: this.makeModuleFor(com.sun.pkg.client, 1.0.0) returned OSGiModuleImpl:: Bundle = [com.sun.pkg.client [229]], State = [READY]
2018-03-12T16:35:38.305+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-cluster-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-cluster-plugin [46]], State = [READY]
2018-03-12T16:35:38.305+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jts-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jts-plugin [57]], State = [READY]
2018-03-12T16:35:38.305+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-corba-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-corba-plugin [51]], State = [READY]
2018-03-12T16:35:38.306+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-concurrent-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-concurrent-plugin [50]], State = [READY]
2018-03-12T16:35:38.306+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jca-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jca-plugin [54]], State = [READY]
2018-03-12T16:35:38.306+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jdbc-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jdbc-plugin [55]], State = [READY]
2018-03-12T16:35:38.306+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-jms-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jms-plugin [56]], State = [READY]
2018-03-12T16:35:38.306+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-web-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-web-plugin [60]], State = [READY]
2018-03-12T16:35:38.307+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-common, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common [48]], State = [READY]
2018-03-12T16:35:38.307+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-updatecenter-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-updatecenter-plugin [59]], State = [READY]
2018-03-12T16:35:38.307+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-community-branding-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-community-branding-plugin [49]], State = [READY]
2018-03-12T16:35:38.307+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-ejb-lite-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-ejb-lite-plugin [52]], State = [READY]
2018-03-12T16:35:38.307+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-ejb-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-ejb-plugin [53]], State = [READY]
2018-03-12T16:35:38.308+0100|Information: this.makeModuleFor(org.glassfish.main.admingui.console-common-full-plugin, 4.0.0) returned OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common-full-plugin [47]], State = [READY]
2018-03-12T16:35:39.439+0100|Information: Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0@11930) f�r Kontext '' wird initialisiert.
2018-03-12T16:35:40.902+0100|Information: Loading application [__admingui] at [/]
2018-03-12T16:35:40.903+0100|Information: Loading application __admingui done in 3.350 ms
2018-03-12T16:35:49.793+0100|Information: visiting unvisited references
2018-03-12T16:35:49.867+0100|Information: visiting unvisited references
2018-03-12T16:35:49.937+0100|Information: visiting unvisited references
2018-03-12T16:35:49.943+0100|Information: visiting unvisited references
2018-03-12T16:35:49.949+0100|Information: visiting unvisited references
2018-03-12T16:35:50.033+0100|Information: JMS013: Assuming destination type javax.jms.Queue for MDB SimpleMessageDrivenBean from administered object SimpleQueue
2018-03-12T16:35:50.072+0100|Information: EJB5181:Portable JNDI names for EJB SimpleJMSRestfulWebService: [java:global/JMS1/restful-webservice/SimpleJMSRestfulWebService!de.datagroup.jms.SimpleJMSRestfulWebService, java:global/JMS1/restful-webservice/SimpleJMSRestfulWebService]
2018-03-12T16:35:50.538+0100|Information: Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
2018-03-12T16:35:50.597+0100|Information: Loading application [JMS1#restful-webservice.war] at [restful-webservice]
2018-03-12T16:35:50.651+0100|Information: JMS1 was successfully deployed in 977 milliseconds.
2018-03-12T16:36:08.034+0100|Warnung: Context path from ServletContext: /restful-webservice differs from path from bundle: restful-webservice
SimpleJMSRestfulWebService
package de.datagroup.jms;
import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.NamingException;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
/**
* Example of a RESTful webservice producing messages for a JMS Queue.
* Call via <a href="http://localhost:8080/webservicetest/jms">http://localhost:8080/webservicetest/jms</a>
* @author Matthias Fraass
*/
@Stateless // dependency injection won't work without that
@Path("/jms")
public class SimpleJMSRestfulWebService {
@Resource(mappedName = "SimpleConnectionFactory") //= connection factorie's JNDI name
private ConnectionFactory connectionFactory;
@Resource(mappedName = "SimpleQueue") //= Queue's JNDI name
private Queue queue;
/**
* Our RESTful webservice
*/
@GET
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public String putMessage() throws NamingException, JMSException, NotSupportedException, SystemException, SecurityException, IllegalStateException, RollbackException, HeuristicMixedException, HeuristicRollbackException {
System.out.println("called putMessage");
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer(queue);
long start = System.currentTimeMillis();
int i=0;
do {
TextMessage message = session.createTextMessage();
message.setText("Hello, JMS! #"+start);
messageProducer.send(message);
i++;
} while (i < 1000);
long now = System.currentTimeMillis();
return "JMS produced 1000 messages within " + (now-start) + "ms";
}
}
SimpleMessageDrivenBean 包含在父项目 JMS1 的 EJB 模块中(如教程中所示)
package de.datagroup.jms;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
/**
* Simple message driven bean.
*/
@MessageDriven(mappedName = "SimpleQueue")
public class SimpleMessageDrivenBean implements MessageListener {
/**
* Default constructor.
*/
public SimpleMessageDrivenBean() {
}
/**
* @see MessageListener#onMessage(Message)
*/
@Override
public void onMessage(Message message) {
try {
System.out.println("Got message: " + ((TextMessage) message).getText() + " @" + System.currentTimeMillis());
} catch (JMSException e) {
e.printStackTrace();
}
}
}
web.xml Jersey 2.x 不需要 web.xml
所以我删除了它。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>restful-webservice</display-name>
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>org.glassfish.jersey.config.property.resourceConfigClass</param-name>
<param-value>org.glassfish.jersey.api.core.PackagesResourceConfig</param-value>
</init-param>
<init-param>
<param-name>org.glassfish.jersey.config.property.packages</param-name>
<param-value>de.datagroup.jms</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
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>
<context-root>/restful-webservice</context-root>
</glassfish-web-app>
最佳答案
我认为在你的 glassfish-web.xml 中你已经将 context-root 定义为 '/restful-webservice' 而它在其他地方被定义为 'restful-webservice' (没有初始的正斜杠)。我认为它们应该全面一致。
关于java - 使用 Glassfish 和 RESTful Web 服务响应 404 错误的简单 JMS 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49239579/
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: Sample data for IPv6? 除了 wireshark 在其网站上提供的内容之外,是否有可以下
我正在寻找可以集成到现有应用程序中并使用多拖放功能的示例或任何现成的解决方案。我在互联网上找到的大多数解决方案在将多个项目从 ListBox 等控件拖放到另一个 ListBox 时效果不佳。谁能指出我
我是 GATE Embedded 的新手,我尝试了简单的示例并得到了 NoClassDefFoundError。首先我会解释我尝试了什么 在 D:\project\gate-7.0 中下载并提取 Ga
是否有像 Eclipse 中的 SWT 示例那样的多合一 JFace 控件示例?搜索(在 stackoverflow.com 上使用谷歌搜索和搜索)对我没有帮助。 如果它是一个独立的应用程序或 ecl
我找不到任何可以清楚地解释如何通过 .net API(特别是 c#)使用谷歌计算引擎的内容。有没有人可以指点我什么? 附言我知道 API 引用 ( https://developers.google.
最近在做公司的一个项目时,客户需要我们定时获取他们矩阵系统的数据。在与客户进行对接时,提到他们的接口使用的目前不常用的BASIC 认证。天呢,它好不安全,容易被不法人监听,咋还在使用呀。但是没办法呀,
最近在做公司的一个项目时,客户需要我们定时获取他们矩阵系统的数据。在与客户进行对接时,提到他们的接口使用的目前不常用的BASIC 认证。天呢,它好不安全,容易被不法人监听,咋还在使用呀。但是没办法呀,
我正在尝试为我的应用程序设计配置文件格式并选择了 YAML。但是,这(显然)意味着我需要能够定义、解析和验证正确的 YAML 语法! 在配置文件中,必须有一个名为 widgets 的集合/序列。 .这
你能给我一个使用 pysmb 库连接到一些 samba 服务器的例子吗?我读过有类 smb.SMBConnection.SMBConnection(用户名、密码、my_name、remote_name
linux服务器默认通过22端口用ssh协议登录,这种不安全。今天想做限制,即允许部分来源ip连接服务器。 案例目标:通过iptables规则限制对linux服务器的登录。 处理方法:编
我一直在寻找任何 PostProjectAnalysisTask 工作代码示例,但没有看。 This页面指出 HipChat plugin使用这个钩子(Hook),但在我看来它仍然使用遗留的 Po
我发现了 GWT 的 CustomScrollPanel 以及如何自定义滚动条,但我找不到任何示例或如何设置它。是否有任何示例显示正在使用的自定义滚动条? 最佳答案 这是自定义 native 滚动条的
我正在尝试开发一个 Backbone Marionette 应用程序,我需要知道如何以最佳方式执行 CRUD(创建、读取、更新和销毁)操作。我找不到任何解释这一点的资源(仅适用于 Backbone)。
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题?通过 editing this post 添加详细信息并澄清问题. 去年关闭。 Improve this
我需要一个提交多个单独请求的 django 表单,如果没有大量定制,我找不到如何做到这一点的示例。即,假设有一个汽车维修店使用的表格。该表格将列出商店能够进行的所有可能的维修,并且用户将选择他们想要进
我有一个 Multi-Tenancy 应用程序。然而,这个相同的应用程序有 liquibase。我需要在我的所有数据源中运行 liquibase,但是我不能使用这个 Bean。 我的应用程序.yml
我了解有关单元测试的一般思想,并已在系统中发生复杂交互的场景中使用它,但我仍然对所有这些原则结合在一起有疑问。 我们被警告不要测试框架或数据库。好的 UI 设计不适合非人工测试。 MVC 框架不包括一
我正在使用 docjure并且它的 select-columns 函数需要一个列映射。我想获取所有列而无需手动指定。 如何将以下内容生成为惰性无限向量序列 [:A :B :C :D :E ... :A
$condition使用说明和 $param在 findByAttributes在 Yii 在大多数情况下,这就是我使用 findByAttributes 的方式 Person::model()->f
我在 Ubuntu 11.10 上安装了 qtcreator sudo apt-get install qtcreator 安装的版本有:QT Creator 2.2.1、QT 4.7.3 当我启动
我是一名优秀的程序员,十分优秀!