不能在OSGi中使用Jetty WebSocket客户端

时间:2014-09-30 16:08:46

标签: websocket jetty client osgi equinox

我们希望在OSGi(Equinox)中使用Jetty WebSocket Client API。

我已使用org.eclipse.jetty.websocket.api.annotations.WebSocket注释客户端套接字实现,但遇到InvalidWebSocketException

MySocket is not a valid WebSocket object.  Object must obey one of the following rules: 
(1) class implements org.eclipse.jetty.websocket.api.WebSocketListener or 
(2) class is annotated with @org.eclipse.jetty.websocket.api.annotations.WebSocket

如果我从Eclipse中独立运行服务(创建MySocket),它可以正常工作。

正如Establishing a WebSocket client connection in Jetty?中提出的那样,我没有使用Jetty的实际版本,而是9.2.0.RC0

编辑:使用Jetty 9.2.3.v20140905我收到同样的错误。

也许对其他一些捆绑有干扰? (我们正在使用apache-cxf-dosgi-ri-1.5.0所以有很多捆绑...)

com.basho.riak.client_1.4.4
com.eclipsesource.jaxrs.jersey-all_2.10.1
com.eclipsesource.jaxrs.publisher_3.0.0.201306171539
com.fasterxml.jackson.core.jackson-annotations_2.2.2
com.fasterxml.jackson.core.jackson-core_2.2.2
com.fasterxml.jackson.core.jackson-databind_2.2.2
com.googlecode.json-simple_1.1.1
com.rabbitmq.client_3.3.2
com.sun.jersey.client_1.18.1
com.sun.jersey.core_1.18.1
com.sun.jersey.jersey-server_1.18.1
cxf-dosgi-ri-discovery-distributed_1.6.0
cxf-dosgi-ri-discovery-distributed-zookeeper-server_1.6.0
cxf-dosgi-ri-discovery-local_1.6.0
cxf-dosgi-ri-dsw-cxf_1.6.0
cxf-dosgi-ri-osgi-api_1.6.0
cxf-dosgi-ri-topology-manager_1.6.0
jackson-core-asl_1.9.13
jackson-mapper-asl_1.9.13
javax.annotation-api_1.2.0
javax.mail_1.4.4
javax.mail_1.4.5
javax.servlet_2.5.0.v200806031605
javax.servlet-api_3.1.0
javax.websocket-api_1.1.0
javax.ws.rs-api_2.0.1
javax.xml_1.3.4.v201005080400
org.apache.aries.blueprint.api_1.0.0
org.apache.aries.blueprint.cm_1.0.1
org.apache.aries.blueprint.core_1.1.0
org.apache.aries.proxy.api_1.0.0
org.apache.aries.proxy.impl_1.0.1
org.apache.aries.util_1.1.0
org.apache.commons.beanutils_1.9.1
org.apache.commons.codec_1.3.0.v201101211617
org.apache.commons.codec_1.7.0
org.apache.commons.collections_3.2.1
org.apache.commons.el_1.0.0.v201101211617
org.apache.commons.io_2.4.0
org.apache.commons.lang3_3.3.2
org.apache.commons.logging_1.0.4.v201101211617
org.apache.commons.pool_1.6.0
org.apache.cxf.cxf-api_2.7.8
org.apache.cxf.cxf-rt-bindings-soap_2.7.8
org.apache.cxf.cxf-rt-bindings-xml_2.7.8
org.apache.cxf.cxf-rt-core_2.7.8
org.apache.cxf.cxf-rt-databinding-aegis_2.7.8
org.apache.cxf.cxf-rt-databinding-jaxb_2.7.8
org.apache.cxf.cxf-rt-frontend-jaxrs_2.7.8
org.apache.cxf.cxf-rt-frontend-jaxws_2.7.8
org.apache.cxf.cxf-rt-frontend-simple_2.7.8
org.apache.cxf.cxf-rt-management_2.7.8
org.apache.cxf.cxf-rt-rs-extension-providers_2.7.8
org.apache.cxf.cxf-rt-rs-extension-search_2.7.8
org.apache.cxf.cxf-rt-transports-http_2.7.8
org.apache.cxf.cxf-rt-transports-http-jetty_2.7.8
org.apache.cxf.karaf.cxf-karaf-commands_2.7.8
org.apache.felix.configadmin_1.6.0
org.apache.felix.fileinstall_3.2.6
org.apache.felix.gogo.command_0.8.0.v201108120515
org.apache.felix.gogo.runtime_0.8.0.v201108120515
org.apache.felix.gogo.shell_0.8.0.v201110170705
org.apache.felix.webconsole_3.1.8
org.apache.geronimo.specs.geronimo-annotation_1.0_spec_1.1.1
org.apache.geronimo.specs.geronimo-jta_1.1_spec_1.1.1
org.apache.geronimo.specs.geronimo-osgi-registry_1.1.0
org.apache.geronimo.specs.geronimo-servlet_2.5_spec_1.2.0
org.apache.hadoop.zookeeper_3.3.2
org.apache.httpcomponents.httpclient_4.3.3
org.apache.httpcomponents.httpcore_4.3.2
org.apache.jasper_5.5.17.v201101211617
org.apache.log4j_1.2.15.v201012070815
org.apache.servicemix.bundles.fastinfoset_1.2.13.1
org.apache.servicemix.bundles.jaxb-impl_2.2.1.1_2
org.apache.servicemix.bundles.jaxb-xjc_2.2.1.1_2
org.apache.servicemix.bundles.wsdl4j_1.6.3.1
org.apache.servicemix.bundles.xmlresolver_1.2.0.5
org.apache.servicemix.specs.activation-api-1.1_2.2.0
org.apache.servicemix.specs.jaxb-api-2.2_2.2.0
org.apache.servicemix.specs.jaxws-api-2.2_2.2.0
org.apache.servicemix.specs.jsr339-api-m10_2.2.0
org.apache.servicemix.specs.saaj-api-1.3_2.2.0
org.apache.servicemix.specs.stax-api-1.0_2.2.0
org.apache.ws.xmlschema.core_2.0.3
org.apache.xmlbeans_0.2.0.SNAPSHOT
org.codehaus.jettison.jettison_1.3.4
org.eclipse.equinox.console_1.0.0.v20120522-1841
org.eclipse.equinox.ds_1.1.1.R35x_v20090806
org.eclipse.equinox.event_1.1.101.R35x_v20100209
org.eclipse.equinox.log_1.2.0.v20090520-1800
org.eclipse.equinox.util_1.0.100.v20090520-1800
org.eclipse.jetty.client_7.6.8.v20121106
org.eclipse.jetty.continuation_7.6.8.v20121106
org.eclipse.jetty.http_7.6.8.v20121106
org.eclipse.jetty.io_7.6.8.v20121106
org.eclipse.jetty.io_9.2.0.RC0
org.eclipse.jetty.jmx_7.6.8.v20121106
org.eclipse.jetty.jndi_7.6.8.v20121106
org.eclipse.jetty.plus_7.6.8.v20121106
org.eclipse.jetty.security_7.6.8.v20121106
org.eclipse.jetty.server_7.6.8.v20121106
org.eclipse.jetty.servlet_7.6.8.v20121106
org.eclipse.jetty.servlets_7.6.8.v20121106
org.eclipse.jetty.util_7.6.8.v20121106
org.eclipse.jetty.util_9.2.0.RC0
org.eclipse.jetty.webapp_7.6.8.v20121106
org.eclipse.jetty.websocket.api_9.2.0.RC0
org.eclipse.jetty.websocket.client_9.2.0.RC0
org.eclipse.jetty.websocket.common_9.2.0.RC0
org.eclipse.jetty.websocket.javax.websocket_9.2.0.RC0
org.eclipse.jetty.websocket_7.6.8.v20121106
org.eclipse.jetty.xml_7.6.8.v20121106
org.eclipse.osgi.services_3.3.0.v20110513
org.eclipse.osgi.util_3.2.0.v20090520-1800
org.eclipse.osgi_3.8.0.v20120529-1548
org.json-wrapper_0.1.0.SNAPSHOT
org.ops4j.base.lang_1.4.0
org.ops4j.pax.logging.pax-logging-api_1.7.0
org.ops4j.pax.logging.pax-logging-service_1.7.0
org.ops4j.pax.web.pax-web-api_1.1.14
org.ops4j.pax.web.pax-web-extender-whiteboard_1.1.14
org.ops4j.pax.web.pax-web-jetty_1.1.14
org.ops4j.pax.web.pax-web-runtime_1.1.14
org.ops4j.pax.web.pax-web-spi_1.1.14
stax2-api_3.1.1
woodstox-core-asl_4.2.0

0 个答案:

没有答案