1 Reply Latest reply on Sep 10, 2001 8:53 PM by Sheng Zou

    help on jbossMQ's jndi

    Sheng Zou Newbie

      I cannot seem to get jndi work due to some security issue, pls help!

      On the JBoss Server, I got this exception:
      [OILServerILService] Client request resulted in a server exception:
      javax.jms.JMSSecurityException: This user does not exist
      at org.jboss.mq.server.StateManager.checkUser(StateManager.java:203)
      at org.jboss.mq.server.JMSServer.checkUser(JMSServer.java:466)
      at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:27
      0)
      at java.lang.Thread.run(Thread.java:484)
      [OILServerILService] Client request resulted in a server exception:
      javax.jms.JMSSecurityException: This user does not exist
      at org.jboss.mq.server.StateManager.checkUser(StateManager.java:203)
      at org.jboss.mq.server.JMSServer.checkUser(JMSServer.java:466)
      at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:27
      0)
      at java.lang.Thread.run(Thread.java:484)


      On the application side, I got this exception:
      C:\solipsa.com\bin>C:\solipsa.com\jdk\jre\bin\java -Djava.security.policy=C:\sol
      ipsa.com/conf/server.policy servicemanager.ServiceManager C:\solipsa.com/conf/DB
      .properties -console
      main: iCC component: Service Manager version: 1.0.22 [2808]
      main: Created InitialContext :: javax.naming.InitialContext@711404
      org.jboss.mq.SpyJMSException: Cannot get a client ID
      at org.jboss.mq.Connection.askForAnID(Connection.java:408)
      at org.jboss.mq.Connection.(Connection.java:110)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:47)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnection
      Factory.java:105)
      at com.solipsa.messaging.jms.connection.iCCJMSConnectionFactory.getNewQu
      eueConnection(com/solipsa/messaging/jms/connection/iCCJMSConnectionFactory.java:
      360)
      at com.solipsa.messaging.jms.connection.iCCJMSConnectionFactory._getQueu
      eConnection(com/solipsa/messaging/jms/connection/iCCJMSConnectionFactory.java:48
      2)
      at com.solipsa.messaging.jms.connection.iCCJMSConnectionFactory.getQueue
      Connection(com/solipsa/messaging/jms/connection/iCCJMSConnectionFactory.java:389
      )
      at com.solipsa.messaging.jms.iCCQueueManager.buildQueueConnction(com/sol
      ipsa/messaging/jms/iCCQueueManager.java:321)
      at com.solipsa.messaging.jms.iCCQueueManager.(com/solipsa/messagin
      g/jms/iCCQueueManager.java:255)
      at com.solipsa.messaging.message.iCCMessageService.initializeMessageQueu
      es(com/solipsa/messaging/message/iCCMessageService.java:78)
      at servicemanager.ServiceManager.registerService(servicemanager/ServiceM
      anager.java:635)
      at servicemanager.ServiceManager.main(servicemanager/ServiceManager.java
      :573)
      linked exception is:
      javax.jms.JMSSecurityException: This user does not exist
      <<no stack trace available>>
      main: com.solipsa.messaging.jms.exception.iCCConnectionException
      at com.solipsa.messaging.jms.connection.iCCJMSConnectionFactory.getNewQu
      eueConnection(com/solipsa/messaging/jms/connection/iCCJMSConnectionFactory.java:
      375)
      at com.solipsa.messaging.jms.connection.iCCJMSConnectionFactory._getQueu
      eConnection(com/solipsa/messaging/jms/connection/iCCJMSConnectionFactory.java:48
      2)
      at com.solipsa.messaging.jms.connection.iCCJMSConnectionFactory.getQueue
      Connection(com/solipsa/messaging/jms/connection/iCCJMSConnectionFactory.java:389
      )
      at com.solipsa.messaging.jms.iCCQueueManager.buildQueueConnction(com/sol
      ipsa/messaging/jms/iCCQueueManager.java:321)
      at com.solipsa.messaging.jms.iCCQueueManager.(com/solipsa/messagin
      g/jms/iCCQueueManager.java:255)
      at com.solipsa.messaging.message.iCCMessageService.initializeMessageQueu
      es(com/solipsa/messaging/message/iCCMessageService.java:78)
      at servicemanager.ServiceManager.registerService(servicemanager/ServiceM
      anager.java:635)
      at servicemanager.ServiceManager.main(servicemanager/ServiceManager.java
      :573)

      main: Fail to initialize message queues during to connection exceptions
      main: Service Manager bound and started

      Enter x to exit, ? for help

      ===================================================

      And Here is my code when create the InitialContext:
      if (ic == null) {

      Hashtable props = new Hashtable();
      props.put(Context.INITIAL_CONTEXT_FACTORY,
      "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "localhost:1099");
      props.put("java.naming.rmi.security.manager", "yes");
      props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
      try {
      ic = new InitialContext(props);
      } catch (NamingException ne) {
      Logger.log(Logger.ERROR, "Fails to creat InitialContext");
      ne.printStackTrace();
      }
      Logger.log(Logger.INFO, "Created InitialContext :: " + ic);
      }


      pls help!
      thanks,
      sheng