-
1. Re: ConnectionFactory not bound (again)
stephanenicoll Aug 13, 2003 12:55 AM (in response to mattygiedt)Try to put the dependencies on the DestinationManagert
jboss.mq:service=DestinationManager
Also, post the code snippet that gets the factory -
2. Re: ConnectionFactory not bound (again)
mattygiedt Aug 13, 2003 8:09 AM (in response to mattygiedt)Here is the code calling the ctx lookup in ListenerQueueConnection.java:
private void init( String connectionFactory, String queue )
throws JMSException, NamingException
{
System.err.println("Looking up conn factory: " + connectionFactory );
InitialContext ctx = new InitialContext();
Object o = ctx.lookup( connectionFactory ); // line 31
if( o != null )
{
System.err.println(" Conn Factory Object: " + o.getClass().getName() );
}
QueueConnectionFactory qcf = (QueueConnectionFactory)o;
Queue q = (Queue)ctx.lookup( queue );
qcon = qcf.createQueueConnection();
session = qcon.createQueueSession( false,
QueueSession.AUTO_ACKNOWLEDGE );
sender = session.createSender( q );
qcon.start();
}
-----------------------------------------------
Here is the exception(s):
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
Incompletely deployed packages:
MBeans waiting for classes:
MBeans waiting for other MBeans:
[ObjectName: user:service=ListenerService
state: FAILED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: javax.naming.NameNotFoundException: ConnectionFactory not bound]
09:49:53,741 ERROR [STDERR] Looking up conn factory: ConnectionFactory
09:49:53,751 ERROR [ListenerService] Starting failed
javax.naming.NameNotFoundException: ConnectionFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.art.listener.ListenerQueueConnection.init(ListenerQueueConnection.java:31)
.......
Note that now both the ConnectionFactory and Queue are not in the JNDI tree when my MBean is dependent on DestinationManager, as the queue is loaded after my MBean tries to start. I think this is a dependency problem, but have no idea what to on.
Thanks in advance,
-Matt -
3. Re: ConnectionFactory not bound (again)
adrian.brock Aug 13, 2003 8:15 AM (in response to mattygiedt)I would place a dependency on the OIL connection factory
(the connection factory you are using) and the
queue MBean.
Regards,
Adrian -
4. Re: ConnectionFactory not bound (again)
stephanenicoll Aug 13, 2003 8:15 AM (in response to mattygiedt)are u really sure that JMS starts fine on your JBoss?
Try to find an item named RecursiveSearch in your /server/default/conf/jboss-service.xml and check if it set to true.
If set to false it might cause the problem -
5. Re: ConnectionFactory not bound (again)
mattygiedt Aug 13, 2003 9:17 AM (in response to mattygiedt)boot.log says: (for the recursive search)
DEBUG [URLDeploymentScanner] Adding URL from spec: deploy/
11:05:04,307 DEBUG [URLDeploymentScanner] URL: file:/C:/art/jboss/server/listener/deploy/
11:05:04,307 DEBUG [URLDeploymentScanner] Added url: file:/C:/art/jboss/server/listener/deploy/
11:05:04,307 DEBUG [URLDeploymentScanner] URL list: [file:/C:/art/jboss/server/listener/deploy/]
11:05:04,307 DEBUG [ServiceConfigurator] RecursiveSearch set to true in jboss.deployment:type=DeploymentScanner,flavor=URL
------------------------------------------
Adrian, not sure how to on OIL or the Queue.
11:05:26,819 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
Incompletely deployed packages:
MBeans waiting for classes:
MBeans waiting for other MBeans:
[ObjectName: user:service=ListenerService
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq.destination:service=Queue
jboss.mq:service=InvocationLayer
Depends On Me: ]
-------------------------------------------------------
5150
2048
C:\\artifact\\data\\
queue/listenerQueue
ConnectionFactory
jboss.mq:service=DestinationManager
jboss.mq.destination:service=Queue
jboss.mq:service=InvocationLayer
--------------------
Thanks in advance,
-Matt -
6. Re: ConnectionFactory not bound (again)
adrian.brock Aug 13, 2003 9:49 AM (in response to mattygiedt)jboss.mq:service=InvocationLayer,type=OIL
jboss.mq.destination:service=Queue,name=listenerQueue
Regards,
Adrian -
7. Re: ConnectionFactory not bound (again)
mattygiedt Aug 13, 2003 10:00 AM (in response to mattygiedt)Thanks everybody for your help. Changing the tag to Adrian's post did the trick.
Final aside:
I now recognize that I'm using the OIL Invocation Layer (thanks again Adrian) as I'm grabbing the 'ConnectionFactory' from the ctx. I think that I should be using the JVM IL per the documentation as my MBean is run inside the JBoss jvm.
So now my user-service.xml looks like:
5150
2048
C:\\artifact\\data\\
queue/listenerQueue
java:/ConnectionFactory
jboss.mq:service=DestinationManager
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq.destination:service=Queue,name=listenerQueue
And everything works fine.
-Matt -
8. Re: ConnectionFactory not bound (again)
vincentchun Sep 10, 2003 4:14 PM (in response to mattygiedt)Thanks for Dark_Lord
After I set this
True
, I solve the problem. -
9. Re: ConnectionFactory not bound (again)
stephanenicoll Sep 11, 2003 1:36 AM (in response to mattygiedt)you're welcome :)