karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3430) User name/password missing in connection factory created with jms:create
Date Fri, 02 Jan 2015 14:19:13 GMT

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

Jean-Baptiste Onofré commented on KARAF-3430:
---------------------------------------------

Fix ActiveMQPooledConnectionFactory import issue and improve itests coverage on master: https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=commitdiff;h=026132e73e9dc4b2422d163ad2936a7174c56ffa

> User name/password missing in connection factory created with jms:create
> ------------------------------------------------------------------------
>
>                 Key: KARAF-3430
>                 URL: https://issues.apache.org/jira/browse/KARAF-3430
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 3.0.1, 2.4.1, 2.3.9, 4.0.0.M1
>            Reporter: Krzysztof Sobkowiak
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 4.0.0, 3.0.3, 2.3.10, 2.4.2
>
>         Attachments: karaf.log, test-route.xml
>
>
> I have installed ActiveMQ (5.10.0) and Camel (2.14.1) in Karaf. Next I have created a
connection factory using {{jms:create}} command
> {code}
> jms:create -t ActiveMQ -u tcp://localhost:61616 amqcf
> {code} 
> The {{jms:*}} commands work perfectly.
> Next I have created following blueprint camel route
> {code}
> <reference id="connectionFactory" interface="javax.jms.ConnectionFactory" />
> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
>     <property name="connectionFactory" ref="connectionFactory" />
> </bean>
> <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>     <route>
>         <from uri="timer://myTimer?fixedRate=true&amp;period=2000" />
>         <to uri="activemq:queue:LOG.ME" />
>     </route>
>     <route>
>         <from uri="activemq:queue:LOG.ME" />
>         <to uri="log:ExampleActiveMQRouterBlueprint" />
>     </route>
> </camelContext>
> {code}
>  
> This blueprint references the connection factory created by {{jms:create}}. Deploying
this route into {{deploy}} directory ends with following errors in log (full stack trace in
attachment)
> {code}
> Caused by: javax.security.auth.login.LoginException: Username can not be null
> 	at org.apache.karaf.jaas.modules.properties.PropertiesLoginModule.login(PropertiesLoginModule.java:90)[16:org.apache.karaf.jaas.modules:2.4.1]
> 	at org.apache.karaf.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java:83)[karaf-jaas-boot.jar:]
> 	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_65]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_65]
> 	at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762)[:1.7.0_65]
> 	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)[:1.7.0_65]
> 	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)[:1.7.0_65]
> 	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)[:1.7.0_65]
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_65]
> 	at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)[:1.7.0_65]
> 	at javax.security.auth.login.LoginContext.login(LoginContext.java:595)[:1.7.0_65]
> 	at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:73)[85:org.apache.activemq.activemq-osgi:5.10.0]
> 	... 13 more
> {code}
> Adding {{userName}} and {{password}} parameter in the definition of the connection factory
solves the problem.
> {code}
> <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
>         <property name="brokerURL" value="tcp://localhost:61616" />
>         <property name="userName" value="karaf"/>
> 	<property name="password" value="karaf"/>
> </bean>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message