JMS-client kann keine Verbindung von JBoss 6 ALS Ausnahme

Ich jetzt bin, immer diese Ausnahme von einer einfachen JMS-client, den ich schrieb, einfach mal testen, um zu sehen, wenn ich eine Verbindung herstellen können, um die JBoss-JMS. Hier ist der Ausschnitt aus meinem code unten:

        Properties props = new Properties();
  props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
  props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
  props.setProperty("java.naming.provider.url", url_);

  Context context = new InitialContext(props);
  System.out.println("performing lookup...");

  Object tmp = context.lookup("/ConnectionFactory");
  System.out.println("lookup completed, making topic");

  TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
  conn = tcf.createTopicConnection();
  topic = (Topic) context.lookup(name_);

  session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
  conn.start();

  TopicSubscriber recv = session.createSubscriber(topic);
  recv.setMessageListener(this);

Habe ich die folgenden jar-Dateien:
jms.jar (ich habe diese von außerhalb des JBoss-Distribution)
jbossall-client.jar
log4j.jar
jboss-logging.jar
javax.jms.jar (ich habe diese von außerhalb des JBoss-Distribution)
jnpserver.jar
jboss-common-core.jar

Bekomme ich die folgende exception:

javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
 java.lang.ClassNotFoundException: org.hornetq.jms.referenceable.SerializableObjectRefAddr (no security manager: RMI class loader disabled)]

Diese wird lokal ausgeführt, auch es scheint, dass es eine Verbindung zum JBoss-server nur, dass es werfen diese exception.

Schreibe einen Kommentar