Hi, I managed to setup ActiveMQ with JAAS. I understand that I may use LoginContext to authenticate my application with the Server. However, I am having this error when I startup ActiveMQ.
----- WARN TransportConnection - Failed to add Connection java.lang.SecurityException: User name or password is invalid. at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(J aasAuthenticationBroker.java:83) at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja va:81) at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableB rokerFilter.java:91) at org.apache.activemq.broker.TransportConnection.processAddConnection(T ransportConnection.java:657) at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java: 125) at org.apache.activemq.broker.TransportConnection.service(TransportConne ction.java:281) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC onnection.java:178) at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCo rrelator.java:100) at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt er.java:67) at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java :202) at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskR unner.java:98) at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRun ner.java:36) Caused by: javax.security.auth.login.LoginException: det gσr inte att hitta Logi nModule-klassen: PropertiesLoginModule at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808) ----- I believe the problem is caused by Name and PasswordCallback() returning null.. The question is why do i need to authenticate the server and How may I do it..? Thank you very much. Aaron -------------------- String username = ((NameCallback)callbacks[0]).getName(); System.out.println("Username: "+username); String password = new String(((PasswordCallback)callbacks[1]).getPassword()); System.out.println("Password: "+password); ------------------- -- View this message in context: http://www.nabble.com/Failed-to-start-server-after-enabling-JAAS-LoginModule-tp15590438s2354p15590438.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.