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 Thu, 27 Dec 2012 10:27:21 GMT
Hi Tang
On 25/12/12 02:47, Tang Yong wrote:
> Hi Sergey,
> 
> The attachment is my test result of systests2/single-bundle(after
> applying DOSGi-106 patch) and during test, single-bundle tests are not
> hanging, and anything looks fine.
> 
> Please seeing the attachment.
> 
Can you please run the tests from the root (with 'mvn clean install'),
as opposed from systests2/single-bundle ?

I'm seeing the tests hanged with the patch, and passing without it.
Thanks, Sergey

> Thanks
> --Tang
> 
> Tang Yong wrote:
>> Hi Sergey,
>>
>>> This is actually to do with HttpService not visible from within the
>>> single bundle distro - you fixed it last time by adding a Jetty internal
>>> activator to the activators list - while this is an open issue it is
>>> still not a blocking issue for the release I would say.
>> Yes, I see.
>>
>>> https://issues.apache.org/jira/browse/DOSGI-106
>> OK, I have seen it and thanks.
>>
>>> Only problem:
>>> single-bundle tests are hanging with this update - which is most likely
>>> a test issue (old pax dependencies).
>> I will see whether in my local env, single-bundle tests are hanging or
>> not. Once hanging, I will tell you and investigate it.
>>
>> Thanks
>> --Tang
>>
>> Sergey Beryozkin wrote:
>>> Hi Tang
>>> On 24/12/12 03:06, Tang Yong wrote:
>>>> Hi Sergey,
>>>>
>>>> I have updated my local source with trunk and modified greeter demo, and
>>>> added "org.apache.cxf.ws.httpservice.context" property.
>>>>
>>>> While deploying modified greeter demo, on single-bundle scene, the same
>>>> issue happened again just as you said:
>>>>
>>>> org.osgi.framework.ServiceException: CXF DOSGi: problem registering CXF
>>>> HTTP Servlet
>>>>           at
>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:82)
>>>>           at
>>>> org.apache.cxf.dosgi.dsw.handlers.PojoConfigurationTypeHandler.createServer(PojoConfigurationTypeHandler.java:100)
>>>> ...
>>>>           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:90)
>>>>           at
>>>> org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:75)
>>>>           ... 13 more
>>>>
>>> This is actually to do with HttpService not visible from within the
>>> single bundle distro - you fixed it last time by adding a Jetty internal
>>> activator to the activators list - while this is an open issue it is
>>> still not a blocking issue for the release I would say.
>>>
>>>>> "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".
>>>> Thanks your explaination!
>>>>
>>>> In addition, the issue will also happen once one of the following
>>>> properties is set by an user.
>>>>
>>>> 1) "org.apache.cxf.ws.httpservice.context"
>>>> 2) "osgi.remote.configuration.pojo.httpservice.context"
>>>> 3) "osgi.remote.configuration.wsdl.httpservice.context"
>>>> 4) "org.apache.cxf.rs.httpservice.context"
>>>>
>>>> So, I suggest that we should launch a new issue related the issue other
>>>> than DOSGi-145, do you agree with me?
>>>>
>>> We have the issue open for it:
>>>
>>> https://issues.apache.org/jira/browse/DOSGI-106
>>>
>>> I've attached a patch to it based on your feedback - effectively it is
>>> your patch :-).
>>> I think the patch is good - I validated it last week and I was able to
>>> deploy a greeter_rest demo with a single bundle distro. Only problem:
>>> single-bundle tests are hanging with this update - which is most likely
>>> a test issue (old pax dependencies).
>>>
>>> The actual issue/regression is that no two endpoints bound to
>>> HttpService  can be correctly deployed from within the same bundle - I
>>> thought it worked for me OK last week - but you said it was not for
>>> you... Can you double check please after getting a single bundle distro
>>> fix into your local trunk ?
>>>
>>> Thanks, Sergey
>>>
>>>> Thanks
>>>> --Tang
>>>>
>>>> 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
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>
>>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message