You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Ge@@ru" <ge...@gmail.com> on 2011/12/16 20:29:22 UTC
Problem on use cxf on offline environment (on smx-4.4.x)
I don't know if we have ready for smx-4.4.0 :'(
I'm trying to use cxf on offline environment but I haven't found yet a
solution.
* With blueprint + cxf it isn't possible deploy cxf bundle for problem
describe on SMX-1003 (https://issues.apache.org/jira/browse/ARIES-626)
* With spring there is a problem like for blueprint. Spring try to
download jaxrs.xsd and then doesn't start correctly (after a smx
restart)
smx@root> features:install examples-cxf-jaxrs
smx@root> shutdown
... restart of smx
(here sniffing of http request from smx)
127.0.0.1 - - [16/Dec/2011:20:17:36 +0100] "GET
http://cxf.apache.org/schemas/jaxrs.xsd HTTP/1.1" 200 9161
..
(here bundle is Active but not Started (only an osgi:update or a
redeploy set status to Started))
On production environment normally smx will be on offline environment,
so, is it right release a smx-4.4.0 where isn't possible deploy/restart
smx with cxf bundles?
Is there a way to avoid spring xml validation and permit start of cxf
bundle correctly?
Thanks
Ge@@ru
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman Fang <fr...@gmail.com>.
use
osgi:ls cxf-bundle-id
you can get OSGi services exported by cxf-bundle only.
Freeman
On 2011-12-19, at 上午2:54, Ge@@ru wrote:
> Hi Freeman,
>
> thanks for reply.
>
> About option 1... probably it is right add reference to cxf-bundle
> osgi
> service inside cxf-jaxrs features example so every users could see it.
>
> Can you supply me an example of osgi:reference to add on xml file ?
>
> With osgi:ls I see a lot of things but i don't understand what is a
> valid interface to use that it is used only on cxf.
>
>
> On Sun, 2011-12-18 at 19:34 +0800, Freeman Fang wrote:
>> Great finally you append another testcase which I can reproduce the
>> error, but I can never see any problems with the one you appended
>> with
>> SMX4-1003, I think the difference is that the testcase appended with
>> SMX4-1003 use blueprint configuration to publish endpoint but your
>> new
>> testcase use spring-dm to publish endpoint. That's a big advantage
>> that blueprint have, it's more suitable for async container which is
>> the basic nature for OSGi,
>>
>> Anyway, the problem you encountered here is a timing issue which is
>> caused by bundle start sequence, the root cause isn't that you're
>> offline, the router cause is that when your customer bundle started,
>> the cxf-bundle which contain local jaxrs.xsd not fully started yet,
>> that's why your customer bundle can't use the local jaxrs.xsd from
>> cxf-
>> bundle, and hence you saw such error.
>>
>> You have two options to work around this issue,
>>
>> Option 1. a lit bit complex but reliable one
>> In your customer bundle(test-spring-cxf-rs) configuration you can
>> import an OSGi service which is exported by cxf-bundle, you can use
>> ls cxf-bundle-id
>> from console to see what OSGi services cxf-bundle exported(it
>> export a
>> bunch actually), and from your customer bundle just hold anyone
>> reference, although you don't need use that service. This just
>> ensure
>> that your customer bundle can get started after cxf-bundle fully
>> started.
>>
>> Option2. simple one
>> Assume you are use using SMX 4.4.0, then edit
>> ./system/org/apache/cxf/karaf/apache-cxf/2.4.4/apache-cxf-2.4.4-
>> features.xml
>> change
>> <bundle>mvn:org.apache.cxf/cxf-bundle/2.4.4</bundle>
>> to
>> <bundle start-level='45'>mvn:org.apache.cxf/cxf-bundle/2.4.4</bundle>
>>
>> This can make cxf-bundle get started earlier than your customer
>> bundle, that can resolve the problem you encounter here in most
>> cases,
>> however, IIRC, due to the async nature of OSGi, it can't guarantee
>> that cxf-bundle fully started(all start process is done) before your
>> customer bundle begin to start, so you MAY still see the problem.
>> AFAIK, the only reliable way to specify the start sequence is
>> Option 1
>> I mentioned here, just hold OSGi reference from another bundle can
>> ensure it.
>>
>> But option2 works in most cases, I use this way and restart dozens of
>> time in offline mode, and it always works. It MIGHT be an issue why
>> you have a very powerful machine which have multiple cpus which can
>> most take advantage of OSGi async nature, but it works in most cases.
>>
>> Hope this helps.
>>
>> Freeman
>>
>> On 2011-12-18, at 下午6:05, Ge@@ru wrote:
>>
>>> Same issue on smx-4.4.0 with only one different:
>>>
>>> - after first restart bundle doesn't work with same error on smx log
>>> as
>>> describe on my previous mail (after second restart).
>>>
>>> Bye
>>>
>>
>> ---------------------------------------------
>> Freeman Fang
>>
>> FuseSource
>> Email:ffang@fusesource.com
>> Web: fusesource.com
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by "Ge@@ru" <ge...@gmail.com>.
Hi Freeman,
thanks for reply.
About option 1... probably it is right add reference to cxf-bundle osgi
service inside cxf-jaxrs features example so every users could see it.
Can you supply me an example of osgi:reference to add on xml file ?
With osgi:ls I see a lot of things but i don't understand what is a
valid interface to use that it is used only on cxf.
On Sun, 2011-12-18 at 19:34 +0800, Freeman Fang wrote:
> Great finally you append another testcase which I can reproduce the
> error, but I can never see any problems with the one you appended with
> SMX4-1003, I think the difference is that the testcase appended with
> SMX4-1003 use blueprint configuration to publish endpoint but your new
> testcase use spring-dm to publish endpoint. That's a big advantage
> that blueprint have, it's more suitable for async container which is
> the basic nature for OSGi,
>
> Anyway, the problem you encountered here is a timing issue which is
> caused by bundle start sequence, the root cause isn't that you're
> offline, the router cause is that when your customer bundle started,
> the cxf-bundle which contain local jaxrs.xsd not fully started yet,
> that's why your customer bundle can't use the local jaxrs.xsd from cxf-
> bundle, and hence you saw such error.
>
> You have two options to work around this issue,
>
> Option 1. a lit bit complex but reliable one
> In your customer bundle(test-spring-cxf-rs) configuration you can
> import an OSGi service which is exported by cxf-bundle, you can use
> ls cxf-bundle-id
> from console to see what OSGi services cxf-bundle exported(it export a
> bunch actually), and from your customer bundle just hold anyone
> reference, although you don't need use that service. This just ensure
> that your customer bundle can get started after cxf-bundle fully
> started.
>
> Option2. simple one
> Assume you are use using SMX 4.4.0, then edit
> ./system/org/apache/cxf/karaf/apache-cxf/2.4.4/apache-cxf-2.4.4-
> features.xml
> change
> <bundle>mvn:org.apache.cxf/cxf-bundle/2.4.4</bundle>
> to
> <bundle start-level='45'>mvn:org.apache.cxf/cxf-bundle/2.4.4</bundle>
>
> This can make cxf-bundle get started earlier than your customer
> bundle, that can resolve the problem you encounter here in most cases,
> however, IIRC, due to the async nature of OSGi, it can't guarantee
> that cxf-bundle fully started(all start process is done) before your
> customer bundle begin to start, so you MAY still see the problem.
> AFAIK, the only reliable way to specify the start sequence is Option 1
> I mentioned here, just hold OSGi reference from another bundle can
> ensure it.
>
> But option2 works in most cases, I use this way and restart dozens of
> time in offline mode, and it always works. It MIGHT be an issue why
> you have a very powerful machine which have multiple cpus which can
> most take advantage of OSGi async nature, but it works in most cases.
>
> Hope this helps.
>
> Freeman
>
> On 2011-12-18, at 下午6:05, Ge@@ru wrote:
>
> > Same issue on smx-4.4.0 with only one different:
> >
> > - after first restart bundle doesn't work with same error on smx log
> > as
> > describe on my previous mail (after second restart).
> >
> > Bye
> >
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by "Ge@@ru" <ge...@gmail.com>.
Ok, with option 2 it works.
I will try for option 3.
Thanks.
On Sun, 2011-12-18 at 18:20 -0800, Freeman-2 wrote:
> ah, good point, that should be this case.
>
> Anyway, Option 2 I mentioned before should be good for you, in your customer
> bundle still use spring-beans.xsd, but never complain can't download it,
> right?
> It's because spring-beans bundle contain the local xsd file and use
> spring.schemas to map to use the local xsd files, more importantly
> spring-beans bundle start level is 30 which means it can start at earlier
> stage.
> So adjust cxf-bundle start level can ensure we use same mechanism with
> spring-beans. I've already create an issue[1] on cxf side and fixed it, so
> next servicemix release can pick it up. So for you can manually edit the cxf
> features.xml to ensure cxf-bundle has less start level.
>
> Also I think there's "Option 3", actually in your customer bundle you can
> host the necessary xsd files, and add spring.shemas and spring.handlers to
> specify to use local xsd files from your bundle, I've create a testcase
> which is based on your test-spring-cxf-rs, basically I just add some files
> like
> ./src/main/resources/META-INF/spring.handlers
> ./src/main/resources/META-INF/spring.schemas
> ./src/main/resources/schemas
> ./src/main/resources/schemas/configuration
> ./src/main/resources/schemas/configuration/cxf-beans.xsd
> ./src/main/resources/schemas/jaxrs.xsd
> It works for your current testcase, if your testcase evolve more complex and
> need more xsd files, than you need add necessary xsd files accordingly.
> Probably "Option 3" is too much for now, I just append here to demonstrate
> how your customer bundle can control to load all necessary xsds from itself.
> [1]https://issues.apache.org/jira/browse/CXF-3979
>
> Freeman
> http://servicemix.396122.n5.nabble.com/file/n5084928/test-spring-cxf-rs.tar
> test-spring-cxf-rs.tar
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Problem-on-use-cxf-on-offline-environment-on-smx-4-4-x-tp5081157p5084928.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman-2 <fr...@gmail.com>.
ah, good point, that should be this case.
Anyway, Option 2 I mentioned before should be good for you, in your customer
bundle still use spring-beans.xsd, but never complain can't download it,
right?
It's because spring-beans bundle contain the local xsd file and use
spring.schemas to map to use the local xsd files, more importantly
spring-beans bundle start level is 30 which means it can start at earlier
stage.
So adjust cxf-bundle start level can ensure we use same mechanism with
spring-beans. I've already create an issue[1] on cxf side and fixed it, so
next servicemix release can pick it up. So for you can manually edit the cxf
features.xml to ensure cxf-bundle has less start level.
Also I think there's "Option 3", actually in your customer bundle you can
host the necessary xsd files, and add spring.shemas and spring.handlers to
specify to use local xsd files from your bundle, I've create a testcase
which is based on your test-spring-cxf-rs, basically I just add some files
like
./src/main/resources/META-INF/spring.handlers
./src/main/resources/META-INF/spring.schemas
./src/main/resources/schemas
./src/main/resources/schemas/configuration
./src/main/resources/schemas/configuration/cxf-beans.xsd
./src/main/resources/schemas/jaxrs.xsd
It works for your current testcase, if your testcase evolve more complex and
need more xsd files, than you need add necessary xsd files accordingly.
Probably "Option 3" is too much for now, I just append here to demonstrate
how your customer bundle can control to load all necessary xsds from itself.
[1]https://issues.apache.org/jira/browse/CXF-3979
Freeman
http://servicemix.396122.n5.nabble.com/file/n5084928/test-spring-cxf-rs.tar
test-spring-cxf-rs.tar
--
View this message in context: http://servicemix.396122.n5.nabble.com/Problem-on-use-cxf-on-offline-environment-on-smx-4-4-x-tp5081157p5084928.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by "Ge@@ru" <ge...@gmail.com>.
If i add this:
<osgi:reference id="cxf_bundle_ref"
interface="org.apache.aries.blueprint.NamespaceHandler"
filter="(osgi.service.blueprint.namespace=http://cxf.apache.org/blueprint/jaxws)" />
Problem is always present. Probably add an osgi:reference is wrong
because error is on spring xml validation where reference aren't yet
managed.
On Sun, 2011-12-18 at 03:56 -0800, Freeman-2 wrote:
> This can also explain why you first time install your customer bundle works,
> and also refresh your customer bundle works, at that moment the cxf-bundle
> already get chance to be fully started, and your customer bundle actually
> needn't download a remote xsd file in offline mode.
>
> Btw, don't forget to remove $SMX_HOME/data folder when you change any
> things, so that can remove bundle cache which means your change can take
> effect.
>
> Freeman
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Problem-on-use-cxf-on-offline-environment-on-smx-4-4-x-tp5081157p5083732.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman-2 <fr...@gmail.com>.
This can also explain why you first time install your customer bundle works,
and also refresh your customer bundle works, at that moment the cxf-bundle
already get chance to be fully started, and your customer bundle actually
needn't download a remote xsd file in offline mode.
Btw, don't forget to remove $SMX_HOME/data folder when you change any
things, so that can remove bundle cache which means your change can take
effect.
Freeman
--
View this message in context: http://servicemix.396122.n5.nabble.com/Problem-on-use-cxf-on-offline-environment-on-smx-4-4-x-tp5081157p5083732.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman Fang <fr...@gmail.com>.
Great finally you append another testcase which I can reproduce the
error, but I can never see any problems with the one you appended with
SMX4-1003, I think the difference is that the testcase appended with
SMX4-1003 use blueprint configuration to publish endpoint but your new
testcase use spring-dm to publish endpoint. That's a big advantage
that blueprint have, it's more suitable for async container which is
the basic nature for OSGi,
Anyway, the problem you encountered here is a timing issue which is
caused by bundle start sequence, the root cause isn't that you're
offline, the router cause is that when your customer bundle started,
the cxf-bundle which contain local jaxrs.xsd not fully started yet,
that's why your customer bundle can't use the local jaxrs.xsd from cxf-
bundle, and hence you saw such error.
You have two options to work around this issue,
Option 1. a lit bit complex but reliable one
In your customer bundle(test-spring-cxf-rs) configuration you can
import an OSGi service which is exported by cxf-bundle, you can use
ls cxf-bundle-id
from console to see what OSGi services cxf-bundle exported(it export a
bunch actually), and from your customer bundle just hold anyone
reference, although you don't need use that service. This just ensure
that your customer bundle can get started after cxf-bundle fully
started.
Option2. simple one
Assume you are use using SMX 4.4.0, then edit
./system/org/apache/cxf/karaf/apache-cxf/2.4.4/apache-cxf-2.4.4-
features.xml
change
<bundle>mvn:org.apache.cxf/cxf-bundle/2.4.4</bundle>
to
<bundle start-level='45'>mvn:org.apache.cxf/cxf-bundle/2.4.4</bundle>
This can make cxf-bundle get started earlier than your customer
bundle, that can resolve the problem you encounter here in most cases,
however, IIRC, due to the async nature of OSGi, it can't guarantee
that cxf-bundle fully started(all start process is done) before your
customer bundle begin to start, so you MAY still see the problem.
AFAIK, the only reliable way to specify the start sequence is Option 1
I mentioned here, just hold OSGi reference from another bundle can
ensure it.
But option2 works in most cases, I use this way and restart dozens of
time in offline mode, and it always works. It MIGHT be an issue why
you have a very powerful machine which have multiple cpus which can
most take advantage of OSGi async nature, but it works in most cases.
Hope this helps.
Freeman
On 2011-12-18, at 下午6:05, Ge@@ru wrote:
> Same issue on smx-4.4.0 with only one different:
>
> - after first restart bundle doesn't work with same error on smx log
> as
> describe on my previous mail (after second restart).
>
> Bye
>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by "Ge@@ru" <ge...@gmail.com>.
Same issue on smx-4.4.0 with only one different:
- after first restart bundle doesn't work with same error on smx log as
describe on my previous mail (after second restart).
Bye
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by "Ge@@ru" <ge...@gmail.com>.
Reproducible: always!!!
Here described issue:
First deploy a runtime of the spring + cxf bundle:
10:45:01,976 | INFO | -SNAPSHOT/deploy |
ultOsgiApplicationContextCreator | 76 -
org.springframework.osgi.extender - 1.2.1 | Discovered configurations
{osgibundle:/META-INF/spring/*.xml} in bundle [Test Spring :: CXF + JAX
RS (test-sping-cxf-rs)]
10:45:01,978 | INFO | ExtenderThread-4 |
OsgiBundleXmlApplicationContext | 65 - org.springframework.context -
3.0.6.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=test-sping-cxf-rs,
config=osgibundle:/META-INF/spring/*.xml): startup date [Sun Dec 18
10:45:01 CET 2011]; root of context hierarchy
10:45:01,978 | INFO | ExtenderThread-4 |
OsgiBundleXmlApplicationContext | 65 - org.springframework.context -
3.0.6.RELEASE | Application Context service already unpublished
10:45:02,467 | INFO | ExtenderThread-4 | XmlBeanDefinitionReader
| 66 - org.springframework.beans - 3.0.6.RELEASE | Loading XML bean
definitions from URL [bundle://256.0:0/META-INF/spring/xbean.xml]
10:45:02,491 | INFO | ExtenderThread-4 | XmlBeanDefinitionReader
| 66 - org.springframework.beans - 3.0.6.RELEASE | Loading XML bean
definitions from OSGi resource[classpath:META-INF/cxf/cxf.xml|
bnd.id=256|bnd.sym=test-sping-cxf-rs]
10:45:02,526 | INFO | ExtenderThread-4 |
WaiterApplicationContextExecutor | 76 -
org.springframework.osgi.extender - 1.2.1 | No outstanding OSGi service
dependencies, completing initialization for
OsgiBundleXmlApplicationContext(bundle=test-sping-cxf-rs,
config=osgibundle:/META-INF/spring/*.xml)
10:45:02,531 | INFO | ExtenderThread-5 | DefaultListableBeanFactory
| 66 - org.springframework.beans - 3.0.6.RELEASE | Pre-instantiating
singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@6d2c05d: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,testCxfRsService,http-service]; root of factory hierarchy
10:45:02,738 | INFO | ExtenderThread-5 | ServerImpl
| - - | Setting the server's publish address to be
http://0.0.0.0:8193/
10:45:02,828 | INFO | ExtenderThread-5 | log
| 97 - org.eclipse.jetty.util - 7.4.5.v20110725 | jetty-7.4.5.v20110725
10:45:02,830 | INFO | ExtenderThread-5 | log
| 97 - org.eclipse.jetty.util - 7.4.5.v20110725 | Started
SelectChannelConnector@0.0.0.0:8193 STARTING
10:45:02,832 | INFO | ExtenderThread-5 | log
| 97 - org.eclipse.jetty.util - 7.4.5.v20110725 | started
o.e.j.s.h.ContextHandler{,null}
karaf@root> osgi:list
[ 256] [Active ] [ ] [Started] [ 60] Test Spring :: CXF
+ JAX RS (0.1.0.SNAPSHOT)
karaf@root>
$ telnet localhost 8193
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> close
Connection closed.
(All works fine)
After restart:
[ 256] [Active ] [ ] [ ] [ 60] Test Spring :: CXF
+ JAX RS (0.1.0.SNAPSHOT)
$ telnet localhost 8193
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> close
Connection closed.
(All works fine but with error on karaf about see 'Started' status)
After second restart:
10:48:59,461 | ERROR | ExtenderThread-1 | ContextLoaderListener
| 76 - org.springframework.osgi.extender - 1.2.1 | Application context
refresh failed
(OsgiBundleXmlApplicationContext(bundle=test-sping-cxf-rs,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxrs]
Offending resource: URL [bundle://256.0:0/META-INF/spring/xbean.xml]
at
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:284)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1328)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[65:org.springframework.context:3.0.6.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[65:org.springframework.context:3.0.6.RELEASE]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[76:org.springframework.osgi.extender:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[76:org.springframework.osgi.extender:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[76:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
10:48:59,463 | INFO | FelixStartLevel | log
| 97 - org.eclipse.jetty.util - 7.4.5.v20110725 | Started
NIOSocketConnectorWrapper@0.0.0.0:8181 STARTING
10:48:59,466 | ERROR | ExtenderThread-1 |
WaiterApplicationContextExecutor | 76 -
org.springframework.osgi.extender - 1.2.1 | Unable to create application
context for [test-sping-cxf-rs], unsatisfied dependencies: none
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxrs]
Offending resource: URL [bundle://256.0:0/META-INF/spring/xbean.xml]
at
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:284)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1328)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[66:org.springframework.beans:3.0.6.RELEASE]
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[65:org.springframework.context:3.0.6.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[65:org.springframework.context:3.0.6.RELEASE]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[76:org.springframework.osgi.extender:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[76:org.springframework.osgi.extender:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[73:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[76:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
10:48:59,468 | ERROR | ExtenderThread-1 | ContextLoaderListener
| 76 - org.springframework.osgi.extender - 1.2.1 | Application context
refresh failed
(OsgiBundleXmlApplicationContext(bundle=test-sping-cxf-rs,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxrs]
Offending resource: URL [bundle://256.0:0/META-INF/spring/xbean.xml]
$ telnet localhost 8193
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
(Now doesn't work!!!!)
This happens on smx-4.4.0-SNAPSHOT (i haven't try yet on 4.4.0)
This is xml file about jaxrs service on dedicated port:
$ cat src/main/resources/META-INF/spring/xbean.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: xbean.xml 6876 2011-12-16 17:28:45Z geaaru $ -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd" >
<import resource="classpath:META-INF/cxf/cxf.xml" />
<jaxrs:server id="testCxfRsService"
address="http://0.0.0.0:8193/">
<jaxrs:serviceBeans>
<ref bean="http-service"/>
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="http-service"
class="it.test.TestCxfRs">
</bean>
</beans>
FYI: currently on my m2/settings.xml file i set proxy but proxy is
offline (same issue if proxy is online). I don't know if this could be
identify a variable of the problem.
On Sun, 2011-12-18 at 10:43 +0800, Freeman Fang wrote:
>
>
> On 2011-12-17, at 下午10:11, Ge@@ru wrote:
>
> > Hi, thanks for reply.
> >
> > Yes, there are two different issue but with same target: permit deploy
> > of cxf bundle on production environment where:
> > - there is an offline environment (this relative to issue SMX-1003);
> > - bundle doesn't start correctly when servicemix go up (for spring +
> > cxf). In a production environment it isn't possible that after smx is
> > startup it is needed create an application for monitoring cxf bundle
> > and
> > call osgi:update if status isn't on 'Started'. But it isn't only a
> > visualization problem, bundle doesn't start and so jaxrs:server /
> > jaxws:server doesn't go up. Only after a call to osgi:update server go
> > up and ready to defined port.
>
> No, I don't think so.
> As I mentioned in my previous answer, for "Srping" status, it's just
> missing the "status" but the bundle actually started(also the spring
> context started succesfully) and more importantly, it function well.
> I can verify it through the testcase you appended with SMX4-1003[1],
> could you just try the SMX4.4 release candidate kit apache-servicemix-
> full-4.4.0.tar.gz?
>
> Moreover, If I read correctly, ARIES-626 is about in blueprint
> configuration, xsd:include or xsd:import can't use local xsd, but it's
> totally another issue, and through your testcase appended with
> SMX4-1003[1], your testcase has nothing to do with ARIES-626.
>
> Let's go through your testcase a little bit here.
> You have three bundles, they are test-blueprint-osgi-lib, test-spring-
> osgi-server and test-blueprint-osgi-cxf, the test-spring-osgi-server
> use spring-dm configuration and export a serviceImpl,
> the test-blueprint-osgi-cxf bundle use blueprint configuration and
> import this serviceImpl and publish a jaxws webservice on port 10000.
> Your blueprint configuration bundle has no xsd:include or xsd:import,
> and it indeed started correctly when in offline mode, the bundle
> status after restart in offline mode is
> [ 156] [Active ] [ ] [ ] [ 60] test-blueprint-
> osgi-lib (0.1.0.SNAPSHOT)
> [ 157] [Active ] [ ] [ ] [ 60] Test Spring Osgi
> Service (0.1.0.SNAPSHOT)
> [ 158] [Active ] [Created ] [ ] [ 60] Test Blueprint
> Client inside Route (0.1.0.SNAPSHOT)
> You may want to say bundle 157 miss "Spring" status "Started", but as
> I mentioned in my previous answer already, the bundle actually started
> correctly but just missing the Spring status flag, this issue is
> tracked by KARAF-1114[2]. And the port 10000 get started after
> restart SMX in offline mode.
>
>
> In summary, it MIGHT be an issue if your bundle use blueprint
> configuration and has xsd:include or xsd:import and in offline mode.
> However, spring-dm has no this problem.
> And the ARIES-626 should be a general namespace handler schema issue
> and all your blueprint configuration bundle might encounter it if you
> use xsd:include or xsd:import and in offline mode, the workaround I
> can suggest is use inline schema instead.
>
> And as you already pointed out, this issue is out of Servicemix scope
> and we can't pick it up until Karaf 3.x, so we can't wait that long
> to release SMX4.4.
>
> Hope this helps
> [1]https://issues.apache.org/jira/browse/SMX4-1003
> [2]https://issues.apache.org/jira/browse/KARAF-1114
>
> Freeman
> >
> > A new user that use servicemix how can create his bundle with cxf if
> > then it isn't possible use it on production environment.
> > With blueprint i see that with jaxrs (and without interceptor)
> > blueprint
> > resolver try to download xsd and when timeout expire bundle go up
> > correctly. (So, in this case there is a problem but bundle after 3/4
> > min
> > go up). But for jaxws with interceptors (i haven't try without
> > interceptors) go to Failure status when timeout expire ans so it is
> > not
> > usable.
> >
> > For blueprint (after a chat to cxf channel) problem is been resolved
> > on
> > blueprint-0.4.0-SNAPSHOT but it isn't possible use it on smx-4.4.0
> > because require karaf-3.x (and others major dependencies changes).
> >
> > So, I try to found a solution and I try spring + cxf that then doesn't
> > start correctly. Are there alternative without use of jbi ?
> >
> > With aries blueprint it isn't possible resolve this for smx-4.4.0 but
> > for spring+cxf ? Can we found a solution or a workaround that permit
> > at
> > users to use smx-4.4.0 on production environment? I try to add
> > META-INF.cxf on Import-Package but without success.
> >
> > On blueprint a possible (but very very bad workaround) is configure
> > smx
> > with a reverse http proxy and send request about this .xsd file to a
> > server that return this files on offline environment.
> >
> > This problem isn't relative to servicemix but to a library/framework
> > used by servicemix but however, it isn't a well publicize. So, again
> > my
> > question, is it right release a version with this big problem? Maybe,
> > there are alternative that I dont' know and so sorry for this discuss.
> >
> > Geaaru
> >
> > On Sat, 2011-12-17 at 19:53 +0800, Freeman Fang wrote
> >> Ok, figured out it's an karaf issue[1] and fixed it.
> >>
> >> Again, IMO it's not a show stopper as the bundle function well
> >> actually, so we can pick up this release after SMX4.4.
> >>
> >> [1]https://issues.apache.org/jira/browse/KARAF-1114
> >>
> >> Freeman
> >>
> >>
> >> On 2011-12-17, at 上午10:11, Freeman Fang wrote:
> >>
> >>> Hi,
> >>>
> >>> I don't think the problem you encountered here is same as it in
> >>> ARIES-626.
> >>>
> >>> I did a quick test with the test case you appended with SMX4-1003 on
> >>> the SMX 4.4 releasse candidate kit apache-servicemix-
> >>> full-4.4.0.tar.gz, I can see "Test Spring Osgi Service" bundle
> >>> spring status isn't "Started" after I restart SMX BOTH with and
> >>> without internet connection.
> >>> So the status is
> >>> [ 158] [Active ] [ ] [ ] [ 60] Test Spring
> >>> Osgi Service (0.1.0.SNAPSHOT)
> >>> the expected one should be
> >>> [ 158] [Active ] [ ] [Started] [ 60] Test Spring
> >>> Osgi Service (0.1.0.SNAPSHOT)
> >>>
> >>> However, this has nothing to do with offline mode, this is just that
> >>> the restart SMX can't show correct spring bundle status, even though
> >>> the spring bundle is actually in good shape.
> >>> I can see this on other bundles also(both online and offline), like
> >>> cxf-jaxrs example, which is pure spring configuration and has
> >>> nothing to do with blueprint.
> >>>
> >>> As you describe it try to download spring xsd files, but I'm quiet
> >>> sure cxf-bundle.jar embedded all necessary xsd files so generally it
> >>> won't try to download the remote one.
> >>> If it need download something with offline mode, then osgi:update
> >>> the bundle won't make it correct.
> >>>
> >>> The ARIES-626 is about in blueprint configuration, xsd:include or
> >>> xsd:import can't use local xsd, but it's totally another issue.
> >>>
> >>> In summary, the problem you encounter is that restart smx4 can't
> >>> show spring bundle status correctly, though the spring bundle
> >>> actually in good shape and all function are good,would you please
> >>> create an issue to track it, so that we can fix it after 4.4
> >>> release(it's not a show stopper IMO as the bundle function well
> >>> actually) and I'm not sure so far where we need fix it(probably in
> >>> Karaf, not sure).
> >>>
> >>> Freeman
> >>>
> >>>
> >>> On 2011-12-17, at 上午3:29, Ge@@ru wrote:
> >>>
> >>>> I don't know if we have ready for smx-4.4.0 :'(
> >>>>
> >>>> I'm trying to use cxf on offline environment but I haven't found
> >>>> yet a
> >>>> solution.
> >>>>
> >>>> * With blueprint + cxf it isn't possible deploy cxf bundle for
> >>>> problem
> >>>> describe on SMX-1003 (https://issues.apache.org/jira/browse/
> >>>> ARIES-626)
> >>>>
> >>>> * With spring there is a problem like for blueprint. Spring try to
> >>>> download jaxrs.xsd and then doesn't start correctly (after a smx
> >>>> restart)
> >>>>
> >>>> smx@root> features:install examples-cxf-jaxrs
> >>>> smx@root> shutdown
> >>>>
> >>>> ... restart of smx
> >>>>
> >>>> (here sniffing of http request from smx)
> >>>> 127.0.0.1 - - [16/Dec/2011:20:17:36 +0100] "GET
> >>>> http://cxf.apache.org/schemas/jaxrs.xsd HTTP/1.1" 200 9161
> >>>>
> >>>> ..
> >>>> (here bundle is Active but not Started (only an osgi:update or a
> >>>> redeploy set status to Started))
> >>>>
> >>>> On production environment normally smx will be on offline
> >>>> environment,
> >>>> so, is it right release a smx-4.4.0 where isn't possible deploy/
> >>>> restart
> >>>> smx with cxf bundles?
> >>>>
> >>>> Is there a way to avoid spring xml validation and permit start of
> >>>> cxf
> >>>> bundle correctly?
> >>>>
> >>>> Thanks
> >>>>
> >>>> Ge@@ru
> >>>>
> >>>
> >>> ---------------------------------------------
> >>> Freeman Fang
> >>>
> >>> FuseSource
> >>> Email:ffang@fusesource.com
> >>> Web: fusesource.com
> >>> Twitter: freemanfang
> >>> Blog: http://freemanfang.blogspot.com
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >> ---------------------------------------------
> >> Freeman Fang
> >>
> >> FuseSource
> >> Email:ffang@fusesource.com
> >> Web: fusesource.com
> >> Twitter: freemanfang
> >> Blog: http://freemanfang.blogspot.com
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman Fang <fr...@gmail.com>.
On 2011-12-17, at 下午10:11, Ge@@ru wrote:
> Hi, thanks for reply.
>
> Yes, there are two different issue but with same target: permit deploy
> of cxf bundle on production environment where:
> - there is an offline environment (this relative to issue SMX-1003);
> - bundle doesn't start correctly when servicemix go up (for spring +
> cxf). In a production environment it isn't possible that after smx is
> startup it is needed create an application for monitoring cxf bundle
> and
> call osgi:update if status isn't on 'Started'. But it isn't only a
> visualization problem, bundle doesn't start and so jaxrs:server /
> jaxws:server doesn't go up. Only after a call to osgi:update server go
> up and ready to defined port.
No, I don't think so.
As I mentioned in my previous answer, for "Srping" status, it's just
missing the "status" but the bundle actually started(also the spring
context started succesfully) and more importantly, it function well.
I can verify it through the testcase you appended with SMX4-1003[1],
could you just try the SMX4.4 release candidate kit apache-servicemix-
full-4.4.0.tar.gz?
Moreover, If I read correctly, ARIES-626 is about in blueprint
configuration, xsd:include or xsd:import can't use local xsd, but it's
totally another issue, and through your testcase appended with
SMX4-1003[1], your testcase has nothing to do with ARIES-626.
Let's go through your testcase a little bit here.
You have three bundles, they are test-blueprint-osgi-lib, test-spring-
osgi-server and test-blueprint-osgi-cxf, the test-spring-osgi-server
use spring-dm configuration and export a serviceImpl,
the test-blueprint-osgi-cxf bundle use blueprint configuration and
import this serviceImpl and publish a jaxws webservice on port 10000.
Your blueprint configuration bundle has no xsd:include or xsd:import,
and it indeed started correctly when in offline mode, the bundle
status after restart in offline mode is
[ 156] [Active ] [ ] [ ] [ 60] test-blueprint-
osgi-lib (0.1.0.SNAPSHOT)
[ 157] [Active ] [ ] [ ] [ 60] Test Spring Osgi
Service (0.1.0.SNAPSHOT)
[ 158] [Active ] [Created ] [ ] [ 60] Test Blueprint
Client inside Route (0.1.0.SNAPSHOT)
You may want to say bundle 157 miss "Spring" status "Started", but as
I mentioned in my previous answer already, the bundle actually started
correctly but just missing the Spring status flag, this issue is
tracked by KARAF-1114[2]. And the port 10000 get started after
restart SMX in offline mode.
In summary, it MIGHT be an issue if your bundle use blueprint
configuration and has xsd:include or xsd:import and in offline mode.
However, spring-dm has no this problem.
And the ARIES-626 should be a general namespace handler schema issue
and all your blueprint configuration bundle might encounter it if you
use xsd:include or xsd:import and in offline mode, the workaround I
can suggest is use inline schema instead.
And as you already pointed out, this issue is out of Servicemix scope
and we can't pick it up until Karaf 3.x, so we can't wait that long
to release SMX4.4.
Hope this helps
[1]https://issues.apache.org/jira/browse/SMX4-1003
[2]https://issues.apache.org/jira/browse/KARAF-1114
Freeman
>
> A new user that use servicemix how can create his bundle with cxf if
> then it isn't possible use it on production environment.
> With blueprint i see that with jaxrs (and without interceptor)
> blueprint
> resolver try to download xsd and when timeout expire bundle go up
> correctly. (So, in this case there is a problem but bundle after 3/4
> min
> go up). But for jaxws with interceptors (i haven't try without
> interceptors) go to Failure status when timeout expire ans so it is
> not
> usable.
>
> For blueprint (after a chat to cxf channel) problem is been resolved
> on
> blueprint-0.4.0-SNAPSHOT but it isn't possible use it on smx-4.4.0
> because require karaf-3.x (and others major dependencies changes).
>
> So, I try to found a solution and I try spring + cxf that then doesn't
> start correctly. Are there alternative without use of jbi ?
>
> With aries blueprint it isn't possible resolve this for smx-4.4.0 but
> for spring+cxf ? Can we found a solution or a workaround that permit
> at
> users to use smx-4.4.0 on production environment? I try to add
> META-INF.cxf on Import-Package but without success.
>
> On blueprint a possible (but very very bad workaround) is configure
> smx
> with a reverse http proxy and send request about this .xsd file to a
> server that return this files on offline environment.
>
> This problem isn't relative to servicemix but to a library/framework
> used by servicemix but however, it isn't a well publicize. So, again
> my
> question, is it right release a version with this big problem? Maybe,
> there are alternative that I dont' know and so sorry for this discuss.
>
> Geaaru
>
> On Sat, 2011-12-17 at 19:53 +0800, Freeman Fang wrote
>> Ok, figured out it's an karaf issue[1] and fixed it.
>>
>> Again, IMO it's not a show stopper as the bundle function well
>> actually, so we can pick up this release after SMX4.4.
>>
>> [1]https://issues.apache.org/jira/browse/KARAF-1114
>>
>> Freeman
>>
>>
>> On 2011-12-17, at 上午10:11, Freeman Fang wrote:
>>
>>> Hi,
>>>
>>> I don't think the problem you encountered here is same as it in
>>> ARIES-626.
>>>
>>> I did a quick test with the test case you appended with SMX4-1003 on
>>> the SMX 4.4 releasse candidate kit apache-servicemix-
>>> full-4.4.0.tar.gz, I can see "Test Spring Osgi Service" bundle
>>> spring status isn't "Started" after I restart SMX BOTH with and
>>> without internet connection.
>>> So the status is
>>> [ 158] [Active ] [ ] [ ] [ 60] Test Spring
>>> Osgi Service (0.1.0.SNAPSHOT)
>>> the expected one should be
>>> [ 158] [Active ] [ ] [Started] [ 60] Test Spring
>>> Osgi Service (0.1.0.SNAPSHOT)
>>>
>>> However, this has nothing to do with offline mode, this is just that
>>> the restart SMX can't show correct spring bundle status, even though
>>> the spring bundle is actually in good shape.
>>> I can see this on other bundles also(both online and offline), like
>>> cxf-jaxrs example, which is pure spring configuration and has
>>> nothing to do with blueprint.
>>>
>>> As you describe it try to download spring xsd files, but I'm quiet
>>> sure cxf-bundle.jar embedded all necessary xsd files so generally it
>>> won't try to download the remote one.
>>> If it need download something with offline mode, then osgi:update
>>> the bundle won't make it correct.
>>>
>>> The ARIES-626 is about in blueprint configuration, xsd:include or
>>> xsd:import can't use local xsd, but it's totally another issue.
>>>
>>> In summary, the problem you encounter is that restart smx4 can't
>>> show spring bundle status correctly, though the spring bundle
>>> actually in good shape and all function are good,would you please
>>> create an issue to track it, so that we can fix it after 4.4
>>> release(it's not a show stopper IMO as the bundle function well
>>> actually) and I'm not sure so far where we need fix it(probably in
>>> Karaf, not sure).
>>>
>>> Freeman
>>>
>>>
>>> On 2011-12-17, at 上午3:29, Ge@@ru wrote:
>>>
>>>> I don't know if we have ready for smx-4.4.0 :'(
>>>>
>>>> I'm trying to use cxf on offline environment but I haven't found
>>>> yet a
>>>> solution.
>>>>
>>>> * With blueprint + cxf it isn't possible deploy cxf bundle for
>>>> problem
>>>> describe on SMX-1003 (https://issues.apache.org/jira/browse/
>>>> ARIES-626)
>>>>
>>>> * With spring there is a problem like for blueprint. Spring try to
>>>> download jaxrs.xsd and then doesn't start correctly (after a smx
>>>> restart)
>>>>
>>>> smx@root> features:install examples-cxf-jaxrs
>>>> smx@root> shutdown
>>>>
>>>> ... restart of smx
>>>>
>>>> (here sniffing of http request from smx)
>>>> 127.0.0.1 - - [16/Dec/2011:20:17:36 +0100] "GET
>>>> http://cxf.apache.org/schemas/jaxrs.xsd HTTP/1.1" 200 9161
>>>>
>>>> ..
>>>> (here bundle is Active but not Started (only an osgi:update or a
>>>> redeploy set status to Started))
>>>>
>>>> On production environment normally smx will be on offline
>>>> environment,
>>>> so, is it right release a smx-4.4.0 where isn't possible deploy/
>>>> restart
>>>> smx with cxf bundles?
>>>>
>>>> Is there a way to avoid spring xml validation and permit start of
>>>> cxf
>>>> bundle correctly?
>>>>
>>>> Thanks
>>>>
>>>> Ge@@ru
>>>>
>>>
>>> ---------------------------------------------
>>> Freeman Fang
>>>
>>> FuseSource
>>> Email:ffang@fusesource.com
>>> Web: fusesource.com
>>> Twitter: freemanfang
>>> Blog: http://freemanfang.blogspot.com
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------
>> Freeman Fang
>>
>> FuseSource
>> Email:ffang@fusesource.com
>> Web: fusesource.com
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by "Ge@@ru" <ge...@gmail.com>.
Hi, thanks for reply.
Yes, there are two different issue but with same target: permit deploy
of cxf bundle on production environment where:
- there is an offline environment (this relative to issue SMX-1003);
- bundle doesn't start correctly when servicemix go up (for spring +
cxf). In a production environment it isn't possible that after smx is
startup it is needed create an application for monitoring cxf bundle and
call osgi:update if status isn't on 'Started'. But it isn't only a
visualization problem, bundle doesn't start and so jaxrs:server /
jaxws:server doesn't go up. Only after a call to osgi:update server go
up and ready to defined port.
A new user that use servicemix how can create his bundle with cxf if
then it isn't possible use it on production environment.
With blueprint i see that with jaxrs (and without interceptor) blueprint
resolver try to download xsd and when timeout expire bundle go up
correctly. (So, in this case there is a problem but bundle after 3/4 min
go up). But for jaxws with interceptors (i haven't try without
interceptors) go to Failure status when timeout expire ans so it is not
usable.
For blueprint (after a chat to cxf channel) problem is been resolved on
blueprint-0.4.0-SNAPSHOT but it isn't possible use it on smx-4.4.0
because require karaf-3.x (and others major dependencies changes).
So, I try to found a solution and I try spring + cxf that then doesn't
start correctly. Are there alternative without use of jbi ?
With aries blueprint it isn't possible resolve this for smx-4.4.0 but
for spring+cxf ? Can we found a solution or a workaround that permit at
users to use smx-4.4.0 on production environment? I try to add
META-INF.cxf on Import-Package but without success.
On blueprint a possible (but very very bad workaround) is configure smx
with a reverse http proxy and send request about this .xsd file to a
server that return this files on offline environment.
This problem isn't relative to servicemix but to a library/framework
used by servicemix but however, it isn't a well publicize. So, again my
question, is it right release a version with this big problem? Maybe,
there are alternative that I dont' know and so sorry for this discuss.
Geaaru
On Sat, 2011-12-17 at 19:53 +0800, Freeman Fang wrote
> Ok, figured out it's an karaf issue[1] and fixed it.
>
> Again, IMO it's not a show stopper as the bundle function well
> actually, so we can pick up this release after SMX4.4.
>
> [1]https://issues.apache.org/jira/browse/KARAF-1114
>
> Freeman
>
>
> On 2011-12-17, at 上午10:11, Freeman Fang wrote:
>
> > Hi,
> >
> > I don't think the problem you encountered here is same as it in
> > ARIES-626.
> >
> > I did a quick test with the test case you appended with SMX4-1003 on
> > the SMX 4.4 releasse candidate kit apache-servicemix-
> > full-4.4.0.tar.gz, I can see "Test Spring Osgi Service" bundle
> > spring status isn't "Started" after I restart SMX BOTH with and
> > without internet connection.
> > So the status is
> > [ 158] [Active ] [ ] [ ] [ 60] Test Spring
> > Osgi Service (0.1.0.SNAPSHOT)
> > the expected one should be
> > [ 158] [Active ] [ ] [Started] [ 60] Test Spring
> > Osgi Service (0.1.0.SNAPSHOT)
> >
> > However, this has nothing to do with offline mode, this is just that
> > the restart SMX can't show correct spring bundle status, even though
> > the spring bundle is actually in good shape.
> > I can see this on other bundles also(both online and offline), like
> > cxf-jaxrs example, which is pure spring configuration and has
> > nothing to do with blueprint.
> >
> > As you describe it try to download spring xsd files, but I'm quiet
> > sure cxf-bundle.jar embedded all necessary xsd files so generally it
> > won't try to download the remote one.
> > If it need download something with offline mode, then osgi:update
> > the bundle won't make it correct.
> >
> > The ARIES-626 is about in blueprint configuration, xsd:include or
> > xsd:import can't use local xsd, but it's totally another issue.
> >
> > In summary, the problem you encounter is that restart smx4 can't
> > show spring bundle status correctly, though the spring bundle
> > actually in good shape and all function are good,would you please
> > create an issue to track it, so that we can fix it after 4.4
> > release(it's not a show stopper IMO as the bundle function well
> > actually) and I'm not sure so far where we need fix it(probably in
> > Karaf, not sure).
> >
> > Freeman
> >
> >
> > On 2011-12-17, at 上午3:29, Ge@@ru wrote:
> >
> >> I don't know if we have ready for smx-4.4.0 :'(
> >>
> >> I'm trying to use cxf on offline environment but I haven't found
> >> yet a
> >> solution.
> >>
> >> * With blueprint + cxf it isn't possible deploy cxf bundle for
> >> problem
> >> describe on SMX-1003 (https://issues.apache.org/jira/browse/
> >> ARIES-626)
> >>
> >> * With spring there is a problem like for blueprint. Spring try to
> >> download jaxrs.xsd and then doesn't start correctly (after a smx
> >> restart)
> >>
> >> smx@root> features:install examples-cxf-jaxrs
> >> smx@root> shutdown
> >>
> >> ... restart of smx
> >>
> >> (here sniffing of http request from smx)
> >> 127.0.0.1 - - [16/Dec/2011:20:17:36 +0100] "GET
> >> http://cxf.apache.org/schemas/jaxrs.xsd HTTP/1.1" 200 9161
> >>
> >> ..
> >> (here bundle is Active but not Started (only an osgi:update or a
> >> redeploy set status to Started))
> >>
> >> On production environment normally smx will be on offline
> >> environment,
> >> so, is it right release a smx-4.4.0 where isn't possible deploy/
> >> restart
> >> smx with cxf bundles?
> >>
> >> Is there a way to avoid spring xml validation and permit start of cxf
> >> bundle correctly?
> >>
> >> Thanks
> >>
> >> Ge@@ru
> >>
> >
> > ---------------------------------------------
> > Freeman Fang
> >
> > FuseSource
> > Email:ffang@fusesource.com
> > Web: fusesource.com
> > Twitter: freemanfang
> > Blog: http://freemanfang.blogspot.com
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman Fang <fr...@gmail.com>.
Ok, figured out it's an karaf issue[1] and fixed it.
Again, IMO it's not a show stopper as the bundle function well
actually, so we can pick up this release after SMX4.4.
[1]https://issues.apache.org/jira/browse/KARAF-1114
Freeman
On 2011-12-17, at 上午10:11, Freeman Fang wrote:
> Hi,
>
> I don't think the problem you encountered here is same as it in
> ARIES-626.
>
> I did a quick test with the test case you appended with SMX4-1003 on
> the SMX 4.4 releasse candidate kit apache-servicemix-
> full-4.4.0.tar.gz, I can see "Test Spring Osgi Service" bundle
> spring status isn't "Started" after I restart SMX BOTH with and
> without internet connection.
> So the status is
> [ 158] [Active ] [ ] [ ] [ 60] Test Spring
> Osgi Service (0.1.0.SNAPSHOT)
> the expected one should be
> [ 158] [Active ] [ ] [Started] [ 60] Test Spring
> Osgi Service (0.1.0.SNAPSHOT)
>
> However, this has nothing to do with offline mode, this is just that
> the restart SMX can't show correct spring bundle status, even though
> the spring bundle is actually in good shape.
> I can see this on other bundles also(both online and offline), like
> cxf-jaxrs example, which is pure spring configuration and has
> nothing to do with blueprint.
>
> As you describe it try to download spring xsd files, but I'm quiet
> sure cxf-bundle.jar embedded all necessary xsd files so generally it
> won't try to download the remote one.
> If it need download something with offline mode, then osgi:update
> the bundle won't make it correct.
>
> The ARIES-626 is about in blueprint configuration, xsd:include or
> xsd:import can't use local xsd, but it's totally another issue.
>
> In summary, the problem you encounter is that restart smx4 can't
> show spring bundle status correctly, though the spring bundle
> actually in good shape and all function are good,would you please
> create an issue to track it, so that we can fix it after 4.4
> release(it's not a show stopper IMO as the bundle function well
> actually) and I'm not sure so far where we need fix it(probably in
> Karaf, not sure).
>
> Freeman
>
>
> On 2011-12-17, at 上午3:29, Ge@@ru wrote:
>
>> I don't know if we have ready for smx-4.4.0 :'(
>>
>> I'm trying to use cxf on offline environment but I haven't found
>> yet a
>> solution.
>>
>> * With blueprint + cxf it isn't possible deploy cxf bundle for
>> problem
>> describe on SMX-1003 (https://issues.apache.org/jira/browse/
>> ARIES-626)
>>
>> * With spring there is a problem like for blueprint. Spring try to
>> download jaxrs.xsd and then doesn't start correctly (after a smx
>> restart)
>>
>> smx@root> features:install examples-cxf-jaxrs
>> smx@root> shutdown
>>
>> ... restart of smx
>>
>> (here sniffing of http request from smx)
>> 127.0.0.1 - - [16/Dec/2011:20:17:36 +0100] "GET
>> http://cxf.apache.org/schemas/jaxrs.xsd HTTP/1.1" 200 9161
>>
>> ..
>> (here bundle is Active but not Started (only an osgi:update or a
>> redeploy set status to Started))
>>
>> On production environment normally smx will be on offline
>> environment,
>> so, is it right release a smx-4.4.0 where isn't possible deploy/
>> restart
>> smx with cxf bundles?
>>
>> Is there a way to avoid spring xml validation and permit start of cxf
>> bundle correctly?
>>
>> Thanks
>>
>> Ge@@ru
>>
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Problem on use cxf on offline environment (on smx-4.4.x)
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
I don't think the problem you encountered here is same as it in
ARIES-626.
I did a quick test with the test case you appended with SMX4-1003 on
the SMX 4.4 releasse candidate kit apache-servicemix-
full-4.4.0.tar.gz, I can see "Test Spring Osgi Service" bundle spring
status isn't "Started" after I restart SMX BOTH with and without
internet connection.
So the status is
[ 158] [Active ] [ ] [ ] [ 60] Test Spring Osgi
Service (0.1.0.SNAPSHOT)
the expected one should be
[ 158] [Active ] [ ] [Started] [ 60] Test Spring Osgi
Service (0.1.0.SNAPSHOT)
However, this has nothing to do with offline mode, this is just that
the restart SMX can't show correct spring bundle status, even though
the spring bundle is actually in good shape.
I can see this on other bundles also(both online and offline), like
cxf-jaxrs example, which is pure spring configuration and has nothing
to do with blueprint.
As you describe it try to download spring xsd files, but I'm quiet
sure cxf-bundle.jar embedded all necessary xsd files so generally it
won't try to download the remote one.
If it need download something with offline mode, then osgi:update the
bundle won't make it correct.
The ARIES-626 is about in blueprint configuration, xsd:include or
xsd:import can't use local xsd, but it's totally another issue.
In summary, the problem you encounter is that restart smx4 can't show
spring bundle status correctly, though the spring bundle actually in
good shape and all function are good,would you please create an issue
to track it, so that we can fix it after 4.4 release(it's not a show
stopper IMO as the bundle function well actually) and I'm not sure so
far where we need fix it(probably in Karaf, not sure).
Freeman
On 2011-12-17, at 上午3:29, Ge@@ru wrote:
> I don't know if we have ready for smx-4.4.0 :'(
>
> I'm trying to use cxf on offline environment but I haven't found yet a
> solution.
>
> * With blueprint + cxf it isn't possible deploy cxf bundle for problem
> describe on SMX-1003 (https://issues.apache.org/jira/browse/ARIES-626)
>
> * With spring there is a problem like for blueprint. Spring try to
> download jaxrs.xsd and then doesn't start correctly (after a smx
> restart)
>
> smx@root> features:install examples-cxf-jaxrs
> smx@root> shutdown
>
> ... restart of smx
>
> (here sniffing of http request from smx)
> 127.0.0.1 - - [16/Dec/2011:20:17:36 +0100] "GET
> http://cxf.apache.org/schemas/jaxrs.xsd HTTP/1.1" 200 9161
>
> ..
> (here bundle is Active but not Started (only an osgi:update or a
> redeploy set status to Started))
>
> On production environment normally smx will be on offline environment,
> so, is it right release a smx-4.4.0 where isn't possible deploy/
> restart
> smx with cxf bundles?
>
> Is there a way to avoid spring xml validation and permit start of cxf
> bundle correctly?
>
> Thanks
>
> Ge@@ru
>
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com