You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Zapletal <ma...@gmail.com> on 2010/11/06 17:36:43 UTC

camel-cxf: exception when parsing cxf:schemaLocation element

Hello,

I am defining my CXF services in camel config (using 2.5.0) as follows:

<cxf:cxfEndpoint id="myService" address="/myService"
	serviceClass="com.example.MyService">
   <cxf:properties>
   	<entry key="schema-validation-enabled" value="true" />
	<entry key="schemaLocations" value="wsdl/*.xsd"/>
   </cxf:properties> <cxf:schemaLocations>								 
<cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation> 
</cxf:schemaLocations>
</cxf:cxfEndpoint>

When starting my Camel application an exception as shown below is 
thrown. It seems that the CXF bean parser does not know what to do with 
the cxf:schemaLocation element.

Do I have any configuration error or is this a potential bug? Then I 
would file a JIRA issue.

thanks,
marco



SCHWERWIEGEND: Exception sending context initialized event to listener 
instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration 
problem: Cannot locate BeanDefinitionParser for element [schemaLocation]
Offending resource: class path resource [camel-config.xml]
	at 
org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
	at 
org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
	at 
org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
	at 
org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
	at 
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
	at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
	at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
	at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
	at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
	at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
	at 
org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
	at 
org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
	at 
org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
	at 
org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
	at 
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
	at 
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
	at 
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
...

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Willem Jiang <wi...@gmail.com>.
On 11/7/10 5:09 PM, Claus Ibsen wrote:
> On Sun, Nov 7, 2010 at 5:24 AM, Willem Jiang<wi...@gmail.com>  wrote:
>> I just checked the code of camel-cxf, it doesn't support to take the
>> schemaLocation, so I create a JIRA[1] for it and will work on quick fix for
>> it shortly.
>>
>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>
>
> Willem can you double check the other options works as well? I can se
> the CXF schema has many options.
> We need to have unit tests for all those :)
Sure.
I just went through the options of CxfEndpoint, most of them are tested 
in camel-cxf.
For the cxfrs Endpoint, I need to add more unit tests for it.

>
>
>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>
>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>> schemaLocation.
>>>
>>> I've checked the schema, the element is defined there.
>>>
>>> regards,
>>> marco
>>>
>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>
>>>> Which namespace do you use for the "cxf" prefix?
>>>>
>>>> Christian
>>>>
>>>> Am 06.11.2010 17:40 schrieb "Marco Zapletal"<ma...@gmail.com>:
>>>>
>>>> Hello,
>>>>
>>>> I am defining my CXF services in camel config (using 2.5.0) as follows:
>>>>
>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>> serviceClass="com.example.MyService">
>>>> <cxf:properties>
>>>> <entry key="schema-validation-enabled" value="true" />
>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>> </cxf:properties>  <cxf:schemaLocations>
>>>>
>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>> </cxf:schemaLocations>
>>>> </cxf:cxfEndpoint>
>>>>
>>>> When starting my Camel application an exception as shown below is
>>>> thrown. It
>>>> seems that the CXF bean parser does not know what to do with the
>>>> cxf:schemaLocation element.
>>>>
>>>> Do I have any configuration error or is this a potential bug? Then I
>>>> would
>>>> file a JIRA issue.
>>>>
>>>> thanks,
>>>> marco
>>>>
>>>>
>>>>
>>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>>> instance of class org.springframework.web.context.ContextLoaderListener
>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>> [schemaLocation]
>>>> Offending resource: class path resource [camel-config.xml]
>>>> at
>>>>
>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>
>>>> at
>>>>
>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>
>>>> at
>>>>
>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>
>>>> at
>>>>
>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>
>>>> ...
>>>>
>>>
>>>
>>
>>
>> --
>> Willem
>> ----------------------------------
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.com (English)
>>          http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>>
>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Claus Ibsen <cl...@gmail.com>.
On Sun, Nov 7, 2010 at 5:24 AM, Willem Jiang <wi...@gmail.com> wrote:
> I just checked the code of camel-cxf, it doesn't support to take the
> schemaLocation, so I create a JIRA[1] for it and will work on quick fix for
> it shortly.
>
> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>

Willem can you double check the other options works as well? I can se
the CXF schema has many options.
We need to have unit tests for all those :)


> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>
>> http://camel.apache.org/schema/cxf is the namespace, which has
>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>> schemaLocation.
>>
>> I've checked the schema, the element is defined there.
>>
>> regards,
>> marco
>>
>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>
>>> Which namespace do you use for the "cxf" prefix?
>>>
>>> Christian
>>>
>>> Am 06.11.2010 17:40 schrieb "Marco Zapletal"<ma...@gmail.com>:
>>>
>>> Hello,
>>>
>>> I am defining my CXF services in camel config (using 2.5.0) as follows:
>>>
>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>> serviceClass="com.example.MyService">
>>> <cxf:properties>
>>> <entry key="schema-validation-enabled" value="true" />
>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>> </cxf:properties> <cxf:schemaLocations>
>>>
>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>> </cxf:schemaLocations>
>>> </cxf:cxfEndpoint>
>>>
>>> When starting my Camel application an exception as shown below is
>>> thrown. It
>>> seems that the CXF bean parser does not know what to do with the
>>> cxf:schemaLocation element.
>>>
>>> Do I have any configuration error or is this a potential bug? Then I
>>> would
>>> file a JIRA issue.
>>>
>>> thanks,
>>> marco
>>>
>>>
>>>
>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>> instance of class org.springframework.web.context.ContextLoaderListener
>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>> [schemaLocation]
>>> Offending resource: class path resource [camel-config.xml]
>>> at
>>>
>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>
>>> at
>>>
>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>
>>> at
>>>
>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>
>>> at
>>>
>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>
>>> at
>>>
>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>
>>> at
>>>
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>
>>> ...
>>>
>>
>>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Marco Zapletal <ma...@gmail.com>.
Hi Willem,

thanks for the solution. For the moment, I had to step back to 
2.5/2.2.11, but I will try your fix next week.


On 17.11.2010 14:32, Willem Jiang wrote:
> Hi Marco,
>
> I played with your test case and found something interesting, The issue
> is related to CXF bus initiation.
> I managed to run the test with CXF 2.3.0 by changing the
> camel-conf-test.xml like this
>
> <!-- import resource="classpath:META-INF/cxf/cxf.xml" /-->
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
>
> It looks like cxf.xml can't load the bus with the lazy-init components,
> if I remove the cxf.xml part, CXFSprintBusFactory will create the
> default bus itself, and it just work around the issue.
>
> I will dig bus code deeper to find if there is some better solution.
> BTW, current work around should work for CXF 2.2.x and CXF 2.3.x at the
> same time.
>
> On 11/16/10 12:11 AM, Marco Zapletal wrote:
>> thats true ;-) so please find attached a simple test case, which
>> demonstrates the error. If you switch the CXF version in the pom from
>> 2.3.0 back to 2.2.11 it works.
>>
>> thanks,
>> marco
>>
>>
>> On 14.11.2010 09:23, Willem Jiang wrote:
>>> I can't see any strange CXF bus setting from your configuration,
>>> So there must be some change in CXF 2.3.0 cause this issue.
>>> It's hard to trace the error without a test case :(
>>>
>>>
>>> On 11/12/10 7:21 PM, Marco Zapletal wrote:
>>>> sure. this is a condensed version of one of my tests
>>>>
>>>> http://pastebin.com/3u7q84ES
>>>>
>>>> this is the camel-config.xml file.
>>>>
>>>> http://pastebin.com/1UhDV7rw
>>>>
>>>> It is referenced from my JunitSpringConfig, which is a Spring
>>>> JavaConfig
>>>> @Configuration instance.
>>>>
>>>> I am using the latest snapshots of Camel 2.6-SNAPSHOT of CXF 2.3. Jetty
>>>> 7 is resolved as a dependency.
>>>>
>>>> thanks,
>>>> marco
>>>>
>>>>
>>>>
>>>> Am 12.11.2010 11:19, schrieb Willem Jiang:
>>>>> Can I have a look at your Junit tests code?
>>>>> I just want to asked the same thing in the CXF mailing list.
>>>>>
>>>>>
>>>>> On 11/12/10 6:05 PM, Marco Zapletal wrote:
>>>>>> Just something I wanted to add. The patch is working and when
>>>>>> deploying
>>>>>> my camel/cxf app to tomcat everything goes fine (the services are
>>>>>> deployed and the schemas are appropriately referenced).
>>>>>>
>>>>>> however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF
>>>>>> 2.3.0, I am getting NPEs as described on the cxf list
>>>>>>
>>>>>> http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> this problem, however, seems quite strange and I do not know how to
>>>>>> start searching for the cause.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 12.11.2010 01:23, schrieb Willem Jiang:
>>>>>>>
>>>>>>> Thanks for your report, it good to know the patch is working :)
>>>>>>>
>>>>>>> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine.
>>>>>>>> thanks.
>>>>>>>>
>>>>>>>>
>>>>>>>> On 10.11.2010 09:11, Willem Jiang wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Current camel-cxf is using CXF 2.3.0. It should be better if you
>>>>>>>>> try to
>>>>>>>>> run the test with CXF 2.3.0.
>>>>>>>>> If you can't use CXF 2.3.0, please make sure you are using CXF
>>>>>>>>> 2.2.11,
>>>>>>>>> and there is no other version of CXF in you classpath.
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Willem Jiang <wi...@gmail.com>.
Hi Marco,

I played with your test case and found something interesting, The issue 
is related to CXF bus initiation.
I managed to run the test with CXF 2.3.0 by changing the 
camel-conf-test.xml like this

<!-- import resource="classpath:META-INF/cxf/cxf.xml" /-->
	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
	<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />

It looks like cxf.xml can't load the bus with the lazy-init components, 
if I remove the cxf.xml part, CXFSprintBusFactory will create the 
default bus itself, and it just work around the issue.

I will dig bus code deeper to find if there is some better solution.
BTW, current work around should work for CXF 2.2.x and CXF 2.3.x at the 
same time.

On 11/16/10 12:11 AM, Marco Zapletal wrote:
> thats true ;-) so please find attached a simple test case, which
> demonstrates the error. If you switch the CXF version in the pom from
> 2.3.0 back to 2.2.11 it works.
>
> thanks,
> marco
>
>
> On 14.11.2010 09:23, Willem Jiang wrote:
>> I can't see any strange CXF bus setting from your configuration,
>> So there must be some change in CXF 2.3.0 cause this issue.
>> It's hard to trace the error without a test case :(
>>
>>
>> On 11/12/10 7:21 PM, Marco Zapletal wrote:
>>> sure. this is a condensed version of one of my tests
>>>
>>> http://pastebin.com/3u7q84ES
>>>
>>> this is the camel-config.xml file.
>>>
>>> http://pastebin.com/1UhDV7rw
>>>
>>> It is referenced from my JunitSpringConfig, which is a Spring JavaConfig
>>> @Configuration instance.
>>>
>>> I am using the latest snapshots of Camel 2.6-SNAPSHOT of CXF 2.3. Jetty
>>> 7 is resolved as a dependency.
>>>
>>> thanks,
>>> marco
>>>
>>>
>>>
>>> Am 12.11.2010 11:19, schrieb Willem Jiang:
>>>> Can I have a look at your Junit tests code?
>>>> I just want to asked the same thing in the CXF mailing list.
>>>>
>>>>
>>>> On 11/12/10 6:05 PM, Marco Zapletal wrote:
>>>>> Just something I wanted to add. The patch is working and when
>>>>> deploying
>>>>> my camel/cxf app to tomcat everything goes fine (the services are
>>>>> deployed and the schemas are appropriately referenced).
>>>>>
>>>>> however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF
>>>>> 2.3.0, I am getting NPEs as described on the cxf list
>>>>>
>>>>> http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> this problem, however, seems quite strange and I do not know how to
>>>>> start searching for the cause.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Am 12.11.2010 01:23, schrieb Willem Jiang:
>>>>>>
>>>>>> Thanks for your report, it good to know the patch is working :)
>>>>>>
>>>>>> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine.
>>>>>>> thanks.
>>>>>>>
>>>>>>>
>>>>>>> On 10.11.2010 09:11, Willem Jiang wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Current camel-cxf is using CXF 2.3.0. It should be better if you
>>>>>>>> try to
>>>>>>>> run the test with CXF 2.3.0.
>>>>>>>> If you can't use CXF 2.3.0, please make sure you are using CXF
>>>>>>>> 2.2.11,
>>>>>>>> and there is no other version of CXF in you classpath.
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Marco Zapletal <ma...@gmail.com>.
thats true ;-) so please find attached a simple test case, which 
demonstrates the error. If you switch the CXF version in the pom from 
2.3.0 back to 2.2.11 it works.

thanks,
marco


On 14.11.2010 09:23, Willem Jiang wrote:
> I can't see any strange CXF bus setting from your configuration,
> So there must be some change in CXF 2.3.0 cause this issue.
> It's hard to trace the error without a test case :(
>
>
> On 11/12/10 7:21 PM, Marco Zapletal wrote:
>> sure. this is a condensed version of one of my tests
>>
>> http://pastebin.com/3u7q84ES
>>
>> this is the camel-config.xml file.
>>
>> http://pastebin.com/1UhDV7rw
>>
>> It is referenced from my JunitSpringConfig, which is a Spring JavaConfig
>> @Configuration instance.
>>
>> I am using the latest snapshots of Camel 2.6-SNAPSHOT of CXF 2.3. Jetty
>> 7 is resolved as a dependency.
>>
>> thanks,
>> marco
>>
>>
>>
>> Am 12.11.2010 11:19, schrieb Willem Jiang:
>>> Can I have a look at your Junit tests code?
>>> I just want to asked the same thing in the CXF mailing list.
>>>
>>>
>>> On 11/12/10 6:05 PM, Marco Zapletal wrote:
>>>> Just something I wanted to add. The patch is working and when deploying
>>>> my camel/cxf app to tomcat everything goes fine (the services are
>>>> deployed and the schemas are appropriately referenced).
>>>>
>>>> however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF
>>>> 2.3.0, I am getting NPEs as described on the cxf list
>>>>
>>>> http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> this problem, however, seems quite strange and I do not know how to
>>>> start searching for the cause.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Am 12.11.2010 01:23, schrieb Willem Jiang:
>>>>>
>>>>> Thanks for your report, it good to know the patch is working :)
>>>>>
>>>>> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>>>>>> Hi,
>>>>>>
>>>>>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine.
>>>>>> thanks.
>>>>>>
>>>>>>
>>>>>> On 10.11.2010 09:11, Willem Jiang wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Current camel-cxf is using CXF 2.3.0. It should be better if you
>>>>>>> try to
>>>>>>> run the test with CXF 2.3.0.
>>>>>>> If you can't use CXF 2.3.0, please make sure you are using CXF
>>>>>>> 2.2.11,
>>>>>>> and there is no other version of CXF in you classpath.
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Willem Jiang <wi...@gmail.com>.
I can't see any strange CXF bus setting from your configuration,
So there must be some change in CXF 2.3.0 cause this issue.
It's hard to trace the error without a test case :(


On 11/12/10 7:21 PM, Marco Zapletal wrote:
> sure. this is a condensed version of one of my tests
>
> http://pastebin.com/3u7q84ES
>
> this is the camel-config.xml file.
>
> http://pastebin.com/1UhDV7rw
>
> It is referenced from my JunitSpringConfig, which is a Spring JavaConfig
> @Configuration instance.
>
> I am using the latest snapshots of Camel 2.6-SNAPSHOT of CXF 2.3. Jetty
> 7 is resolved as a dependency.
>
> thanks,
> marco
>
>
>
> Am 12.11.2010 11:19, schrieb Willem Jiang:
>> Can I have a look at your Junit tests code?
>> I just want to asked the same thing in the CXF mailing list.
>>
>>
>> On 11/12/10 6:05 PM, Marco Zapletal wrote:
>>> Just something I wanted to add. The patch is working and when deploying
>>> my camel/cxf app to tomcat everything goes fine (the services are
>>> deployed and the schemas are appropriately referenced).
>>>
>>> however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF
>>> 2.3.0, I am getting NPEs as described on the cxf list
>>>
>>> http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html
>>>
>>>
>>>
>>>
>>> this problem, however, seems quite strange and I do not know how to
>>> start searching for the cause.
>>>
>>>
>>>
>>>
>>>
>>>
>>> Am 12.11.2010 01:23, schrieb Willem Jiang:
>>>>
>>>> Thanks for your report, it good to know the patch is working :)
>>>>
>>>> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>>>>> Hi,
>>>>>
>>>>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine. thanks.
>>>>>
>>>>>
>>>>> On 10.11.2010 09:11, Willem Jiang wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Current camel-cxf is using CXF 2.3.0. It should be better if you
>>>>>> try to
>>>>>> run the test with CXF 2.3.0.
>>>>>> If you can't use CXF 2.3.0, please make sure you are using CXF
>>>>>> 2.2.11,
>>>>>> and there is no other version of CXF in you classpath.
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Marco Zapletal <ma...@gmail.com>.
sure. this is a condensed version of one of my tests

http://pastebin.com/3u7q84ES

this is the camel-config.xml file.

http://pastebin.com/1UhDV7rw

It is referenced from my JunitSpringConfig, which is a Spring JavaConfig 
@Configuration instance.

I am using the latest snapshots of Camel 2.6-SNAPSHOT of CXF 2.3. Jetty 
7 is resolved as a dependency.

thanks,
marco



Am 12.11.2010 11:19, schrieb Willem Jiang:
> Can I have a look at your Junit tests code?
> I just want to asked the same thing in the CXF mailing list.
>
>
> On 11/12/10 6:05 PM, Marco Zapletal wrote:
>> Just something I wanted to add. The patch is working and when deploying
>> my camel/cxf app to tomcat everything goes fine (the services are
>> deployed and the schemas are appropriately referenced).
>>
>> however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF
>> 2.3.0, I am getting NPEs as described on the cxf list
>>
>> http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html
>>
>>
>>
>> this problem, however, seems quite strange and I do not know how to
>> start searching for the cause.
>>
>>
>>
>>
>>
>>
>> Am 12.11.2010 01:23, schrieb Willem Jiang:
>>>
>>> Thanks for your report, it good to know the patch is working :)
>>>
>>> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>>>> Hi,
>>>>
>>>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine. thanks.
>>>>
>>>>
>>>> On 10.11.2010 09:11, Willem Jiang wrote:
>>>>> Hi,
>>>>>
>>>>> Current camel-cxf is using CXF 2.3.0. It should be better if you
>>>>> try to
>>>>> run the test with CXF 2.3.0.
>>>>> If you can't use CXF 2.3.0, please make sure you are using CXF 2.2.11,
>>>>> and there is no other version of CXF in you classpath.
>>>>>
>>>>>
>>>
>>>
>>>
>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Willem Jiang <wi...@gmail.com>.
Can I have a look at your Junit tests code?
I just want to asked the same thing in the CXF mailing list.


On 11/12/10 6:05 PM, Marco Zapletal wrote:
> Just something I wanted to add. The patch is working and when deploying
> my camel/cxf app to tomcat everything goes fine (the services are
> deployed and the schemas are appropriately referenced).
>
> however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF
> 2.3.0, I am getting NPEs as described on the cxf list
>
> http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html
>
>
> this problem, however, seems quite strange and I do not know how to
> start searching for the cause.
>
>
>
>
>
>
> Am 12.11.2010 01:23, schrieb Willem Jiang:
>>
>> Thanks for your report, it good to know the patch is working :)
>>
>> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>>> Hi,
>>>
>>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine. thanks.
>>>
>>>
>>> On 10.11.2010 09:11, Willem Jiang wrote:
>>>> Hi,
>>>>
>>>> Current camel-cxf is using CXF 2.3.0. It should be better if you try to
>>>> run the test with CXF 2.3.0.
>>>> If you can't use CXF 2.3.0, please make sure you are using CXF 2.2.11,
>>>> and there is no other version of CXF in you classpath.
>>>>
>>>>
>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Marco Zapletal <ma...@gmail.com>.
Just something I wanted to add. The patch is working and when deploying 
my camel/cxf app to tomcat everything goes fine (the services are 
deployed and the schemas are appropriately referenced).

however, when running my Junit tests with CXF 2.6-SNAPSHOT and CXF 
2.3.0, I am getting NPEs as described on the cxf list

http://cxf.547215.n5.nabble.com/2-3-0-NPE-in-ClientImpl-setupInterceptorChain-tp3260303p3260303.html

this problem, however, seems quite strange and I do not know how to 
start searching for the cause.






Am 12.11.2010 01:23, schrieb Willem Jiang:
>
> Thanks for your report, it good to know the patch is working :)
>
> On 11/11/10 10:05 PM, Marco Zapletal wrote:
>> Hi,
>>
>> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine. thanks.
>>
>>
>> On 10.11.2010 09:11, Willem Jiang wrote:
>>> Hi,
>>>
>>> Current camel-cxf is using CXF 2.3.0. It should be better if you try to
>>> run the test with CXF 2.3.0.
>>> If you can't use CXF 2.3.0, please make sure you are using CXF 2.2.11,
>>> and there is no other version of CXF in you classpath.
>>>
>>>
>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Willem Jiang <wi...@gmail.com>.
Thanks for your report, it good to know the patch is working :)

On 11/11/10 10:05 PM, Marco Zapletal wrote:
> Hi,
>
> using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine. thanks.
>
>
> On 10.11.2010 09:11, Willem Jiang wrote:
>> Hi,
>>
>> Current camel-cxf is using CXF 2.3.0. It should be better if you try to
>> run the test with CXF 2.3.0.
>> If you can't use CXF 2.3.0, please make sure you are using CXF 2.2.11,
>> and there is no other version of CXF in you classpath.
>>
>>



-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Marco Zapletal <ma...@gmail.com>.
Hi,

using 2.6-SNAPSHOT together with CXF 2.3.0 seems to work fine. thanks.


On 10.11.2010 09:11, Willem Jiang wrote:
> Hi,
>
> Current camel-cxf is using CXF 2.3.0. It should be better if you try to
> run the test with CXF 2.3.0.
> If you can't use CXF 2.3.0, please make sure you are using CXF 2.2.11,
> and there is no other version of CXF in you classpath.
>
>
> On 11/9/10 10:40 PM, Marco Zapletal wrote:
>> Hi,
>>
>>
>> I am having again problems with the maven snapshot repo, which prevents
>> me to try it with CXF 2.3.0. Below you see which versions of the camel
>> jars are downloaded today for 2.6-SNAPSHOT using the -U or even after
>> purging the 2.6-SNAPSHOT from my local repo:
>>
>> o org.apache.camel:camel-jms:2.6-20101102.030631-1
>> o org.apache.camel:camel-core:2.6-20101102.030631-1
>> o org.apache.camel:camel-spring:2.6-20101102.030631-1
>> o org.apache.camel:camel-cxf:2.6-20101102.030631-1
>> o org.apache.camel:camel-jaxb:2.6-SNAPSHOT
>> o org.apache.camel:camel-jpa:2.6-SNAPSHOT
>> o org.apache.camel:camel-spring-javaconfig:2.6-20101102.030631-1
>> o org.apache.camel:camel-test:2.6-20101102.030631-1
>>
>> For jaxb/jpa the latest version is downloaded, for cxf and the others (I
>> include in my pom) the version of 2010/11/02 is downloaded. This means
>> also I am downloading again the camel-cxf version, that hasn't yet
>> included your fix.
>>
>> I credit the problem to the difference in the maven-metadata.xml of the
>> projects (but I am not a maven expert though)
>>
>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/maven-metadata.xml
>>
>>
>>
>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-jaxb/2.6-SNAPSHOT/maven-metadata.xml
>>
>>
>>
>> regards,
>> marco
>>
>> On 09.11.2010 02:33, Willem Jiang wrote:
>>> Hi,
>>>
>>> Just one more thing, current camel-cxf is using CXF 2.3.0 now.
>>> Please make sure there is no other version of CXF in your class.
>>>
>>>
>>> On 11/9/10 8:53 AM, Willem Jiang wrote:
>>>> Hi Marco,
>>>>
>>>> The schemaLocation is passed to the ServiceFactoryBean.
>>>> Can you send me a simple test case of this issue ? So I can dig the
>>>> issue shortly.
>>>>
>>>> On 11/8/10 10:59 PM, Marco Zapletal wrote:
>>>>> I have checked out the latest snapshots now. The exception is gone,
>>>>> however, the generated WSDL does not reference the schema given in the
>>>>> schemaLocation.
>>>>>
>>>>> My schemaLocation definition corresponds to the example given by
>>>>> Willem.
>>>>> The only output I get from the log files is as follows:
>>>>>
>>>>> INFO:Bean 'cxf:schemaLocation#13e9934' of type [class
>>>>> java.lang.String]
>>>>> is not eligible for getting processed by all BeanPostProcessors (for
>>>>> example: not eligible for auto-proxying)
>>>>> 08.11.2010 15:45:38
>>>>> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker.postProcessAfterInitialization.1332
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> INFO:Bean 'cxf:schemaLocation#bc36ff' of type [class java.lang.String]
>>>>> is not eligible for getting processed by all BeanPostProcessors (for
>>>>> example: not eligible for auto-proxying)
>>>>>
>>>>> If I switch the schemaLocation parameter to some dummy location, no
>>>>> error or any other reaction is logged (which would be the behavior
>>>>> when
>>>>> a wsdlLocation is not found). Hence, it seems that setting the
>>>>> schemaLocation doesnt have any effect.
>>>>>
>>>>> Any hint would be appreciated.
>>>>>
>>>>> regards,
>>>>> marco
>>>>>
>>>>>
>>>>> On 08.11.2010 11:19, Claus Ibsen wrote:
>>>>>> On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
>>>>>> <ma...@gmail.com> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>> thanks for providing such a quick fix. I switched from 2.5 to
>>>>>>> 2.6-SNAPSHOT,
>>>>>>> but it seems that the snapshots jar's haven't been built since
>>>>>>> 2010/11/02.
>>>>>>>
>>>>>>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Yeah the Apache hudson CI servers havent been able to do a successful
>>>>>> deploy for a little while.
>>>>>> Willem have just fixed some issues which strangely was only happening
>>>>>> on Apache hudson.
>>>>>> That fix ought to let it be able to deploy artifacts again.
>>>>>>
>>>>>> I have kicked off a new build now
>>>>>> https://hudson.apache.org/hudson/job/Camel/1054
>>>>>>
>>>>>>
>>>>>>
>>>>>>> regards,
>>>>>>> marco
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 07.11.2010 12:19, Willem Jiang wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I just committed a fix into camel trunk, please check out the
>>>>>>>> latest
>>>>>>>> Camel 2.6-SNAPSHOT for verification.
>>>>>>>> BTW, the right configuration of schemaLocations is like below.
>>>>>>>>
>>>>>>>> <cxf:cxfEndpoint id="routerEndpoint"
>>>>>>>> address="http://localhost:9000/router"
>>>>>>>> serviceClass="org.apache.camel.component.cxf.HelloService">
>>>>>>>> <cxf:schemaLocations>
>>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>>> </cxf:schemaLocations>
>>>>>>>> </cxf:cxfEndpoint>
>>>>>>>>
>>>>>>>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>>>>>>>
>>>>>>>>> Thanks for that quick reaction.
>>>>>>>>>
>>>>>>>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>>>>>>>
>>>>>>>>>> I just checked the code of camel-cxf, it doesn't support to take
>>>>>>>>>> the
>>>>>>>>>> schemaLocation, so I create a JIRA[1] for it and will work on
>>>>>>>>>> quick fix
>>>>>>>>>> for it shortly.
>>>>>>>>>>
>>>>>>>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>>>>>>>
>>>>>>>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>>>>>>>
>>>>>>>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>>>>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>>>>>>>> schemaLocation.
>>>>>>>>>>>
>>>>>>>>>>> I've checked the schema, the element is defined there.
>>>>>>>>>>>
>>>>>>>>>>> regards,
>>>>>>>>>>> marco
>>>>>>>>>>>
>>>>>>>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>>>>>>>
>>>>>>>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>>>>>>>
>>>>>>>>>>>> Christian
>>>>>>>>>>>>
>>>>>>>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>>>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>>>>>>>
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>>>>>>>> follows:
>>>>>>>>>>>>
>>>>>>>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>>>>>>>> serviceClass="com.example.MyService">
>>>>>>>>>>>> <cxf:properties>
>>>>>>>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>>>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>>>>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>>>>>>>>
>>>>>>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> </cxf:schemaLocations>
>>>>>>>>>>>> </cxf:cxfEndpoint>
>>>>>>>>>>>>
>>>>>>>>>>>> When starting my Camel application an exception as shown
>>>>>>>>>>>> below is
>>>>>>>>>>>> thrown. It
>>>>>>>>>>>> seems that the CXF bean parser does not know what to do with
>>>>>>>>>>>> the
>>>>>>>>>>>> cxf:schemaLocation element.
>>>>>>>>>>>>
>>>>>>>>>>>> Do I have any configuration error or is this a potential bug?
>>>>>>>>>>>> Then I
>>>>>>>>>>>> would
>>>>>>>>>>>> file a JIRA issue.
>>>>>>>>>>>>
>>>>>>>>>>>> thanks,
>>>>>>>>>>>> marco
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> SCHWERWIEGEND: Exception sending context initialized event to
>>>>>>>>>>>> listener
>>>>>>>>>>>> instance of class
>>>>>>>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for
>>>>>>>>>>>> element
>>>>>>>>>>>> [schemaLocation]
>>>>>>>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> at
>>>>>>>>>>>>
>>>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ...
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

Current camel-cxf is using CXF 2.3.0. It should be better if you try to 
run the test with CXF 2.3.0.
If you can't use CXF 2.3.0, please make sure you are using CXF 2.2.11, 
and there is no other version of CXF in you classpath.


On 11/9/10 10:40 PM, Marco Zapletal wrote:
> Hi,
>
>
> I am having again problems with the maven snapshot repo, which prevents
> me to try it with CXF 2.3.0. Below you see which versions of the camel
> jars are downloaded today for 2.6-SNAPSHOT using the -U or even after
> purging the 2.6-SNAPSHOT from my local repo:
>
> o org.apache.camel:camel-jms:2.6-20101102.030631-1
> o org.apache.camel:camel-core:2.6-20101102.030631-1
> o org.apache.camel:camel-spring:2.6-20101102.030631-1
> o org.apache.camel:camel-cxf:2.6-20101102.030631-1
> o org.apache.camel:camel-jaxb:2.6-SNAPSHOT
> o org.apache.camel:camel-jpa:2.6-SNAPSHOT
> o org.apache.camel:camel-spring-javaconfig:2.6-20101102.030631-1
> o org.apache.camel:camel-test:2.6-20101102.030631-1
>
> For jaxb/jpa the latest version is downloaded, for cxf and the others (I
> include in my pom) the version of 2010/11/02 is downloaded. This means
> also I am downloading again the camel-cxf version, that hasn't yet
> included your fix.
>
> I credit the problem to the difference in the maven-metadata.xml of the
> projects (but I am not a maven expert though)
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/maven-metadata.xml
>
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-jaxb/2.6-SNAPSHOT/maven-metadata.xml
>
>
> regards,
> marco
>
> On 09.11.2010 02:33, Willem Jiang wrote:
>> Hi,
>>
>> Just one more thing, current camel-cxf is using CXF 2.3.0 now.
>> Please make sure there is no other version of CXF in your class.
>>
>>
>> On 11/9/10 8:53 AM, Willem Jiang wrote:
>>> Hi Marco,
>>>
>>> The schemaLocation is passed to the ServiceFactoryBean.
>>> Can you send me a simple test case of this issue ? So I can dig the
>>> issue shortly.
>>>
>>> On 11/8/10 10:59 PM, Marco Zapletal wrote:
>>>> I have checked out the latest snapshots now. The exception is gone,
>>>> however, the generated WSDL does not reference the schema given in the
>>>> schemaLocation.
>>>>
>>>> My schemaLocation definition corresponds to the example given by
>>>> Willem.
>>>> The only output I get from the log files is as follows:
>>>>
>>>> INFO:Bean 'cxf:schemaLocation#13e9934' of type [class java.lang.String]
>>>> is not eligible for getting processed by all BeanPostProcessors (for
>>>> example: not eligible for auto-proxying)
>>>> 08.11.2010 15:45:38
>>>> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker.postProcessAfterInitialization.1332
>>>>
>>>>
>>>>
>>>>
>>>> INFO:Bean 'cxf:schemaLocation#bc36ff' of type [class java.lang.String]
>>>> is not eligible for getting processed by all BeanPostProcessors (for
>>>> example: not eligible for auto-proxying)
>>>>
>>>> If I switch the schemaLocation parameter to some dummy location, no
>>>> error or any other reaction is logged (which would be the behavior when
>>>> a wsdlLocation is not found). Hence, it seems that setting the
>>>> schemaLocation doesnt have any effect.
>>>>
>>>> Any hint would be appreciated.
>>>>
>>>> regards,
>>>> marco
>>>>
>>>>
>>>> On 08.11.2010 11:19, Claus Ibsen wrote:
>>>>> On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
>>>>> <ma...@gmail.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>> thanks for providing such a quick fix. I switched from 2.5 to
>>>>>> 2.6-SNAPSHOT,
>>>>>> but it seems that the snapshots jar's haven't been built since
>>>>>> 2010/11/02.
>>>>>>
>>>>>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> Yeah the Apache hudson CI servers havent been able to do a successful
>>>>> deploy for a little while.
>>>>> Willem have just fixed some issues which strangely was only happening
>>>>> on Apache hudson.
>>>>> That fix ought to let it be able to deploy artifacts again.
>>>>>
>>>>> I have kicked off a new build now
>>>>> https://hudson.apache.org/hudson/job/Camel/1054
>>>>>
>>>>>
>>>>>
>>>>>> regards,
>>>>>> marco
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 07.11.2010 12:19, Willem Jiang wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I just committed a fix into camel trunk, please check out the latest
>>>>>>> Camel 2.6-SNAPSHOT for verification.
>>>>>>> BTW, the right configuration of schemaLocations is like below.
>>>>>>>
>>>>>>> <cxf:cxfEndpoint id="routerEndpoint"
>>>>>>> address="http://localhost:9000/router"
>>>>>>> serviceClass="org.apache.camel.component.cxf.HelloService">
>>>>>>> <cxf:schemaLocations>
>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>> </cxf:schemaLocations>
>>>>>>> </cxf:cxfEndpoint>
>>>>>>>
>>>>>>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>>>>>>
>>>>>>>> Thanks for that quick reaction.
>>>>>>>>
>>>>>>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>>>>>>
>>>>>>>>> I just checked the code of camel-cxf, it doesn't support to take
>>>>>>>>> the
>>>>>>>>> schemaLocation, so I create a JIRA[1] for it and will work on
>>>>>>>>> quick fix
>>>>>>>>> for it shortly.
>>>>>>>>>
>>>>>>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>>>>>>
>>>>>>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>>>>>>
>>>>>>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>>>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>>>>>>> schemaLocation.
>>>>>>>>>>
>>>>>>>>>> I've checked the schema, the element is defined there.
>>>>>>>>>>
>>>>>>>>>> regards,
>>>>>>>>>> marco
>>>>>>>>>>
>>>>>>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>>>>>>
>>>>>>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>>>>>>
>>>>>>>>>>> Christian
>>>>>>>>>>>
>>>>>>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>>>>>>> follows:
>>>>>>>>>>>
>>>>>>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>>>>>>> serviceClass="com.example.MyService">
>>>>>>>>>>> <cxf:properties>
>>>>>>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>>>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>>>>>>>
>>>>>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> </cxf:schemaLocations>
>>>>>>>>>>> </cxf:cxfEndpoint>
>>>>>>>>>>>
>>>>>>>>>>> When starting my Camel application an exception as shown
>>>>>>>>>>> below is
>>>>>>>>>>> thrown. It
>>>>>>>>>>> seems that the CXF bean parser does not know what to do with the
>>>>>>>>>>> cxf:schemaLocation element.
>>>>>>>>>>>
>>>>>>>>>>> Do I have any configuration error or is this a potential bug?
>>>>>>>>>>> Then I
>>>>>>>>>>> would
>>>>>>>>>>> file a JIRA issue.
>>>>>>>>>>>
>>>>>>>>>>> thanks,
>>>>>>>>>>> marco
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> SCHWERWIEGEND: Exception sending context initialized event to
>>>>>>>>>>> listener
>>>>>>>>>>> instance of class
>>>>>>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for
>>>>>>>>>>> element
>>>>>>>>>>> [schemaLocation]
>>>>>>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>>
>>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ...
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element | 2.6-SNAPSHOT maven problem

Posted by Marco Zapletal <ma...@gmail.com>.
Hi,


I am having again problems with the maven snapshot repo, which prevents 
me to try it with CXF 2.3.0. Below you see which versions of the camel 
jars are downloaded today for 2.6-SNAPSHOT using the -U or even after 
purging the 2.6-SNAPSHOT from my local repo:

        o org.apache.camel:camel-jms:2.6-20101102.030631-1
        o org.apache.camel:camel-core:2.6-20101102.030631-1
        o org.apache.camel:camel-spring:2.6-20101102.030631-1
        o org.apache.camel:camel-cxf:2.6-20101102.030631-1
        o org.apache.camel:camel-jaxb:2.6-SNAPSHOT
        o org.apache.camel:camel-jpa:2.6-SNAPSHOT
        o org.apache.camel:camel-spring-javaconfig:2.6-20101102.030631-1
        o org.apache.camel:camel-test:2.6-20101102.030631-1

For jaxb/jpa the latest version is downloaded, for cxf and the others (I 
include in my pom) the version of 2010/11/02 is downloaded. This means 
also I am downloading again the camel-cxf version, that hasn't yet 
included your fix.

I credit the problem to the difference in the maven-metadata.xml of the 
projects (but I am not a maven expert though)

https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/maven-metadata.xml

https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-jaxb/2.6-SNAPSHOT/maven-metadata.xml

regards,
marco

On 09.11.2010 02:33, Willem Jiang wrote:
> Hi,
>
> Just one more thing, current camel-cxf is using CXF 2.3.0 now.
> Please make sure there is no other version of CXF in your class.
>
>
> On 11/9/10 8:53 AM, Willem Jiang wrote:
>> Hi Marco,
>>
>> The schemaLocation is passed to the ServiceFactoryBean.
>> Can you send me a simple test case of this issue ? So I can dig the
>> issue shortly.
>>
>> On 11/8/10 10:59 PM, Marco Zapletal wrote:
>>> I have checked out the latest snapshots now. The exception is gone,
>>> however, the generated WSDL does not reference the schema given in the
>>> schemaLocation.
>>>
>>> My schemaLocation definition corresponds to the example given by Willem.
>>> The only output I get from the log files is as follows:
>>>
>>> INFO:Bean 'cxf:schemaLocation#13e9934' of type [class java.lang.String]
>>> is not eligible for getting processed by all BeanPostProcessors (for
>>> example: not eligible for auto-proxying)
>>> 08.11.2010 15:45:38
>>> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker.postProcessAfterInitialization.1332
>>>
>>>
>>>
>>> INFO:Bean 'cxf:schemaLocation#bc36ff' of type [class java.lang.String]
>>> is not eligible for getting processed by all BeanPostProcessors (for
>>> example: not eligible for auto-proxying)
>>>
>>> If I switch the schemaLocation parameter to some dummy location, no
>>> error or any other reaction is logged (which would be the behavior when
>>> a wsdlLocation is not found). Hence, it seems that setting the
>>> schemaLocation doesnt have any effect.
>>>
>>> Any hint would be appreciated.
>>>
>>> regards,
>>> marco
>>>
>>>
>>> On 08.11.2010 11:19, Claus Ibsen wrote:
>>>> On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
>>>> <ma...@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>>
>>>>> thanks for providing such a quick fix. I switched from 2.5 to
>>>>> 2.6-SNAPSHOT,
>>>>> but it seems that the snapshots jar's haven't been built since
>>>>> 2010/11/02.
>>>>>
>>>>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> Yeah the Apache hudson CI servers havent been able to do a successful
>>>> deploy for a little while.
>>>> Willem have just fixed some issues which strangely was only happening
>>>> on Apache hudson.
>>>> That fix ought to let it be able to deploy artifacts again.
>>>>
>>>> I have kicked off a new build now
>>>> https://hudson.apache.org/hudson/job/Camel/1054
>>>>
>>>>
>>>>
>>>>> regards,
>>>>> marco
>>>>>
>>>>>
>>>>>
>>>>> On 07.11.2010 12:19, Willem Jiang wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I just committed a fix into camel trunk, please check out the latest
>>>>>> Camel 2.6-SNAPSHOT for verification.
>>>>>> BTW, the right configuration of schemaLocations is like below.
>>>>>>
>>>>>> <cxf:cxfEndpoint id="routerEndpoint"
>>>>>> address="http://localhost:9000/router"
>>>>>> serviceClass="org.apache.camel.component.cxf.HelloService">
>>>>>> <cxf:schemaLocations>
>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>> </cxf:schemaLocations>
>>>>>> </cxf:cxfEndpoint>
>>>>>>
>>>>>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>>>>>
>>>>>>> Thanks for that quick reaction.
>>>>>>>
>>>>>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>>>>>
>>>>>>>> I just checked the code of camel-cxf, it doesn't support to take
>>>>>>>> the
>>>>>>>> schemaLocation, so I create a JIRA[1] for it and will work on
>>>>>>>> quick fix
>>>>>>>> for it shortly.
>>>>>>>>
>>>>>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>>>>>
>>>>>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>>>>>
>>>>>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>>>>>> schemaLocation.
>>>>>>>>>
>>>>>>>>> I've checked the schema, the element is defined there.
>>>>>>>>>
>>>>>>>>> regards,
>>>>>>>>> marco
>>>>>>>>>
>>>>>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>>>>>
>>>>>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>>>>>> follows:
>>>>>>>>>>
>>>>>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>>>>>> serviceClass="com.example.MyService">
>>>>>>>>>> <cxf:properties>
>>>>>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>>>>>>
>>>>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> </cxf:schemaLocations>
>>>>>>>>>> </cxf:cxfEndpoint>
>>>>>>>>>>
>>>>>>>>>> When starting my Camel application an exception as shown below is
>>>>>>>>>> thrown. It
>>>>>>>>>> seems that the CXF bean parser does not know what to do with the
>>>>>>>>>> cxf:schemaLocation element.
>>>>>>>>>>
>>>>>>>>>> Do I have any configuration error or is this a potential bug?
>>>>>>>>>> Then I
>>>>>>>>>> would
>>>>>>>>>> file a JIRA issue.
>>>>>>>>>>
>>>>>>>>>> thanks,
>>>>>>>>>> marco
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> SCHWERWIEGEND: Exception sending context initialized event to
>>>>>>>>>> listener
>>>>>>>>>> instance of class
>>>>>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for
>>>>>>>>>> element
>>>>>>>>>> [schemaLocation]
>>>>>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ...
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

Just one more thing, current camel-cxf is using CXF 2.3.0 now.
Please make sure there is no other version of CXF in your class.


On 11/9/10 8:53 AM, Willem Jiang wrote:
> Hi Marco,
>
> The schemaLocation is passed to the ServiceFactoryBean.
> Can you send me a simple test case of this issue ? So I can dig the
> issue shortly.
>
> On 11/8/10 10:59 PM, Marco Zapletal wrote:
>> I have checked out the latest snapshots now. The exception is gone,
>> however, the generated WSDL does not reference the schema given in the
>> schemaLocation.
>>
>> My schemaLocation definition corresponds to the example given by Willem.
>> The only output I get from the log files is as follows:
>>
>> INFO:Bean 'cxf:schemaLocation#13e9934' of type [class java.lang.String]
>> is not eligible for getting processed by all BeanPostProcessors (for
>> example: not eligible for auto-proxying)
>> 08.11.2010 15:45:38
>> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker.postProcessAfterInitialization.1332
>>
>>
>> INFO:Bean 'cxf:schemaLocation#bc36ff' of type [class java.lang.String]
>> is not eligible for getting processed by all BeanPostProcessors (for
>> example: not eligible for auto-proxying)
>>
>> If I switch the schemaLocation parameter to some dummy location, no
>> error or any other reaction is logged (which would be the behavior when
>> a wsdlLocation is not found). Hence, it seems that setting the
>> schemaLocation doesnt have any effect.
>>
>> Any hint would be appreciated.
>>
>> regards,
>> marco
>>
>>
>> On 08.11.2010 11:19, Claus Ibsen wrote:
>>> On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
>>> <ma...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>>
>>>> thanks for providing such a quick fix. I switched from 2.5 to
>>>> 2.6-SNAPSHOT,
>>>> but it seems that the snapshots jar's haven't been built since
>>>> 2010/11/02.
>>>>
>>>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>>>>
>>>>
>>>>
>>>
>>> Yeah the Apache hudson CI servers havent been able to do a successful
>>> deploy for a little while.
>>> Willem have just fixed some issues which strangely was only happening
>>> on Apache hudson.
>>> That fix ought to let it be able to deploy artifacts again.
>>>
>>> I have kicked off a new build now
>>> https://hudson.apache.org/hudson/job/Camel/1054
>>>
>>>
>>>
>>>> regards,
>>>> marco
>>>>
>>>>
>>>>
>>>> On 07.11.2010 12:19, Willem Jiang wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I just committed a fix into camel trunk, please check out the latest
>>>>> Camel 2.6-SNAPSHOT for verification.
>>>>> BTW, the right configuration of schemaLocations is like below.
>>>>>
>>>>> <cxf:cxfEndpoint id="routerEndpoint"
>>>>> address="http://localhost:9000/router"
>>>>> serviceClass="org.apache.camel.component.cxf.HelloService">
>>>>> <cxf:schemaLocations>
>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>> </cxf:schemaLocations>
>>>>> </cxf:cxfEndpoint>
>>>>>
>>>>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>>>>
>>>>>> Thanks for that quick reaction.
>>>>>>
>>>>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>>>>
>>>>>>> I just checked the code of camel-cxf, it doesn't support to take the
>>>>>>> schemaLocation, so I create a JIRA[1] for it and will work on
>>>>>>> quick fix
>>>>>>> for it shortly.
>>>>>>>
>>>>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>>>>
>>>>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>>>>
>>>>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>>>>> schemaLocation.
>>>>>>>>
>>>>>>>> I've checked the schema, the element is defined there.
>>>>>>>>
>>>>>>>> regards,
>>>>>>>> marco
>>>>>>>>
>>>>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>>>>
>>>>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>>>>> follows:
>>>>>>>>>
>>>>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>>>>> serviceClass="com.example.MyService">
>>>>>>>>> <cxf:properties>
>>>>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>>>>>
>>>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>>>>
>>>>>>>>> </cxf:schemaLocations>
>>>>>>>>> </cxf:cxfEndpoint>
>>>>>>>>>
>>>>>>>>> When starting my Camel application an exception as shown below is
>>>>>>>>> thrown. It
>>>>>>>>> seems that the CXF bean parser does not know what to do with the
>>>>>>>>> cxf:schemaLocation element.
>>>>>>>>>
>>>>>>>>> Do I have any configuration error or is this a potential bug?
>>>>>>>>> Then I
>>>>>>>>> would
>>>>>>>>> file a JIRA issue.
>>>>>>>>>
>>>>>>>>> thanks,
>>>>>>>>> marco
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> SCHWERWIEGEND: Exception sending context initialized event to
>>>>>>>>> listener
>>>>>>>>> instance of class
>>>>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for
>>>>>>>>> element
>>>>>>>>> [schemaLocation]
>>>>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ...
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Willem Jiang <wi...@gmail.com>.
Hi Marco,

The schemaLocation is passed to the ServiceFactoryBean.
Can you send me a simple test case of this issue ? So I can dig the 
issue shortly.

On 11/8/10 10:59 PM, Marco Zapletal wrote:
> I have checked out the latest snapshots now. The exception is gone,
> however, the generated WSDL does not reference the schema given in the
> schemaLocation.
>
> My schemaLocation definition corresponds to the example given by Willem.
> The only output I get from the log files is as follows:
>
> INFO:Bean 'cxf:schemaLocation#13e9934' of type [class java.lang.String]
> is not eligible for getting processed by all BeanPostProcessors (for
> example: not eligible for auto-proxying)
> 08.11.2010 15:45:38
> org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker.postProcessAfterInitialization.1332
>
> INFO:Bean 'cxf:schemaLocation#bc36ff' of type [class java.lang.String]
> is not eligible for getting processed by all BeanPostProcessors (for
> example: not eligible for auto-proxying)
>
> If I switch the schemaLocation parameter to some dummy location, no
> error or any other reaction is logged (which would be the behavior when
> a wsdlLocation is not found). Hence, it seems that setting the
> schemaLocation doesnt have any effect.
>
> Any hint would be appreciated.
>
> regards,
> marco
>
>
> On 08.11.2010 11:19, Claus Ibsen wrote:
>> On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
>> <ma...@gmail.com> wrote:
>>> Hi,
>>>
>>>
>>> thanks for providing such a quick fix. I switched from 2.5 to
>>> 2.6-SNAPSHOT,
>>> but it seems that the snapshots jar's haven't been built since
>>> 2010/11/02.
>>>
>>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>>>
>>>
>>
>> Yeah the Apache hudson CI servers havent been able to do a successful
>> deploy for a little while.
>> Willem have just fixed some issues which strangely was only happening
>> on Apache hudson.
>> That fix ought to let it be able to deploy artifacts again.
>>
>> I have kicked off a new build now
>> https://hudson.apache.org/hudson/job/Camel/1054
>>
>>
>>
>>> regards,
>>> marco
>>>
>>>
>>>
>>> On 07.11.2010 12:19, Willem Jiang wrote:
>>>>
>>>> Hi,
>>>>
>>>> I just committed a fix into camel trunk, please check out the latest
>>>> Camel 2.6-SNAPSHOT for verification.
>>>> BTW, the right configuration of schemaLocations is like below.
>>>>
>>>> <cxf:cxfEndpoint id="routerEndpoint"
>>>> address="http://localhost:9000/router"
>>>> serviceClass="org.apache.camel.component.cxf.HelloService">
>>>> <cxf:schemaLocations>
>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>> </cxf:schemaLocations>
>>>> </cxf:cxfEndpoint>
>>>>
>>>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>>>
>>>>> Thanks for that quick reaction.
>>>>>
>>>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>>>
>>>>>> I just checked the code of camel-cxf, it doesn't support to take the
>>>>>> schemaLocation, so I create a JIRA[1] for it and will work on
>>>>>> quick fix
>>>>>> for it shortly.
>>>>>>
>>>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>>>
>>>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>>>
>>>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>>>> schemaLocation.
>>>>>>>
>>>>>>> I've checked the schema, the element is defined there.
>>>>>>>
>>>>>>> regards,
>>>>>>> marco
>>>>>>>
>>>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>>>
>>>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>>>> follows:
>>>>>>>>
>>>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>>>> serviceClass="com.example.MyService">
>>>>>>>> <cxf:properties>
>>>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>>>>
>>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>>> </cxf:schemaLocations>
>>>>>>>> </cxf:cxfEndpoint>
>>>>>>>>
>>>>>>>> When starting my Camel application an exception as shown below is
>>>>>>>> thrown. It
>>>>>>>> seems that the CXF bean parser does not know what to do with the
>>>>>>>> cxf:schemaLocation element.
>>>>>>>>
>>>>>>>> Do I have any configuration error or is this a potential bug?
>>>>>>>> Then I
>>>>>>>> would
>>>>>>>> file a JIRA issue.
>>>>>>>>
>>>>>>>> thanks,
>>>>>>>> marco
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> SCHWERWIEGEND: Exception sending context initialized event to
>>>>>>>> listener
>>>>>>>> instance of class
>>>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for
>>>>>>>> element
>>>>>>>> [schemaLocation]
>>>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ...
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Marco Zapletal <ma...@gmail.com>.
I have checked out the latest snapshots now. The exception is gone, 
however, the generated WSDL does not reference the schema given in the 
schemaLocation.

My schemaLocation definition corresponds to the example given by Willem. 
The only output I get from the log files is as follows:

INFO:Bean 'cxf:schemaLocation#13e9934' of type [class java.lang.String] 
is not eligible for getting processed by all BeanPostProcessors (for 
example: not eligible for auto-proxying)
08.11.2010 15:45:38 
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker.postProcessAfterInitialization.1332
INFO:Bean 'cxf:schemaLocation#bc36ff' of type [class java.lang.String] 
is not eligible for getting processed by all BeanPostProcessors (for 
example: not eligible for auto-proxying)

If I switch the schemaLocation parameter to some dummy location, no 
error or any other reaction is logged (which would be the behavior when 
a wsdlLocation is not found). Hence, it seems that setting the 
schemaLocation doesnt have any effect.

Any hint would be appreciated.

regards,
marco


On 08.11.2010 11:19, Claus Ibsen wrote:
> On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
> <ma...@gmail.com>  wrote:
>> Hi,
>>
>>
>> thanks for providing such a quick fix. I switched from 2.5 to 2.6-SNAPSHOT,
>> but it seems that the snapshots jar's haven't been built since 2010/11/02.
>>
>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>>
>
> Yeah the Apache hudson CI servers havent been able to do a successful
> deploy for a little while.
> Willem have just fixed some issues which strangely was only happening
> on Apache hudson.
> That fix ought to let it be able to deploy artifacts again.
>
> I have kicked off a new build now
> https://hudson.apache.org/hudson/job/Camel/1054
>
>
>
>> regards,
>> marco
>>
>>
>>
>> On 07.11.2010 12:19, Willem Jiang wrote:
>>>
>>> Hi,
>>>
>>> I just committed a fix into camel trunk, please check out the latest
>>> Camel 2.6-SNAPSHOT for verification.
>>> BTW, the right configuration of schemaLocations is like below.
>>>
>>> <cxf:cxfEndpoint id="routerEndpoint"
>>> address="http://localhost:9000/router"
>>> serviceClass="org.apache.camel.component.cxf.HelloService">
>>> <cxf:schemaLocations>
>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>> </cxf:schemaLocations>
>>> </cxf:cxfEndpoint>
>>>
>>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>>
>>>> Thanks for that quick reaction.
>>>>
>>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>>
>>>>> I just checked the code of camel-cxf, it doesn't support to take the
>>>>> schemaLocation, so I create a JIRA[1] for it and will work on quick fix
>>>>> for it shortly.
>>>>>
>>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>>
>>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>>
>>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>>> schemaLocation.
>>>>>>
>>>>>> I've checked the schema, the element is defined there.
>>>>>>
>>>>>> regards,
>>>>>> marco
>>>>>>
>>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>>
>>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>>> follows:
>>>>>>>
>>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>>> serviceClass="com.example.MyService">
>>>>>>> <cxf:properties>
>>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>>> </cxf:properties>  <cxf:schemaLocations>
>>>>>>>
>>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>>> </cxf:schemaLocations>
>>>>>>> </cxf:cxfEndpoint>
>>>>>>>
>>>>>>> When starting my Camel application an exception as shown below is
>>>>>>> thrown. It
>>>>>>> seems that the CXF bean parser does not know what to do with the
>>>>>>> cxf:schemaLocation element.
>>>>>>>
>>>>>>> Do I have any configuration error or is this a potential bug? Then I
>>>>>>> would
>>>>>>> file a JIRA issue.
>>>>>>>
>>>>>>> thanks,
>>>>>>> marco
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>>>>>> instance of class
>>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>>
>>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>>>>> [schemaLocation]
>>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ...
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 8, 2010 at 11:13 AM, Marco Zapletal
<ma...@gmail.com> wrote:
> Hi,
>
>
> thanks for providing such a quick fix. I switched from 2.5 to 2.6-SNAPSHOT,
> but it seems that the snapshots jar's haven't been built since 2010/11/02.
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/
>

Yeah the Apache hudson CI servers havent been able to do a successful
deploy for a little while.
Willem have just fixed some issues which strangely was only happening
on Apache hudson.
That fix ought to let it be able to deploy artifacts again.

I have kicked off a new build now
https://hudson.apache.org/hudson/job/Camel/1054



> regards,
> marco
>
>
>
> On 07.11.2010 12:19, Willem Jiang wrote:
>>
>> Hi,
>>
>> I just committed a fix into camel trunk, please check out the latest
>> Camel 2.6-SNAPSHOT for verification.
>> BTW, the right configuration of schemaLocations is like below.
>>
>> <cxf:cxfEndpoint id="routerEndpoint"
>> address="http://localhost:9000/router"
>> serviceClass="org.apache.camel.component.cxf.HelloService">
>> <cxf:schemaLocations>
>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>> </cxf:schemaLocations>
>> </cxf:cxfEndpoint>
>>
>> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>>>
>>> Thanks for that quick reaction.
>>>
>>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>>>
>>>> I just checked the code of camel-cxf, it doesn't support to take the
>>>> schemaLocation, so I create a JIRA[1] for it and will work on quick fix
>>>> for it shortly.
>>>>
>>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>>
>>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>>
>>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>>> schemaLocation.
>>>>>
>>>>> I've checked the schema, the element is defined there.
>>>>>
>>>>> regards,
>>>>> marco
>>>>>
>>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>>>
>>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>>> Zapletal"<ma...@gmail.com>:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>>> follows:
>>>>>>
>>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>>> serviceClass="com.example.MyService">
>>>>>> <cxf:properties>
>>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>>
>>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>>> </cxf:schemaLocations>
>>>>>> </cxf:cxfEndpoint>
>>>>>>
>>>>>> When starting my Camel application an exception as shown below is
>>>>>> thrown. It
>>>>>> seems that the CXF bean parser does not know what to do with the
>>>>>> cxf:schemaLocation element.
>>>>>>
>>>>>> Do I have any configuration error or is this a potential bug? Then I
>>>>>> would
>>>>>> file a JIRA issue.
>>>>>>
>>>>>> thanks,
>>>>>> marco
>>>>>>
>>>>>>
>>>>>>
>>>>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>>>>> instance of class
>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>
>>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>>>> [schemaLocation]
>>>>>> Offending resource: class path resource [camel-config.xml]
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>>
>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ...
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Marco Zapletal <ma...@gmail.com>.
Hi,


thanks for providing such a quick fix. I switched from 2.5 to 
2.6-SNAPSHOT, but it seems that the snapshots jar's haven't been built 
since 2010/11/02.

https://repository.apache.org/content/repositories/snapshots/org/apache/camel/camel-cxf/2.6-SNAPSHOT/

regards,
marco



On 07.11.2010 12:19, Willem Jiang wrote:
> Hi,
>
> I just committed a fix into camel trunk, please check out the latest
> Camel 2.6-SNAPSHOT for verification.
> BTW, the right configuration of schemaLocations is like below.
>
> <cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9000/router"
> serviceClass="org.apache.camel.component.cxf.HelloService">
> <cxf:schemaLocations>
> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
> </cxf:schemaLocations>
> </cxf:cxfEndpoint>
>
> On 11/7/10 5:00 PM, Marco Zapletal wrote:
>> Thanks for that quick reaction.
>>
>> Am 07.11.2010 05:24, schrieb Willem Jiang:
>>> I just checked the code of camel-cxf, it doesn't support to take the
>>> schemaLocation, so I create a JIRA[1] for it and will work on quick fix
>>> for it shortly.
>>>
>>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>>
>>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>>
>>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>>> schemaLocation.
>>>>
>>>> I've checked the schema, the element is defined there.
>>>>
>>>> regards,
>>>> marco
>>>>
>>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>>> Which namespace do you use for the "cxf" prefix?
>>>>>
>>>>> Christian
>>>>>
>>>>> Am 06.11.2010 17:40 schrieb "Marco
>>>>> Zapletal"<ma...@gmail.com>:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I am defining my CXF services in camel config (using 2.5.0) as
>>>>> follows:
>>>>>
>>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>>> serviceClass="com.example.MyService">
>>>>> <cxf:properties>
>>>>> <entry key="schema-validation-enabled" value="true" />
>>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>>> </cxf:properties> <cxf:schemaLocations>
>>>>>
>>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>>> </cxf:schemaLocations>
>>>>> </cxf:cxfEndpoint>
>>>>>
>>>>> When starting my Camel application an exception as shown below is
>>>>> thrown. It
>>>>> seems that the CXF bean parser does not know what to do with the
>>>>> cxf:schemaLocation element.
>>>>>
>>>>> Do I have any configuration error or is this a potential bug? Then I
>>>>> would
>>>>> file a JIRA issue.
>>>>>
>>>>> thanks,
>>>>> marco
>>>>>
>>>>>
>>>>>
>>>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>>>> instance of class
>>>>> org.springframework.web.context.ContextLoaderListener
>>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>>
>>>>>
>>>>>
>>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>>> [schemaLocation]
>>>>> Offending resource: class path resource [camel-config.xml]
>>>>> at
>>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ...
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

I just committed a fix into camel trunk, please check out the latest 
Camel 2.6-SNAPSHOT for verification.
BTW, the right configuration of schemaLocations is like below.

<cxf:cxfEndpoint id="routerEndpoint" address="http://localhost:9000/router"
     serviceClass="org.apache.camel.component.cxf.HelloService">
     <cxf:schemaLocations>
     	<cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
     </cxf:schemaLocations>
   </cxf:cxfEndpoint>

On 11/7/10 5:00 PM, Marco Zapletal wrote:
> Thanks for that quick reaction.
>
> Am 07.11.2010 05:24, schrieb Willem Jiang:
>> I just checked the code of camel-cxf, it doesn't support to take the
>> schemaLocation, so I create a JIRA[1] for it and will work on quick fix
>> for it shortly.
>>
>> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>>
>> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>>
>>> http://camel.apache.org/schema/cxf is the namespace, which has
>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>>> schemaLocation.
>>>
>>> I've checked the schema, the element is defined there.
>>>
>>> regards,
>>> marco
>>>
>>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>>> Which namespace do you use for the "cxf" prefix?
>>>>
>>>> Christian
>>>>
>>>> Am 06.11.2010 17:40 schrieb "Marco Zapletal"<ma...@gmail.com>:
>>>>
>>>> Hello,
>>>>
>>>> I am defining my CXF services in camel config (using 2.5.0) as follows:
>>>>
>>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>>> serviceClass="com.example.MyService">
>>>> <cxf:properties>
>>>> <entry key="schema-validation-enabled" value="true" />
>>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>>> </cxf:properties> <cxf:schemaLocations>
>>>>
>>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>>> </cxf:schemaLocations>
>>>> </cxf:cxfEndpoint>
>>>>
>>>> When starting my Camel application an exception as shown below is
>>>> thrown. It
>>>> seems that the CXF bean parser does not know what to do with the
>>>> cxf:schemaLocation element.
>>>>
>>>> Do I have any configuration error or is this a potential bug? Then I
>>>> would
>>>> file a JIRA issue.
>>>>
>>>> thanks,
>>>> marco
>>>>
>>>>
>>>>
>>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>>> instance of class org.springframework.web.context.ContextLoaderListener
>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>>
>>>>
>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>> [schemaLocation]
>>>> Offending resource: class path resource [camel-config.xml]
>>>> at
>>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>>
>>>>
>>>>
>>>> at
>>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>>
>>>>
>>>>
>>>> at
>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>>
>>>>
>>>>
>>>> at
>>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>>
>>>>
>>>>
>>>> at
>>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>>
>>>>
>>>>
>>>> at
>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>>
>>>>
>>>>
>>>> ...
>>>>
>>>
>>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Marco Zapletal <ma...@gmail.com>.
Thanks for that quick reaction.

Am 07.11.2010 05:24, schrieb Willem Jiang:
> I just checked the code of camel-cxf, it doesn't support to take the
> schemaLocation, so I create a JIRA[1] for it and will work on quick fix
> for it shortly.
>
> [1]https://issues.apache.org/activemq/browse/CAMEL-3319
>
> On 11/7/10 12:53 AM, Marco Zapletal wrote:
>>
>> http://camel.apache.org/schema/cxf is the namespace, which has
>> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
>> schemaLocation.
>>
>> I've checked the schema, the element is defined there.
>>
>> regards,
>> marco
>>
>> Am 06.11.2010 17:52, schrieb Christian Müller:
>>> Which namespace do you use for the "cxf" prefix?
>>>
>>> Christian
>>>
>>> Am 06.11.2010 17:40 schrieb "Marco Zapletal"<ma...@gmail.com>:
>>>
>>> Hello,
>>>
>>> I am defining my CXF services in camel config (using 2.5.0) as follows:
>>>
>>> <cxf:cxfEndpoint id="myService" address="/myService"
>>> serviceClass="com.example.MyService">
>>> <cxf:properties>
>>> <entry key="schema-validation-enabled" value="true" />
>>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>>> </cxf:properties> <cxf:schemaLocations>
>>>
>>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>>> </cxf:schemaLocations>
>>> </cxf:cxfEndpoint>
>>>
>>> When starting my Camel application an exception as shown below is
>>> thrown. It
>>> seems that the CXF bean parser does not know what to do with the
>>> cxf:schemaLocation element.
>>>
>>> Do I have any configuration error or is this a potential bug? Then I
>>> would
>>> file a JIRA issue.
>>>
>>> thanks,
>>> marco
>>>
>>>
>>>
>>> SCHWERWIEGEND: Exception sending context initialized event to listener
>>> instance of class org.springframework.web.context.ContextLoaderListener
>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>
>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>> [schemaLocation]
>>> Offending resource: class path resource [camel-config.xml]
>>> at
>>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>>
>>>
>>> at
>>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>>
>>>
>>> at
>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>>
>>>
>>> at
>>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>>
>>>
>>> at
>>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>>
>>>
>>> at
>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>>
>>>
>>> ...
>>>
>>
>>
>
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Willem Jiang <wi...@gmail.com>.
I just checked the code of camel-cxf, it doesn't support to take the 
schemaLocation, so I create a JIRA[1] for it and will work on quick fix 
for it shortly.

[1]https://issues.apache.org/activemq/browse/CAMEL-3319

On 11/7/10 12:53 AM, Marco Zapletal wrote:
>
> http://camel.apache.org/schema/cxf is the namespace, which has
> http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its
> schemaLocation.
>
> I've checked the schema, the element is defined there.
>
> regards,
> marco
>
> Am 06.11.2010 17:52, schrieb Christian Müller:
>> Which namespace do you use for the "cxf" prefix?
>>
>> Christian
>>
>> Am 06.11.2010 17:40 schrieb "Marco Zapletal"<ma...@gmail.com>:
>>
>> Hello,
>>
>> I am defining my CXF services in camel config (using 2.5.0) as follows:
>>
>> <cxf:cxfEndpoint id="myService" address="/myService"
>> serviceClass="com.example.MyService">
>> <cxf:properties>
>> <entry key="schema-validation-enabled" value="true" />
>> <entry key="schemaLocations" value="wsdl/*.xsd"/>
>> </cxf:properties> <cxf:schemaLocations>
>>
>> <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
>> </cxf:schemaLocations>
>> </cxf:cxfEndpoint>
>>
>> When starting my Camel application an exception as shown below is
>> thrown. It
>> seems that the CXF bean parser does not know what to do with the
>> cxf:schemaLocation element.
>>
>> Do I have any configuration error or is this a potential bug? Then I
>> would
>> file a JIRA issue.
>>
>> thanks,
>> marco
>>
>>
>>
>> SCHWERWIEGEND: Exception sending context initialized event to listener
>> instance of class org.springframework.web.context.ContextLoaderListener
>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>> Configuration problem: Cannot locate BeanDefinitionParser for element
>> [schemaLocation]
>> Offending resource: class path resource [camel-config.xml]
>> at
>> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>>
>> at
>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>>
>> at
>> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>>
>> at
>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>>
>> at
>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>>
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>>
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>>
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>>
>> at
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>>
>> at
>> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>>
>> at
>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>>
>> at
>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>>
>> at
>> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>>
>> at
>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>>
>> at
>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>>
>> at
>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>>
>> ...
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Marco Zapletal <ma...@gmail.com>.
http://camel.apache.org/schema/cxf is the namespace, which has 
http://camel.apache.org/schema/cxf/camel-cxf.xsd defined as its 
schemaLocation.

I've checked the schema, the element is defined there.

regards,
marco

Am 06.11.2010 17:52, schrieb Christian Müller:
> Which namespace do you use for the "cxf" prefix?
>
> Christian
>
> Am 06.11.2010 17:40 schrieb "Marco Zapletal"<ma...@gmail.com>:
>
> Hello,
>
> I am defining my CXF services in camel config (using 2.5.0) as follows:
>
> <cxf:cxfEndpoint id="myService" address="/myService"
>         serviceClass="com.example.MyService">
>   <cxf:properties>
>         <entry key="schema-validation-enabled" value="true" />
>         <entry key="schemaLocations" value="wsdl/*.xsd"/>
>   </cxf:properties>  <cxf:schemaLocations>
>
>   <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
> </cxf:schemaLocations>
> </cxf:cxfEndpoint>
>
> When starting my Camel application an exception as shown below is thrown. It
> seems that the CXF bean parser does not know what to do with the
> cxf:schemaLocation element.
>
> Do I have any configuration error or is this a potential bug? Then I would
> file a JIRA issue.
>
> thanks,
> marco
>
>
>
> SCHWERWIEGEND: Exception sending context initialized event to listener
> instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Cannot locate BeanDefinitionParser for element
> [schemaLocation]
> Offending resource: class path resource [camel-config.xml]
>         at
> org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
>         at
> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
>         at
> org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
>         at
> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
>         at
> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
>         at
> org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
>         at
> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
>         at
> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
>         at
> org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
>         at
> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
>         at
> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
>         at
> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
> ...
>


Re: camel-cxf: exception when parsing cxf:schemaLocation element

Posted by Christian Müller <ch...@gmail.com>.
Which namespace do you use for the "cxf" prefix?

Christian

Am 06.11.2010 17:40 schrieb "Marco Zapletal" <ma...@gmail.com>:

Hello,

I am defining my CXF services in camel config (using 2.5.0) as follows:

<cxf:cxfEndpoint id="myService" address="/myService"
       serviceClass="com.example.MyService">
 <cxf:properties>
       <entry key="schema-validation-enabled" value="true" />
       <entry key="schemaLocations" value="wsdl/*.xsd"/>
 </cxf:properties> <cxf:schemaLocations>

 <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
</cxf:schemaLocations>
</cxf:cxfEndpoint>

When starting my Camel application an exception as shown below is thrown. It
seems that the CXF bean parser does not know what to do with the
cxf:schemaLocation element.

Do I have any configuration error or is this a potential bug? Then I would
file a JIRA issue.

thanks,
marco



SCHWERWIEGEND: Exception sending context initialized event to listener
instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionParser for element
[schemaLocation]
Offending resource: class path resource [camel-config.xml]
       at
org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59)
       at
org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
       at
org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
       at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84)
       at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
       at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
       at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseNestedCustomElement(BeanDefinitionParserDelegate.java:1388)
       at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parsePropertySubElement(BeanDefinitionParserDelegate.java:956)
       at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCollectionElements(BeanDefinitionParserDelegate.java:1140)
       at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseListElement(BeanDefinitionParserDelegate.java:1116)
       at
org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser.mapElement(CxfEndpointBeanDefinitionParser.java:70)
       at
org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseChildElements(AbstractBeanDefinitionParser.java:118)
       at
org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:71)
       at
org.apache.camel.component.cxf.spring.AbstractCxfBeanDefinitionParser.doParse(AbstractCxfBeanDefinitionParser.java:57)
       at
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
       at
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
       at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
...