cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: About Distributed OSGi greeter_rest demo
Date Mon, 24 Dec 2012 10:17:53 GMT
Hi,
On 24/12/12 03:35, Tang Yong wrote:
> Hi Sergey,
> 
>> In fact I'm now seeing greeter_rest working exactly as expected, by
>> invoking both endpoints from the browser and greeter_rest client UI
>> panels,
> 
> Yes, after re-confirmation using the newest source, I have also invoked
> both endpoints from the browser and client UI panels successfully.

After the update to a single bundle distro ?

> 
>> Though, I'm seeing the trunk tests hanging, with and without the update
>> to a single bundle distro, I'm certain they passed OK for me few days
>> ago - can Christian or yourself reproduce ?
> 
> I want to ask which test, systests?systests2?
> 

systests2/single bundle, on shutdown, after applying a patch now
attached to DOSGi-106

> In addition, if greeter_rest working normally, I want to ask the exact
> meaning of DOSGi-145?
> 
This was reported against a multi-bundle distro - we can close this
issue if we can confirm it all works OK with a multi-bundle distro

Cheers, Sergey

> Thanks
> --Tang
> 
> Sergey Beryozkin wrote:
>> In fact I'm now seeing greeter_rest working exactly as expected, by
>> invoking both endpoints from the browser and greeter_rest client UI panels,
>>
>> I added the internal activator as you found out to a single bundle
>> distro - thanks for that - I've confirmed it is now possible to bind to
>> HttpService when a single bundle is used too...
>>
>> Though, I'm seeing the trunk tests hanging, with and without the update
>> to a single bundle distro, I'm certain they passed OK for me few days
>> ago - can Christian or yourself reproduce ?
>> I wonder if it's transient, may be PaxRunner is sensitive to some Apache
>> or Codehauz repos being down, etc ?
>>
>> Sergey
>>
>>
>> On 21/12/12 10:04, Sergey Beryozkin wrote:
>>> Hi Tang,
>>>
>>> thanks for all the feedback so far,
>>> On 21/12/12 09:53, Tang Yong wrote:
>>>> Deeply, this difference of handling logic is caused by a config prop
>>>> called "org.apache.cxf.rs.httpservice.context".
>>>>
>>>> While org.apache.cxf.rs.httpservice.context is not null(specified by
>>>> user),  HttpServiceManager.getHttpService() will be called.
>>>>
>>>> However, in greeter demo, the prop is not specified.
>>>>
>>>> Pl. seeing JaxRSPojoConfigurationTypeHandler 123 line
>>> Yes - and in fact it simply confirms the issue will exist for JAX-WS
>>> endpoints, if
>>> "org.apache.cxf.ws.httpservice.context" is used - you can modify the
>>> greeter demo and see it.
>>>
>>> Hence I'm not exactly sure if we should let this regression fixed at a
>>> later stage or not; I honestly do not know if JAX-WS users tried using
>>> more than one context withing a single bundle or not;
>>>
>>> "org.apache.cxf.rs/ws.httpservice.context" is used to link directly to
>>> HTTP Service, while using relative addresses such as
>>> "org.apache.cxf.ws.address" or "org.apache.cxf.rs.address" with values
>>> like "/1", "/2" should bind the endpoint to Http Service indirectly via
>>> CXF Servlet transport with all the endpoints sharing the same context
>>> such as "/cxf" or "/services".
>>>
>>> Can you consider using a demo and try to see where the problem is ? I'm
>>> suspecting it may be at a lower level, below DSW - given that we started
>>> seeing the issue with the latest upgrades
>>>
>>>
>>> Thanks, Sergey
>>>
>>>> Thanks
>>>> --Tang
>>>>
>>>> Tang Yong wrote:
>>>>> Maybe you can ask why greeter demo can work normally using http service?
>>>>>
>>>>> The reason is that handling logics of jax ws and jax rs scenes are
>>>>> different.
>>>>>
>>>>> In jax rs scene, http service is obtained by
>>>>> HttpServiceManager.getHttpService() , and needing a http service impl
is
>>>>> registered into OSGi registry ahead of time.
>>>>>
>>>>> However,in jax ws scene, http server with jax ws endpoint is created
>>>>> using AbstractPojoConfigurationTypeHandler.createServerFromFactory.
>>>>>
>>>>> So, if you do not specify an activator(eg. from
>>>>> pax-web-jetty-1.0.11.jar) in activators.list which can register a http
>>>>> service impl, HttpServiceManager.getHttpService() will be failed.
>>>>>
>>>>> Thanks
>>>>> --Tang
>>>>>
>>>>> Tang Yong wrote:
>>>>>> Then, I added org.ops4j.pax.web.service.jetty.internal.Activator
into
>>>>>> activators.list and re-launched felix and installed/started greeter_rest
>>>>>> demo, now the exception does not happen,
>>>>>>
>>>>>> D:\gf\org.apache.felix.main.distribution-4.0.3_1\felix-framework-4.0.3>java
>>>>>> -jar bin\felix.jar
>>>>>> ____________________________
>>>>>> Welcome to Apache Felix Gogo
>>>>>>
>>>>>> g! install file:/d:/gf/org.osgi.compendium-4.2.0.jar
>>>>>> Bundle ID: 6
>>>>>> g! start file:/d:/gf/cxf-dosgi-ri-singlebundle-distribution-1.4-SNAPSHOT.jar
>>>>>> g! log4j:WARN No appenders could be found for logger
>>>>>> (org.apache.zookeeper.ZooKeeper).
>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>> start
>>>>>> file:/d:/gf/cxf-dosgi-ri-samples-greeter-rest-interface-1.4-SNAPSHOT.jar
>>>>>> g! start file:/d:/gf/cxf-dosgi-ri-samples-greeter-rest-impl-1.4-SNAPSHOT.jar
>>>>>> g! 12 21, 2012 12:17:00 午後 org.apache.cxf.endpoint.ServerImpl
>>>>>> initDestination
>>>>>> INFO: Setting the server's publish address to be
>>>>>> /org/apache/cxf/dosgi/samples/greeter/rest/GreeterService
>>>>>> 12 21, 2012 12:17:00 午後 org.apache.cxf.endpoint.ServerImpl initDestination
>>>>>> INFO: Setting the server's publish address to be
>>>>>> /org/apache/cxf/dosgi/samples/greeter/rest/GreeterService2
>>>>>>
>>>>>> So, please team confirmed the issue.
>>>>>>
>>>>>> Thanks
>>>>>> --Tang
>>>>>>
>>>>>> Tang Yong wrote:
>>>>>>> I have done a initial investigation on the exception,
>>>>>>> Apparently, not any HttpService impl is registered.
>>>>>>>
>>>>>>> Although in activators.list,
>>>>>>> org.ops4j.pax.web.service.internal.Activator is written, whether
having
>>>>>>> other reqiured activator(for example,
>>>>>>> org.ops4j.pax.web.service.jetty.internal.Activator) used for
registering
>>>>>>> a HttpService impl is missing or not?
>>>>>>>
>>>>>>> Thanks
>>>>>>> --Tang
>>>>>>>
>>>>>>> Tang Yong wrote:
>>>>>>>> In addition,
>>>>>>>>
>>>>>>>> Does not the exception happened while trigging
>>>>>>>> https://issues.apache.org/jira/browse/DOSGI-145?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> --Tang
>>>>>>>>
>>>>>>>> Tang Yong wrote:
>>>>>>>>> Hi Team,
>>>>>>>>>
>>>>>>>>> About Distributed OSGi greeter_rest demo[1],
>>>>>>>>> [1]: http://cxf.apache.org/distributed-osgi.html
>>>>>>>>>
>>>>>>>>> here there are some problems:
>>>>>>>>>
>>>>>>>>> 1 link[2] of greeter_rest demo is not right
>>>>>>>>> [2]: http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html
>>>>>>>>>
>>>>>>>>> 2 about greeter_rest demo[3]'s running
>>>>>>>>> [3]: http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest
>>>>>>>>>
>>>>>>>>> Using the following steps, while installing and starting
>>>>>>>>> cxf-dosgi-ri-samples-greeter-rest-impl-1.4-SNAPSHOT.jar,
an exception
>>>>>>>>> happened:
>>>>>>>>>
>>>>>>>>> ____________________________
>>>>>>>>> Welcome to Apache Felix Gogo
>>>>>>>>>
>>>>>>>>> g! lb
>>>>>>>>> START LEVEL 1
>>>>>>>>>       ID|State      |Level|Name
>>>>>>>>>        0|Active     |    0|System Bundle (4.0.3)
>>>>>>>>>        1|Active     |    1|Apache Log4J (1.2.15)
>>>>>>>>>        2|Active     |    1|Apache Felix Bundle Repository
(1.6.6)
>>>>>>>>>        3|Active     |    1|Apache Felix Gogo Command
(0.12.0)
>>>>>>>>>        4|Active     |    1|Apache Felix Gogo Runtime
(0.10.0)
>>>>>>>>>        5|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>>>>>>>>> g! install file:/d:/gf/org.osgi.compendium-4.2.0.jar
>>>>>>>>> Bundle ID: 6
>>>>>>>>> g! lb
>>>>>>>>> START LEVEL 1
>>>>>>>>>       ID|State      |Level|Name
>>>>>>>>>        0|Active     |    0|System Bundle (4.0.3)
>>>>>>>>>        1|Active     |    1|Apache Log4J (1.2.15)
>>>>>>>>>        2|Active     |    1|Apache Felix Bundle Repository
(1.6.6)
>>>>>>>>>        3|Active     |    1|Apache Felix Gogo Command
(0.12.0)
>>>>>>>>>        4|Active     |    1|Apache Felix Gogo Runtime
(0.10.0)
>>>>>>>>>        5|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>>>>>>>>>        6|Installed  |    1|osgi.cmpn (4.2.0.200908310645)
>>>>>>>>> g! start file:/d:/gf/cxf-dosgi-ri-singlebundle-distribution-1.4-SNAPSHOT.jar
>>>>>>>>> g! log4j:WARN No appenders could be found for logger
>>>>>>>>> (org.apache.zookeeper.ZooKeeper).
>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>> lb
>>>>>>>>> START LEVEL 1
>>>>>>>>>       ID|State      |Level|Name
>>>>>>>>>        0|Active     |    0|System Bundle (4.0.3)
>>>>>>>>>        1|Active     |    1|Apache Log4J (1.2.15)
>>>>>>>>>        2|Active     |    1|Apache Felix Bundle Repository
(1.6.6)
>>>>>>>>>        3|Active     |    1|Apache Felix Gogo Command
(0.12.0)
>>>>>>>>>        4|Active     |    1|Apache Felix Gogo Runtime
(0.10.0)
>>>>>>>>>        5|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>>>>>>>>>        6|Resolved   |    1|osgi.cmpn (4.2.0.200908310645)
>>>>>>>>>        7|Active     |    1|Distributed OSGi Distribution
Software
>>>>>>>>> Single-Bundle Distribution (1.4.0.SNAPSHOT)
>>>>>>>>> g! start
>>>>>>>>> file:/d:/gf/cxf-dosgi-ri-samples-greeter-rest-interface-1.4-SNAPSHOT.jar
>>>>>>>>> g! start file:/d:/gf/cxf-dosgi-ri-samples-greeter-rest-impl-1.4-SNAPSHOT.jar
>>>>>>>>> g! Exception in thread "pool-1-thread-2"
>>>>>>>>> org.osgi.framework.ServiceException: CXF DOSGi: problem
registering CXF
>>>>>>>>> HTTP Servlet
>>>>>>>>> Exception in thread "pool-1-thread-1"   at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:84)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.JaxRSPojoConfigurationTypeHandler.createServer(JaxRSPojoConfigurationTypeHandler.java:123)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:123)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:70)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:64)
>>>>>>>>>            at java.security.AccessController.doPrivileged(Native
Method)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:64)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:37)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.doExportService(TopologyManagerExport.java:250)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.access$200(TopologyManagerExport.java:51)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport$3.run(TopologyManagerExport.java:214)
>>>>>>>>>            at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>>>>>>>>            at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>>>>>>>>            at java.lang.Thread.run(Thread.java:722)
>>>>>>>>> Caused by: java.lang.RuntimeException: No HTTPService
found
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.getHttpService(HttpServiceManager.java:92)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:77)
>>>>>>>>>            ... 13 more
>>>>>>>>> org.osgi.framework.ServiceException: CXF DOSGi: problem
registering CXF
>>>>>>>>> HTTP Servlet
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:84)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.JaxRSPojoConfigurationTypeHandler.createServer(JaxRSPojoConfigurationTypeHandler.java:123)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:123)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:70)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:64)
>>>>>>>>>            at java.security.AccessController.doPrivileged(Native
Method)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:64)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:37)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.doExportService(TopologyManagerExport.java:250)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.access$200(TopologyManagerExport.java:51)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport$3.run(TopologyManagerExport.java:214)
>>>>>>>>>            at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>>>>>>>>            at
>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>>>>>>>>            at java.lang.Thread.run(Thread.java:722)
>>>>>>>>> Caused by: java.lang.RuntimeException: No HTTPService
found
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.getHttpService(HttpServiceManager.java:92)
>>>>>>>>>            at
>>>>>>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:77)
>>>>>>>>>            ... 13 more
>>>>>>>>> gosh: stopping framework
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>
>>
> 

Mime
View raw message