1 Reply Latest reply on Apr 13, 2002 12:45 AM by Hiram Chirino

    HELP! org.jboss.mq.SpyJMSException: Cannot start a the clien

    Sergei Batiuk Newbie

      Hello,

      I am trying to use applet as a message (topic) listener.
      I am using Win2000/JRE 1.4.

      I am connecting to the JBoss JMS service in the init() method of the applet (see the snip code below).

      Everything works fine, before I press "refresh" button in my browser. After refreshing, applet gives me exception: org.jboss.mq.SpyJMSException: Cannot start a the client IL service (full stack trace below). What's going on?

      Please help!

      Thanks in advance,
      Sergei Batiuk.


      protected Context context;
      protected TopicConnectionFactory factory;
      protected TopicConnection subscriberConnection;
      protected Topic subscriberTopic;
      protected TopicSession subscriberSession;

      public void init() {
      ... ( GUI initialization ) ...

      Context ctx = getContext();
      factory = (TopicConnectionFactory)ctx.lookup("java:/UILConnectionFactory");
      subscriberConnection = factory.createTopicConnection();
      subscriberTopic = ( Topic )ctx.lookup( "topic/personnelTreeTopic" );
      subscriberSession = subscriberConnection.createTopicSession( false, TopicSession.AUTO_ACKNOWLEDGE );
      subscriberConnection.start();
      ...

      }

      public Context getContext() {
      if ( context == null ) {
      String host = this.getCodeBase().getHost();
      Hashtable props = new Hashtable();
      props.put( Context.INITIAL_CONTEXT_FACTORY , "org.jnp.interfaces.NamingContextFactory" );
      props.put( Context.PROVIDER_URL, "jnp://" + host + ":1099" );
      Context ctx = new InitialContext( props );
      System.out.println("got Context!");
      context = ctx;
      }
      return context;
      }

      -------------------------------------------------
      -------------------------------------------------
      Exception I receive:



      org.jboss.mq.SpyJMSException: Cannot start a the client IL service

      at org.jboss.mq.Connection.startILService(Connection.java:428)

      at org.jboss.mq.Connection.(Connection.java:119)

      at org.jboss.mq.Connection.(Connection.java:135)

      at org.jboss.mq.SpyConnection.(SpyConnection.java:58)

      at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:64)

      at bsv.personnel.web.PersonnelTree.registerForMessages(PersonnelTree.java:256)

      at bsv.personnel.web.PersonnelTree.jbInit(PersonnelTree.java:238)

      at bsv.personnel.web.PersonnelTree.init(PersonnelTree.java:73)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      linked exception is:

      java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)

      at java.security.AccessControlContext.checkPermission(Unknown Source)

      at java.security.AccessController.checkPermission(Unknown Source)

      at java.lang.SecurityManager.checkPermission(Unknown Source)

      at sun.applet.AppletSecurity.checkAccess(Unknown Source)

      at java.lang.ThreadGroup.checkAccess(Unknown Source)

      at java.lang.Thread.init(Unknown Source)

      at java.lang.Thread.(Unknown Source)

      at org.jboss.mq.il.uil.UILClientILService.start(UILClientILService.java:71)

      at org.jboss.mq.Connection.startILService(Connection.java:422)

      at org.jboss.mq.Connection.(Connection.java:119)

      at org.jboss.mq.Connection.(Connection.java:135)

      at org.jboss.mq.SpyConnection.(SpyConnection.java:58)

      at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:64)

      at bsv.personnel.web.PersonnelTree.registerForMessages(PersonnelTree.java:256)

      at bsv.personnel.web.PersonnelTree.jbInit(PersonnelTree.java:238)

      at bsv.personnel.web.PersonnelTree.init(PersonnelTree.java:73)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      linked exception is:

      java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)

      at java.security.AccessControlContext.checkPermission(Unknown Source)

      at java.security.AccessController.checkPermission(Unknown Source)

      at java.lang.SecurityManager.checkPermission(Unknown Source)

      at sun.applet.AppletSecurity.checkAccess(Unknown Source)

      at java.lang.ThreadGroup.checkAccess(Unknown Source)

      at java.lang.Thread.init(Unknown Source)

      at java.lang.Thread.(Unknown Source)

      at org.jboss.mq.il.uil.UILClientILService.start(UILClientILService.java:71)

      at org.jboss.mq.Connection.startILService(Connection.java:422)

      at org.jboss.mq.Connection.(Connection.java:119)

      at org.jboss.mq.Connection.(Connection.java:135)

      at org.jboss.mq.SpyConnection.(SpyConnection.java:58)

      at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:64)

      at bsv.personnel.web.PersonnelTree.registerForMessages(PersonnelTree.java:256)

      at bsv.personnel.web.PersonnelTree.jbInit(PersonnelTree.java:238)

      at bsv.personnel.web.PersonnelTree.init(PersonnelTree.java:73)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)