[jboss-user] [JBoss Messaging] - Messaging client can't create connection
anshah1
do-not-reply at jboss.com
Wed Sep 20 17:38:43 EDT 2006
I have a simple client.. here's the crux of it..
public void initialize() throws Exception {
| // lookup the queue and topic objects
| System.out.println("Starting init");
| Destination queue = (Destination) mCtx.lookup("/queue/myQueue");
| System.out.println("q look up done " + queue);
| // lookup a connection factory
| ConnectionFactory factory = (ConnectionFactory) mCtx
| .lookup("/ConnectionFactory");
| System.out.println("factory done ");
| // create a connection
| javax.jms.Connection connection = factory.createConnection();
| System.out.println("created connection ");
| // create a session
| Session session = connection.createSession(true,
| Session.AUTO_ACKNOWLEDGE);
| System.out.println("created session");
| // create a message consumer for the topic
| MessageConsumer subscriber = session.createConsumer(queue);
| System.out.println("created consumer");
| // set this class as message listener for the topic
| subscriber.setMessageListener(this);
| System.out.println("finished init");
| connection.start(); // start connection
| }
|
This is the output I get.
:
| [java] You are connecting to server wd55237
| [java] Threads available 4
| [java] datasource look up done
| [java] Starting init
| [java] q look up done JBossQueue[myQueue]
| [java] factory done
|
I am running this example with the following class path...
C:\Documents and
| Settings\d3m293\workspace\NCBIOfflineRetrieval\build\lib\ncbiretrieval.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\blueprint-commons-db-3.8.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\brm-server.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\brm-util.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\jboss-messaging-client.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\seqhound-4.0.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\axis.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\commons-discovery-0.2.jar
|
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\commons-logging.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\jaxrpc.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\saaj.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\wsdl4j-1.5.1.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\activation.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\antlr-2.7.5H3.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\asm-attrs.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\asm.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\autonumber-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\axis.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bcel.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bindingservice-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\blueprint-commons-db-3.8.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bsf.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bsh-1.3.0.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bsh-deployer.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\cglib-2.1_2jboss.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\commons-collections.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\commons-httpclient.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\commons-logging.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\ejb3-persistence.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hibernate-annotations.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hibernate-entitymanager.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hibernate3.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hsqldb-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hsqldb.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\javax.servlet.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\javax.servlet.jsp.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-common-jdbc-wrapper.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-hibernate.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-j2ee.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jaxrpc.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jca.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jsr77.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jsr88.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-management.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-monitoring.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-remoting.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-saaj.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-transaction.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jbosssx.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jmx-adaptor-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jnpserver.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jpl-pattern.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jpl-util.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\log4j.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mail-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mail.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\msbase.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mssqlserver.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\msutil.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mysql-connector-java-5.0-nightly-20060131-bin.
| jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\pg74jdbc3.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\properties-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\scheduler-plugin-example.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\scheduler-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\seqhound-4.0.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\snmp-support.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\xmlentitymgr.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\etc\jndi.properties
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\build\lib
|
Any ideas what might be going wrong? It simply hangs at the createConnection point and does not receive any messages from the queue at all.
When I run one of the examples distributed with the messaging bundle, they run just fine.
how do I debug this kind of a problem? Any thoughts, inputs, ideas are most appreciated :))
Thanks.,
Anuj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973096#3973096
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973096
More information about the jboss-user
mailing list