- 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 http://localhost:8080/webservicetest/jms
* @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;
LÀM {
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)
*/
@Ghi đè
public void onMessage(Message message) {
thử {
System.out.println("Got message: " + ((TextMessage) message).getText() + " @" + System.currentTimeMillis());
} catch (JMSException e) {
e.printStackTrace();
}
}
}
web.xml Jersey 2.x 不需要 web.xml
所以我删除了它。
restful-webservice
Jersey Web Application
org.glassfish.jersey.servlet.ServletContainer
org.glassfish.jersey.config.property.resourceConfigClass
org.glassfish.jersey.api.core.PackagesResourceConfig
org.glassfish.jersey.config.property.packages
de.datagroup.jms
1
Jersey Web Application
/*
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
glassfish-web.xml
/restful-webservice
1 Câu trả lời
我认为在你的 glassfish-web.xml 中你已经将 context-root 定义为 '/restful-webservice' 而它在其他地方被定义为 'restful-webservice' (没有初始的正斜杠)。我认为它们应该全面一致。
关于java - 使用 Glassfish 和 RESTful Web 服务响应 404 错误的简单 JMS 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49239579/
Tôi có một ứng dụng Maven/Grails sắp được xây dựng, nhưng không tìm thấy web.xml tại [my-app]\webapp\WEB-INF\web.xml. Nhưng cấu trúc thư mục chứa thư mục ứng dụng web như bình thường, thay vì
Như tôi đã đề cập trong tiêu đề: Tôi muốn biết sự khác biệt giữa web-service và web-socket? Khi nào chúng ta sử dụng từng loại? Cảm ơn bạn! Câu trả lời hay nhất Một dịch vụ web là một máy khách phản hồi SOAP/REST
Hãy cùng xem một tình huống mẫu: Một khách hàng mở một trang web và tìm tổng của hai số mà anh ta nhập vào từ một hộp văn bản. Sau đó nhấp vào nút Thêm. Hai tham số được gửi đến máy chủ thông qua HTTP GET, mã PHP được viết trên máy chủ để thêm các số và kết quả được phản hồi
Tôi biết đây là một câu hỏi cũ và đã được trả lời hàng trăm lần, nhưng tôi vẫn chưa tìm được câu trả lời thỏa đáng. Tôi đang tạo một ứng dụng sẽ được các ứng dụng khác (di động/web) sử dụng để lấy dữ liệu. Bây giờ tôi có hai lựa chọn: Tạo ứng dụng của tôi như một ứng dụng đơn giản
Có 3 cách để triển khai các chức năng mới thông qua WebJobs: Tạo một ứng dụng web mới và triển khai một WebJob chứa chức năng đó. Thêm một chức năng mới vào WebJob hiện có (vì vậy bây giờ bạn có nhiều chức năng trong một WebJob)
Tôi nhận được thông báo từ trang web nói rằng "Có sự cố" và "Được". Tôi muốn đưa vào nội dung phản hồi của mạng khi sự cố xảy ra. Tôi không lo lắng về giá trị tiêu đề, chỉ lo lắng về nội dung của trang web. Đây có phải là biến tôi có thể tham chiếu trong cài đặt thông báo không? Câu trả lời hay nhất: Thật không may, Zabbix không
Hiện tại, câu hỏi này không phù hợp với định dạng Hỏi & Đáp của chúng tôi. Chúng tôi mong đợi câu trả lời được hỗ trợ bằng sự kiện, trích dẫn hoặc chuyên môn, nhưng câu hỏi này có thể gây ra tranh luận, tranh cãi, thăm dò ý kiến hoặc thảo luận mở rộng. Nếu bạn cảm thấy câu hỏi này có thể được cải thiện và có thể mở lại, hãy truy cập
Xin chào, đây là một câu hỏi lý thuyết nhưng tôi thực sự không thể hiểu được sự khác biệt giữa ứng dụng web, ứng dụng dựa trên web và ứng dụng dựa trên đám mây. Bạn có thể giúp tôi việc này được không? Câu trả lời hàng đầu @Matt đúng - thực sự không quan trọng, nhưng để rõ ràng hơn
Tôi đang cố gắng sử dụng nhiều dịch vụ web định nghĩa lại một số lớp công khai giống nhau trong wsdl của chúng. Hiện tại tôi đang tham khảo chúng trên một trang web, nhưng tôi muốn chuyển đổi thành một ứng dụng web. Vì một số lớp giống nhau đến từ nhiều Web
một. Tôi cần phải cân nhắc những điều gì? b. Ứng dụng hiện tại đang thực thi nhiều thủ tục được lưu trữ. Những rủi ro hoặc thách thức nào sẽ xảy ra nếu tôi tạo ra những phương pháp tương đương để thực hiện những quy trình này? Câu trả lời hay nhất: Về mặt kiến trúc, một điều bạn phải cân nhắc khi chuyển đổi ứng dụng web thành dịch vụ web là cách tiếp cận và
đóng cửa. Câu hỏi này không đáp ứng được hướng dẫn của Stack Overflow. Hiện tại câu hỏi này không chấp nhận câu trả lời. Bạn muốn cải thiện vấn đề này? Cập nhật câu hỏi để nó phù hợp với chủ đề của Stack Overflow. Đã đóng cửa 5 năm trước. Cải thiện điều này
Có sự khác biệt nào giữa API web và dịch vụ web không? Hay chúng là một và giống nhau? Câu trả lời hay nhất Các dịch vụ web thường cung cấp WSDL mà từ đó bạn có thể tự động tạo một stub máy khách. Dịch vụ web dựa trên giao thức SOAP. ASP.NE
Tôi đã được cung cấp mọi nguồn lực tôi cần. Tôi đặt dịch vụ web vào môi trường dịch vụ ứng dụng và sau đó đính kèm NSG vào mạng con được môi trường dịch vụ ứng dụng sử dụng. Sau đó tôi cho phép ứng dụng bên trong VNET giao tiếp với dịch vụ web nhưng nó không hoạt động
Tôi đã được cung cấp mọi nguồn lực tôi cần. Tôi đặt dịch vụ web vào môi trường dịch vụ ứng dụng và sau đó đính kèm NSG vào mạng con được môi trường dịch vụ ứng dụng sử dụng. Sau đó tôi cho phép ứng dụng bên trong VNET giao tiếp với dịch vụ web nhưng nó không hoạt động
Tôi đang sử dụng stub để tách các thử nghiệm liên quan đến dịch vụ web của mình khỏi dịch vụ web thực tế. Bạn/tôi nên kết hợp thử nghiệm như thế nào để đảm bảo phản hồi tôi tạo ra khớp với dịch vụ web thực tế (mà tôi không kiểm soát được)? Tôi không muốn biết bằng cách nào, nhưng khi nào và ở đâu? Tôi nên kiểm tra dữ liệu
Tôi đã tìm kiếm rất nhiều trên internet nhưng vẫn không hiểu rõ sự khác biệt giữa dịch vụ web và api web? Tôi đọc ở đâu đó rằng tất cả các dịch vụ web đều là API, nhưng không phải tất cả API đều là dịch vụ web. Làm sao? Tất cả những gì tôi biết là cả hai đều cho phép sử dụng các
Giả sử tôi đã hoàn thành một ứng dụng web được tạo bằng JavaEE. Ứng dụng web này bao gồm một hệ thống đăng nhập, nhưng thực chất đây chỉ là một ứng dụng web rất cơ bản. Tôi đang sử dụng GlassFish 3.1.2.2. Tôi muốn biết một lần
Tôi muốn nhà thiết kế có thể mở cùng một tệp giải pháp như tôi. Điều này có thể thực hiện được với Expressions Web không? Câu trả lời hay nhất Câu trả lời ngắn gọn là "không"; nhưng đây là một yêu cầu rất phổ biến và tôi biết rất nhiều người đang hy vọng bản phát hành tiếp theo (dù là khi nào) sẽ có tính năng này.
Tôi đang cố gắng tạo một đối tượng dịch vụ web trong CF10. Tôi đã xác minh rằng nó hoạt động như mong đợi trong SoapUI. Tuy nhiên, khi tôi chạy nó trong CF, tôi nhận được lỗi là không tìm thấy XSD được nhập trong câu lệnh import trong WSDL. Đây là
Yêu cầu của tôi là phát triển một dịch vụ web đóng vai trò trung gian giữa các dịch vụ web bên ngoài và khách hàng. Tôi biết rằng tôi có thể thiết kế một wsdl cho dịch vụ của mình và sau đó ánh xạ wsdl bên ngoài vào wsdl của tôi trong mã. Câu hỏi của tôi là có một api/công cụ nguồn mở không?
Tôi là một lập trình viên xuất sắc, rất giỏi!