On Fri, Mar 16, 2012 at 10:32 AM, Afkham Azeez <[email protected]> wrote:

>
>
> On Fri, Mar 16, 2012 at 10:14 AM, Isuru Suriarachchi <[email protected]>wrote:
>
>>
>>
>> On Thu, Mar 15, 2012 at 11:45 PM, Sameera Jayasoma <[email protected]>wrote:
>>
>>> Hi Isuru,
>>>
>>> On Mon, Mar 5, 2012 at 3:44 PM, Isuru Suriarachchi <[email protected]>wrote:
>>>
>>>> I was able to get this resolved by making the CXF bundle a fragment of
>>>> the tomcat bundle. This is the only option to deal with the CXF + Spring
>>>> combination. I think this is good enough for the initial implementation.
>>>
>>>
>>> Making CXF bundle a fragment of the Tomcat bundle is not a good enough
>>> solution to this problem. There is a fundamental class loading issue here
>>> specially when it comes to us Spring in OSGI. We need to properly fix this.
>>>
>>> As we discussed earlier, lets try the option of extending the CXFServlet
>>> and setting the classloader of the Spring context as the classloder of the
>>> CXF bundle.
>>>
>>
>>  +1. Let's try to get it to work properly. As I've already discussed with
>> you, my only concern is asking users to use the extended version of the
>> CXFServlet in order to make it work on Carbon. That introduces a
>> portability issue.
>>
>
> Yes, that is not acceptable. The users should be able to deploy their CXF
> webapps directly into Carbon without changes.
>

+1. Is there are way to make web app class loader child first? I think
after this tomcat osgi modifications this has set to parent first which
causes all these problems.

thanks,
Amila.

>
>
>>
>> Thanks,
>> ~Isuru
>>
>>
>>>
>>> Thanks,
>>>  Sameera.
>>>
>>>
>>>
>>>> However, while investigating the possible options, there are two other
>>>> improvements we can do.
>>>>
>>>> 1. Supporting CXF services as OSGi bundles. Here we have to use
>>>> blueprint to load the CXF context. This is already done in Karaf and it
>>>> will be a good addition to our framework as well.
>>>> 2. Supporting Webapps as OSGi bundles. This is something that we've
>>>> already discussed and this is also done in Karaf.
>>>>
>>>> Let's try to get these two also done for Carbon 4.0.0. This will take
>>>> us even closer to a pure OSGi based framework.
>>>>
>>>> Thanks,
>>>> ~Isuru
>>>>
>>>>
>>>> On Thu, Mar 1, 2012 at 3:44 PM, Isuru Suriarachchi <[email protected]>wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm facing a critical OSGi level issue when CXF is integrated into
>>>>> Carbon. CXF completely runs on spring and it has it's own spring handlers
>>>>> used for different purposes. So my CXF bundle has the spring.handlers file
>>>>> which registers custom spring handlers for each namespace. Following
>>>>> registration can be found in that file.
>>>>>
>>>>> http\://
>>>>> cxf.apache.org/jaxws=org.apache.cxf.jaxws.spring.NamespaceHandler
>>>>>
>>>>> Above class is also in my CXF bundle. But when I try to deploy a CXF
>>>>> service, it gives the following error.
>>>>>
>>>>> [2012-03-01 15:17:02,983]  INFO
>>>>> {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading
>>>>> XML bean definitions from URL
>>>>> [jndi:/localhost/cxf-library/WEB-INF/cxf-servlet.xml]
>>>>> Mar 1, 2012 3:17:05 PM org.apache.catalina.core.ApplicationContext log
>>>>> SEVERE: StandardWrapper.Throwable
>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>> Configuration problem: Unable to locate Spring NamespaceHandler for XML
>>>>> schema namespace [http://cxf.apache.org/jaxws]
>>>>> Offending resource: URL
>>>>> [jndi:/localhost/cxf-library/WEB-INF/cxf-servlet.xml]
>>>>> at
>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
>>>>>  at
>>>>> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
>>>>> at
>>>>> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
>>>>>  at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:316)
>>>>> at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1416)
>>>>>  at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1409)
>>>>>
>>>>> So it looks like the spring framework is unable to see the
>>>>> spring.handlers file when it runs in the OSGi environment. I tried
>>>>> different options to overcome this without any luck. Any ideas on how to
>>>>> resolve this?..
>>>>>
>>>>> Thanks,
>>>>> ~Isuru
>>>>>
>>>>> --
>>>>> Isuru Suriarachchi
>>>>> Technical Lead
>>>>> WSO2 Inc. http://wso2.com
>>>>> email : [email protected]
>>>>> blog : http://isurues.wordpress.com/
>>>>>
>>>>> lean . enterprise . middleware
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Isuru Suriarachchi
>>>> Technical Lead
>>>> WSO2 Inc. http://wso2.com
>>>> email : [email protected]
>>>> blog : http://isurues.wordpress.com/
>>>>
>>>> lean . enterprise . middleware
>>>>
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> [email protected]
>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Sameera Jayasoma
>>> Technical Lead and Product Manager, WSO2 Carbon
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: [email protected]
>>> blog: http://tech.jayasoma.org
>>>
>>>
>>> Lean . Enterprise . Middleware
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Isuru Suriarachchi
>> Technical Lead
>> WSO2 Inc. http://wso2.com
>> email : [email protected]
>> blog : http://isurues.wordpress.com/
>>
>> lean . enterprise . middleware
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * <http://www.apache.org/>**
> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
> *
> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
> *
> *
> *Lean . Enterprise . Middleware*
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to