[ 
https://issues.apache.org/jira/browse/CAMEL-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701834#comment-13701834
 ] 

Willem Jiang commented on CAMEL-6516:
-------------------------------------

You can workaround it by applying the endpoint uri parameter yourself when 
creating the mina endpoint.
{code}
<bean id="myMinaEndpoint"
      factory-bean="myMinaFactory"
      factory-method="createEndpoint">
    <!-- pass the endpoint uri into the createEndpoint method -->
    <constructor-arg index="0" val="mina://myMinaConfig" />
    <!-- and here we can pass it our configuration -->
    <constructor-arg index="1" ref="myMinaConfig"/>
</bean>
{code} 
                
> camel-mina and camel-mina2 fail when configured with Spring or blueprint
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-6516
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6516
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mina, camel-mina2
>    Affects Versions: 2.10.4, 2.11.0
>            Reporter: Henrique Viecili
>            Assignee: Willem Jiang
>
> A user following the documentation at 
> http://camel.apache.org/mina.html#MINA-ConfiguringMinaendpointsusingSpringbeanstyle
>  will face an IllegalArgumentException because 
> org.apache.camel.component.mina2.Mina2Component.createEndpoint(Mina2Configuration)
>  calls createEndpoint(null, config) and does not implement/override 
> org.apache.camel.impl.DefaultEndpoint.createEndpointUri()
>  
> Stack Trace:
> java.lang.IllegalArgumentException: endpointUri is not specified and 
> org.apache.camel.component.mina2.Mina2Endpoint does not implement 
> createEndpointUri() to create a default value
>         at 
> org.apache.camel.impl.DefaultEndpoint.getEndpointUri(DefaultEndpoint.java:154)
> (...)
> Workaround: define the endpoint inline with mina:tcp://[host]...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to