5 Replies Latest reply: Oct 21, 2002 12:38 PM by Matthew Rawlings RSS

Cannot authenticate user

Eric Chow Apprentice

Hello,

I am trying to send a message to JBossMQ in a Servlet.
All the programs are in a single EAR and deploy to JBoss3.0+Jetty.

My Servlet send the message to the Queue through a SessionBean, but it just raised an exception :
org.jboss.mq.SpyJMSException: Cannot authenticate user


Would you please to tell me why and how to solve it?

JVM: JDK1.4
OS: Win2000 Pro
JBoss3.0 standard version.

Best regards,
Eric

  • 1. Re: Cannot authenticate user
    vishal Newbie

    Hi

    i faced the same problem , i changed the jdk version it started working , i dont know how but trying changing jdk version to 1.3 and check

    AuthJavaUser

  • 2. Re: Cannot authenticate user
    Michael Newbie

    I`ve already changed to jdk1.3.1, but it doesn`t help.

    Any other suggestions?

    Thanks
    Michael

  • 3. Re: Cannot authenticate user
    Michael Newbie

    > Would you please to tell me why and how to solve it?
    >
    > JVM: JDK1.4
    > OS: Win2000 Pro
    > JBoss3.0 standard version.

    I have got the same system properties and I got it now with the following method for InitialContext:

    private static javax.naming.Context getJBossInitialContext() throws NamingException {
    java.util.Hashtable props = new java.util.Hashtable();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL, "localhost");
    props.put("java.naming.rmi.security.manager", "yes");
    props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");

    // Get the initial context with given properties
    return new InitialContext(props);
    }

    But both Server and Client must be compiled with the same JDK-Version. In my case it was jdk 1.4.0.

    I`ve compiled my client app with jdk1.3.1 and the server was running under 1.4.0 and I always got error:
    Cannot authenticate user...

  • 4. Re: Cannot authenticate user
    Cosmotic Newbie

    I've had the same problem. Upgrading the server from JDK 1.4.0_02 to 1.4.1 solved this.

  • 5. Re: Cannot authenticate user
    Matthew Rawlings Newbie

    This started failing for myself in my IDE.

    I found the trick to be the same JVM in the IDE and for JBoss.