3 Replies Latest reply on Feb 28, 2005 3:42 AM by Steven Peh

    EJB sending message object  to remote machine Queue

    Vijayanathan Newbie

      hi,

      in my bean iam sending some message to remote machine queue using JMS.
      but iam getting error,

      my source code
      --------------
      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.PROVIDER_URL, "jnp://192.168.1.7:1099/");
      props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");

      InitialContext ctx=new InitialContext(props);
      connectionFactory = (QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
      queue = (Queue)ctx.lookup("queue/TestQ");

      this code i called inside bean bissness method
      bean type is stateless session bean

      error message
      -------------

      2005-02-24 15:08:35,109 INFO [STDOUT] QProducerBean :sessionContext called...........
      2005-02-24 15:08:35,109 INFO [STDOUT] QProducerBean :create called...........
      2005-02-24 15:08:35,171 INFO [STDOUT] Exception in producerbeanjavax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)]
      2005-02-24 15:08:35,171 ERROR [STDERR] javax.naming.CommunicationException. Root exception is
      2005-02-24 15:08:35,171 ERROR [STDERR] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)
      2005-02-24 15:08:35,171 ERROR [STDERR] java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)
      2005-02-24 15:08:35,171 ERROR [STDERR] java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)
      2005-02-24 15:08:35,171 ERROR [STDERR] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:240)
      2005-02-24 15:08:35,171 ERROR [STDERR] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
      2005-02-24 15:08:35,171 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
      2005-02-24 15:08:35,171 ERROR [STDERR] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      2005-02-24 15:08:35,171 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
      2005-02-24 15:08:35,171 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      2005-02-24 15:08:35,171 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:345)
      2005-02-24 15:08:35,171 ERROR [STDERR] at test.QProducerBean.ejbCreate(QProducerBean.java:43)

      Is this any error in my code, pls give solution
      iam using JBoss-3.2.6RC in both side.