Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception in messaging application

James Clarke
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I wrote a simple application that sends and receives messages. I am using netbeans IDE and the Sun application server. I am getting the below exception at this code in the application:

ConnectionFactory queueConnectionFactory = (ConnectionFactory)


Queue name is testjmsgateway.queue
Jul 4, 2006 10:49:33 PM com.sun.enterprise.naming.SerialContext lookup
SEVERE: NAM0004: Exception during name lookup : {0}
java.lang.InstantiationException: javax.jms.ConnectionFactory
at java.lang.Class.newInstance0(
JNDI API lookup failed: javax.naming.CommunicationException: serial context communication ex [Root exception is java.lang.InstantiationException: javax.jms.ConnectionFactory]
at java.lang.Class.newInstance(
at javax.naming.spi.NamingManager.getObjectFactoryFromReference(
at javax.naming.spi.NamingManager.getObjectInstance(
at com.sun.enterprise.naming.SerialContext.lookup(
at javax.naming.InitialContext.lookup(
at gateway.SimpleQueueSender.main(
Java Result: 1
BUILD SUCCESSFUL (total time: 27 seconds)

Anyone know what could be causing this ?


[ July 04, 2006: Message edited by: James Clarke ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic