Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 76334 invoked from network); 18 Dec 2007 22:53:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2007 22:53:19 -0000 Received: (qmail 63287 invoked by uid 500); 18 Dec 2007 22:53:08 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 63249 invoked by uid 500); 18 Dec 2007 22:53:08 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 63240 invoked by uid 99); 18 Dec 2007 22:53:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 14:53:08 -0800 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 22:52:55 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1J4lIs-0007GL-LP for users@activemq.apache.org; Tue, 18 Dec 2007 14:52:46 -0800 Message-ID: <14407600.post@talk.nabble.com> Date: Tue, 18 Dec 2007 14:52:46 -0800 (PST) From: Boris Mazniker To: users@activemq.apache.org Subject: Re: Trouble with JAAS & 5.0. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: bmazniker@yahoo.com X-Virus-Checked: Checked by ClamAV on apache.org 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 org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent@fba502 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 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.