- 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/
我们正在创建一个 n 层 Silverlight LOB 应用程序,并且正在考虑使用 .NET RIA 服务。我们不清楚这与我们当前的 WCF 服务 API 的关系在哪里。我们当前的架构是: 银光
上下文:我在celery + rabbitmq堆栈上有一个主工作系统。 系统已docker化(此处未提供worker服务) version: '2' services: rabbit:
我是 Windows Azure 新手,我正在尝试将我的 Web 应用程序部署到 Windows Azure。在我的应用程序中,我使用了一些 Web 服务,现在我想知道如何在 Windows Azur
因此,根据我对服务的了解,自定义对象似乎是写入服务以返回数据的方式。如果我正在编写将用于 1) 填充数据库或 2) 为网站提供信息的服务,是否有返回数据集/数据表而不是包含所有这些的自定义对象列表的用
我在 google 和 stackoverflow 上都找过答案,但似乎找不到。我正在尝试将 azure 实验的输出获取到应用程序。我使用 ibuildapp 和谷歌表单制作了该应用程序。如何使用 g
我不小心删除了 kubernetes svc: service "kubernetes" deleted 使用: kubectl delete svc --all 我该怎么办?我只是想删除服务,以便
我正在努力确定解决网络服务问题的最有效方法。 我的情况:我正在开发一个 Android 应用程序,它通过 Web 服务从 mysql 数据库(在我自己的服务器 PC 上)存储和检索数据。用户按下提交按
我一直在翻阅 Android 文档,我很好奇。什么时候绑定(bind)服务而不是不绑定(bind)服务?它提供了哪些优点/限制? 最佳答案 When would you bind a service
我试图从架构的角度理解 hive,我指的是 Tom White 关于 Hadoop 的书。 我遇到了以下关于配置单元的术语:Hive Services、hiveserver2、metastore 等。
我的问题:安装服务后我无法导航到基地址,因为服务不会继续运行(立即停止)。我需要在服务器或我的机器上做些什么才能使 baseAddress 有效吗? 背景:我正在尝试学习如何使用 Windows 服务
我正在努力就 Web 服务的正确组织做出决定。我应该有多个 ASMX 来代表 Web 服务中的不同功能,还是应该有一个 ASMX? 如果我有多个 ASMX,这不构成多个 Web 服务吗? 如果我只有一
我正在从事一个在 azure 平台上提供休息服务的项目。该服务由 iPhone 客户端使用,这是选择其余方法的重要原因之一。 我们希望通过 AccessControlService(ACS) 并使用
我是 Ionic 新手,正在使用 Ionic 3.9.2 我有几个终端命令来为我的 ionic 应用程序提供服务,但是,我没有发现这两个命令之间有任何区别。 ionic serve 和 ionic s
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
作为项目的一部分,我期待着问这个问题。我过去有开发和使用 Web 服务的经验,并且非常熟悉这些服务。但是,有人告诉我,作为下一个项目的一部分,我将需要使用“安全”的 Web 服务。您能否提供一些见解,
我浏览了很多关于这个问题的信息,但找不到解决方案。这里的问题是,我想使用 Apache Cordova 和 Visual Studio 连接到 wcf。因此,如果有人找到合适的工作解决方案,请发布链接
我在 Windows 服务中托管了一个 WCF(从 MS 网站示例中选取),我可以使用 SOAP UI 访问和调用方法。但是,当我尝试使用 jquery 从 Web 应用程序调用相同的方法时,我不断收
我们构建了一个 Android 应用程序,它从 Android 向我的 PHP 服务器发送 HTTP 请求。作为响应,Web 服务将 JSON 对象发送到 Android 应用程序以显示结果。 就像其
我想在 android 应用程序中调用 soap web 服务,它需要一个枚举值作为参数,它是一个标志枚举。如何从 Android 应用程序将一些值作为标志枚举传递给此 Web 服务方法? 我使用 K
我尝试在模拟器上安装 Google Play。我已按照 Google Dev Site 中的说明进行操作. 使用 ADV 管理器似乎没问题,设备的目标是 Google API 版本 22,但是当我运行
我是一名优秀的程序员,十分优秀!