Standalone client for JBOSSMQ PLEASE HELP :-(
wheyboer Aug 8, 2003 1:21 AMI have made a standalone client but i get the error:
java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.(SpyConnectionFactoryObjectFactory.java:25)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
at javax.naming.spi.NamingManager.getObjectFactoryFromReference(NamingManager.java:132)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:302)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:437)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:421)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.triennium.accountviewqueueservice.client.QueueListener.(QueueListener.java:44)
at com.triennium.accountviewqueueservice.client.QueueListener.main(QueueListener.java:27)
when i lookup the QueueConnectionFactory on the remote context. my code :
public QueueListener(){
QueueConnectionFactory qFactory = null;
InitialContext jndi = null;
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
env.put(Context.PROVIDER_URL, "myremotehostname:1099");
env.put(Context.SECURITY_PRINCIPAL, "myusername");
env.put(Context.SECURITY_CREDENTIALS, "mypassword");
try{
jndi = new InitialContext(env);
//this lookup (below) does throw the error.
//when i lookup a unexistent object, i get the
//standard object not bound error. so it confuses me
//that when i look up this queueconnection factory
//i get the error
qFactory = (QueueConnectionFactory)jndi.lookup
("QueueConnectionFactory");
}
catch(javax.naming.NamingException nex){
nex.printStackTrace();
}
}
i have included the whole jboss2.4.4 client directory
(i cant work with other versions due to several reasons), so i am not missing jars. i have checked the jars and org.jboss.logging.logger is in the jars i included.
I have also tried to include less jars but it does'nt matter, i still get the error.
PLEASE help me out!!!
has anyone some example code or experienced the same problems???