I configured JAAS as a plugin and upon the startup got the security exception
in addConnection method (I posted the stack trace further down in the letter
in case anyone is interested). Later, I followed your advice and removed
camel and commandAgent from the configuration. Jetty seems to not start
connections until you actually try to send messages, so it was ok to leave
it. ActiveMQ now starts fine. 

Now, we're planning to use the built-in jetty servlet in 5.0. I looked at
the code briefly and it seems to me that right now there is no way of
configuring username/password for the servlet activemq connection.
initConnectionFactory() method in WebClient.java seems to me the right place
to do it (if one name/password pair is enough for all servlets). I'm new to
open-source development and am not sure what the correct procedure is, but I
guess, I could make the changes and post them here.

Thanks, 
Boris.

This is the stack trace:

2007-12-18 14:21:34,363 [main           ] INFO  TransportConnector            
- Connector vm://localhost Started
2007-12-18 14:21:43,816 [m://localhost#1] WARN  TransportConnection           
- Failed to add Connection
java.lang.SecurityException: User name or password is invalid.
        at
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Caused by: javax.security.auth.login.LoginException:
java.lang.NullPointerException
        at java.util.Hashtable.get(Hashtable.java:336)
        at java.util.Properties.getProperty(Properties.java:774)
        at
org.apache.activemq.jaas.PropertiesLoginModule.login(PropertiesLoginModule.java:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
        at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
        at
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)

        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
        at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
        at
org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
        ... 11 more
2007-12-18 14:21:43,846 [main           ] INFO  BrokerService                 
- ActiveMQ Message Broker (localhost,
ID:bmazniker-m60-3021-1198016493391-0:0) is shutting down
2007-12-18 14:21:43,856 [main           ] INFO  NetworkConnector              
- Network Connector
[EMAIL PROTECTED]
Stopped
2007-12-18 14:21:48,643 [main           ] INFO  TransportConnector            
- Connector openwire Stopped
2007-12-18 14:21:54,272 [main           ] INFO  TransportConnector            
- Connector ssl Stopped
2007-12-18 14:21:59,269 [main           ] INFO  TransportConnector            
- Connector stomp Stopped
2007-12-18 14:22:04,306 [main           ] INFO  TransportConnector            
- Connector xmpp Stopped




Hiram Chirino wrote:
> 
> please post a stack trace and or a junit test showing the problem.
> 
> On Dec 12, 2007 8:46 PM, Boris Mazniker <[EMAIL PROTECTED]> wrote:
>>
>> I experienced the exact same problem in 5.0. Everything worked fine for
>> 4.1.
>> In 5.0, when vm transport is initializing, it goes through authorization
>> and
>> fails since there is no correct username/password.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Trouble-with-JAAS---5.0.0-tp14250971s2354p14308173.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> Open Source SOA
> http://open.iona.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Trouble-with-JAAS---5.0.0-tp14250971s2354p14407600.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to