texerasmo
17-01-2008, 11:35
.....
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "10.173.174.1:1099");
properties.put(Context.SECURITY_AUTHENTICATION, "no");
// properties.put(Context., "no");
ctx = new InitialContext(properties);
//Queue Initializzation
cf = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
destination = (Queue)ctx.lookup("queue/A");
connection = cf.createQueueConnection();
session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
sender = session.createSender(destination);
...
Ho fatto un classe in java che dovrebbe inviare un messaggio a jboss ma quando mando in esecuzione il mio applicativo ho la seguente risposta
xception in thread "main" javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at erasmo.jms.Sender.main(Sender.java:45)
Potere darmi un mano?
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "10.173.174.1:1099");
properties.put(Context.SECURITY_AUTHENTICATION, "no");
// properties.put(Context., "no");
ctx = new InitialContext(properties);
//Queue Initializzation
cf = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
destination = (Queue)ctx.lookup("queue/A");
connection = cf.createQueueConnection();
session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
sender = session.createSender(destination);
...
Ho fatto un classe in java che dovrebbe inviare un messaggio a jboss ma quando mando in esecuzione il mio applicativo ho la seguente risposta
xception in thread "main" javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at erasmo.jms.Sender.main(Sender.java:45)
Potere darmi un mano?