[jboss-user] [Messaging, JMS & JBossMQ] - [JAVA-JMS]+Jboss confiurazione
erasmo78
do-not-reply at jboss.com
Thu Jan 17 08:10:21 EST 2008
I have this problem
Exception 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)
I have configured this file
/home/erasmo/jboss-4.0.5.GA/server/nodo1/deploy/jms/hajndi-jms-ds.xml
Add this row
queue/order
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
queue/mail
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
I have an application standalone in Java
....................
TextMessage message_topic = null;
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");
// 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/order");
connection = cf.createQueueConnection();
session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
sender = session.createSender(destination);
.............
But when i run my java application the answer is the following:
TextMessage message_topic = null;
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");
// 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/order");
connection = cf.createQueueConnection();
session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
sender = session.createSender(destination);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120860#4120860
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120860
More information about the jboss-user
mailing list