You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by matiou <m....@gmail.com> on 2011/11/21 10:27:43 UTC

Upgrading from 2.1.4 to 2.1.9

Hi everyone,

In order to call WebServices, I'm using cxf-api and cxf-rt-transports-http
2.1.4 and all is working fine.

Recently I have to pass through a proxy server, so, after a little search I
found ProxyAuthorizationPolicy(user & pwd) and HTTPClientPolicy (server &
port) which could do the rights things. But even if I fill password &
username in ProxyAuthorizationPolicy object, I obtained an 407 Proxy
Authentication Required.

Unfortunately, it seems It was the following issue for proxy authentication
with ssl (my case) : https://issues.apache.org/jira/browse/CXF-2223.

I downloaded 2.1.9 where the issue is normally fixed.
And now, with the same code than previously, I obtain the error below, which
happens on the code line : HTTPConduit conduit = (HTTPConduit)
client.getConduit();

StackTrace :
Error creating bean with name '*.http-conduit': Cannot create inner bean
'(inner bean)' of type [org.apache.cxf.configuration.spring.JAXBBeanFactory]
while setting bean property 'client';
	nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Instantiation of bean failed;
	nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public static java.lang.Object
org.apache.cxf.configuration.spring.JAXBBeanFactory.createJAXBBean(javax.xml.bind.JAXBContext,java.lang.String,java.lang.Class)]
threw exception;
	nested exception is java.lang.RuntimeException:
javax.xml.bind.UnmarshalException - with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,219]
Message:
http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?http&http:client]

Thanks in advance for your reply

matiou

Environment :
- jdk16u24
- eclipse indigo
- cxf-api-2.19, cxf-rt-frontend-simple-2.19, cxf-rt-transports-http-2.1.9
- spring-core-2.5.6, spring-beans-2.5.6, spring-context-2.5.6


--
View this message in context: http://cxf.547215.n5.nabble.com/Upgrading-from-2-1-4-to-2-1-9-tp5009968p5009968.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Upgrading from 2.1.4 to 2.1.9

Posted by matiou <m....@gmail.com>.
Thank you !

it works fine now by adding the redundant namespaces.

Have a good day




--
View this message in context: http://cxf.547215.n5.nabble.com/Upgrading-from-2-1-4-to-2-1-9-tp5009968p5017225.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Upgrading from 2.1.4 to 2.1.9

Posted by Daniel Kulp <dk...@apache.org>.

Hmm...   The XML looks fine.   Sounds like your picking up a bad XML/StAX 
parser and not woodstox.

You MAY be able to work around it via:

<http:conduit      
    xmlns:http="http://cxf.apache.org/transports/http/configuration"
     name="*.http-conduit">
    <http:client  
        xmlns:http="http://cxf.apache.org/transports/http/configuration"
    AutoRedirect="true" Connection="Keep-Alive"
    ConnectionTimeout="6000" ReceiveTimeout="6000" CacheControl="no-cache"
   AllowChunking="false" />
</http:conduit>

Basically adding some redundant namespace decls.   That may work.  Not really 
sure though.

Dan



On Wednesday, November 23, 2011 6:17:31 AM matiou wrote:
> Hi Dan,
> 
> Thank you for your fast reply.
> 
> Daniel  Kulp wrote
> 
> > The error makes it sound like there is an XML issue. Can you post the
> > xml
> > configuration ?
> 
> Here is the xml configuration file, which is pretty light (and works in
> 2.1.4) :
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xmlns:sec="http://cxf.apache.org/configuration/security"
>   xmlns:http="http://cxf.apache.org/transports/http/configuration"
>   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>   xmlns:wsa="http://cxf.apache.org/ws/addressing"
>   xmlns:cxf="http://cxf.apache.org/core"
> 
>    xsi:schemaLocation="http://cxf.apache.org/core
>     				   http://cxf.apache.org/schemas/core.xsd
> 					   http://cxf.apache.org/configuration/security
> 					   
http://cxf.apache.org/schemas/configuration/security.xsd
> 					   
http://cxf.apache.org/transports/http/configuration
> 					   http://cxf.apache.org/schemas/configuration/http-
conf.xsd
> 					   http://www.springframework.org/schema/beans
> 					   
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> 
> 
> 	<http:conduit name="*.http-conduit">
> 		  <http:client AutoRedirect="true" Connection="Keep-Alive"
> ConnectionTimeout="6000" ReceiveTimeout="6000" CacheControl="no-cache"
> AllowChunking="false" />
> 	</http:conduit>
> </beans>
> 
> 
> Daniel  Kulp wrote
> 
> > You can also try adding the namespaces needed to the http-conduit
> > element. That MAY help.
> 
> What's the namespaces you are talking about ? I don't see any mention of
> namespace needed in the stackstrace.
> 
> 
> Daniel  Kulp wrote
> 
> > It almost sounds like you aren't picking up woodstox, but I'm not really
> > sure. 2.1.9 was still long enough ago that I'm not sure what the state
> > of
> > everything was. I'd definitely suggest up
> > dating to 2.5.0 if possible and trying to see if that fixes things.
> 
> OK, I'll try it, hoping there will not be migration problem
> 
> Thanks, matiou
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Upgrading-from-2-1-4-to-2-1-9-tp5009968p501
> 6781.html Sent from the cxf-dev mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: Upgrading from 2.1.4 to 2.1.9

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 23/11/11 14:17, matiou wrote:
> Hi Dan,
>
> Thank you for your fast reply.
>
> Daniel  Kulp wrote
>>
>> The error makes it sound like there is an XML issue. Can you post the xml
>> configuration ?
> Here is the xml configuration file, which is pretty light (and works in
> 2.1.4) :
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xmlns:sec="http://cxf.apache.org/configuration/security"
>    xmlns:http="http://cxf.apache.org/transports/http/configuration"
>    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>    xmlns:wsa="http://cxf.apache.org/ws/addressing"
>    xmlns:cxf="http://cxf.apache.org/core"
>
>     xsi:schemaLocation="http://cxf.apache.org/core
>      				   http://cxf.apache.org/schemas/core.xsd
> 					   http://cxf.apache.org/configuration/security
> 					   http://cxf.apache.org/schemas/configuration/security.xsd
> 					   http://cxf.apache.org/transports/http/configuration
> 					   http://cxf.apache.org/schemas/configuration/http-conf.xsd
> 					   http://www.springframework.org/schema/beans
> 					   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>
> 	<http:conduit name="*.http-conduit">
> 		<http:client AutoRedirect="true" Connection="Keep-Alive"
> ConnectionTimeout="6000" ReceiveTimeout="6000" CacheControl="no-cache"
> AllowChunking="false" />
> 	</http:conduit>
> </beans>
>
>
> Daniel  Kulp wrote
>>
>> You can also try adding the namespaces needed to the http-conduit element.
>> That MAY help.
>>
> What's the namespaces you are talking about ? I don't see any mention of
> namespace needed in the stackstrace.
>

something like that I guess

<http:conduit 
name="{http://example.com/}HelloWorldServicePort.http-conduit">


Sergey

>


> Daniel  Kulp wrote
>> It almost sounds like you aren't picking up woodstox, but I'm not really
>> sure. 2.1.9 was still long enough ago that I'm not sure what the state of
>> everything was. I'd definitely suggest up
>> dating to 2.5.0 if possible and trying to see if that fixes things.
>>
> OK, I'll try it, hoping there will not be migration problem
>
> Thanks, matiou
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Upgrading-from-2-1-4-to-2-1-9-tp5009968p5016781.html
> Sent from the cxf-dev mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

http://sberyozkin.blogspot.com

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

Re: Upgrading from 2.1.4 to 2.1.9

Posted by matiou <m....@gmail.com>.
Hi Dan,

Thank you for your fast reply.

Daniel  Kulp wrote
> 
> The error makes it sound like there is an XML issue. Can you post the xml 
> configuration ?
Here is the xml configuration file, which is pretty light (and works in
2.1.4) :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  xmlns:wsa="http://cxf.apache.org/ws/addressing"
  xmlns:cxf="http://cxf.apache.org/core"
  
   xsi:schemaLocation="http://cxf.apache.org/core
    				   http://cxf.apache.org/schemas/core.xsd  
					   http://cxf.apache.org/configuration/security
					   http://cxf.apache.org/schemas/configuration/security.xsd
					   http://cxf.apache.org/transports/http/configuration
					   http://cxf.apache.org/schemas/configuration/http-conf.xsd
					   http://www.springframework.org/schema/beans
					   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">


	<http:conduit name="*.http-conduit">
		  <http:client AutoRedirect="true" Connection="Keep-Alive"
ConnectionTimeout="6000" ReceiveTimeout="6000" CacheControl="no-cache"
AllowChunking="false" />
	</http:conduit>
</beans>


Daniel  Kulp wrote
> 
> You can also try adding the namespaces needed to the http-conduit element.
> That MAY help.
> 
What's the namespaces you are talking about ? I don't see any mention of
namespace needed in the stackstrace.


Daniel  Kulp wrote
> It almost sounds like you aren't picking up woodstox, but I'm not really
> sure. 2.1.9 was still long enough ago that I'm not sure what the state of
> everything was. I'd definitely suggest up 
> dating to 2.5.0 if possible and trying to see if that fixes things.
> 
OK, I'll try it, hoping there will not be migration problem

Thanks, matiou

--
View this message in context: http://cxf.547215.n5.nabble.com/Upgrading-from-2-1-4-to-2-1-9-tp5009968p5016781.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Upgrading from 2.1.4 to 2.1.9

Posted by Daniel Kulp <dk...@apache.org>.

The error makes it sound like there is an XML issue.   Can you post the xml 
configuration?   You can also try adding the namespaces needed to the http-
conduit element.  That MAY help.    It almost sounds like you aren't picking 
up woodstox, but I'm not really sure.    2.1.9 was still long enough ago that 
I'm not sure what the state of everything was.   I'd definitely suggest up 
dating to 2.5.0 if possible and trying to see if that fixes things.

Dan


On Monday, November 21, 2011 1:27:43 AM matiou wrote:
> Hi everyone,
> 
> In order to call WebServices, I'm using cxf-api and cxf-rt-transports-http
> 2.1.4 and all is working fine.
> 
> Recently I have to pass through a proxy server, so, after a little search I
> found ProxyAuthorizationPolicy(user & pwd) and HTTPClientPolicy (server &
> port) which could do the rights things. But even if I fill password &
> username in ProxyAuthorizationPolicy object, I obtained an 407 Proxy
> Authentication Required.
> 
> Unfortunately, it seems It was the following issue for proxy authentication
> with ssl (my case) : https://issues.apache.org/jira/browse/CXF-2223.
> 
> I downloaded 2.1.9 where the issue is normally fixed.
> And now, with the same code than previously, I obtain the error below, which
> happens on the code line : HTTPConduit conduit = (HTTPConduit)
> client.getConduit();
> 
> StackTrace :
> Error creating bean with name '*.http-conduit': Cannot create inner bean
> '(inner bean)' of type [org.apache.cxf.configuration.spring.JAXBBeanFactory]
> while setting bean property 'client';
> 	nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name '(inner bean)': Instantiation of bean failed;
> 	nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
> method [public static java.lang.Object
> org.apache.cxf.configuration.spring.JAXBBeanFactory.createJAXBBean(javax.xml
> .bind.JAXBContext,java.lang.String,java.lang.Class)] threw exception;
> 	nested exception is java.lang.RuntimeException:
> javax.xml.bind.UnmarshalException - with linked exception:
> [javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,219]
> Message:
> http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?http&h
> ttp:client]
> 
> Thanks in advance for your reply
> 
> matiou
> 
> Environment :
> - jdk16u24
> - eclipse indigo
> - cxf-api-2.19, cxf-rt-frontend-simple-2.19, cxf-rt-transports-http-2.1.9
> - spring-core-2.5.6, spring-beans-2.5.6, spring-context-2.5.6
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Upgrading-from-2-1-4-to-2-1-9-tp5009968p500
> 9968.html Sent from the cxf-dev mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com