On 15/07/2013 08:36, Francesco Chicchiriccò wrote:
On 12/07/2013 14:56, Nik wrote:
Hi Guys,

I'm seeing the following exception generated from syncope when using the console

I think could be related to bug https://issues.apache.org/jira/browse/SYNCOPE-376

Where we change (in applicationContext.xml)

<bean id="restTemplate" class="org.springframework.web.client.RestTemplate" scope="session">
<constructor-arg ref="httpClientFactory"/>
<property name="messageConverters">
<list>
<ref bean="mappingJacksonHttpMessageConverter"/>
</list>
</property>
<property name="errorHandler">
<bean id="syncopeClientErrorHandler" class="org.apache.syncope.common.validation.SyncopeClientErrorHandler"/>
</property>
</bean>

to

<bean id="restTemplate" class="org.springframework.web.client.RestTemplate" scope="prototype">
<constructor-arg ref="httpClientFactory"/>
<property name="messageConverters">
<list>
<ref bean="mappingJacksonHttpMessageConverter"/>
</list>
</property>
<property name="errorHandler">
<bean id="syncopeClientErrorHandler" class="org.apache.syncope.common.validation.SyncopeClientErrorHandler"/>
</property>
</bean>

Hi Nik,
you encounter this exception only when changing from "session" to "prototype" only because with "session" another exception occurs before.

[...]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpClientFactory' defined in class path resource [applicationContext.xml]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)

It seems that there is somewhere in the classpath an ancient version of PreemptiveAuthHttpRequestFactory [1] that conflicts with the one that the admin console is thinking to work with: may I suggest to clean, rebuild everything (core included) and to check if there is an old syncope-client JAR file out there?

...or rather to check if console/src/main/resources/applicationContext.xml is the same as per [2]?

Regards.

[1] http://svn.apache.org/repos/asf/syncope/branches/1_1_X/client/src/main/java/org/apache/syncope/client/http/PreemptiveAuthHttpRequestFactory.java
[2] http://svn.apache.org/repos/asf/syncope/branches/1_1_X/console/src/main/resources/applicationContext.xml

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to