This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes  java:comp is not bound in this Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark " java:comp is not bound in this Context" Watch " java:comp is not bound in this Context" New topic
Author

java:comp is not bound in this Context

vinitha simon
Ranch Hand

Joined: Dec 13, 2007
Posts: 64
Iam getting the following exception

javax.naming.NameNotFoundException: Name java:comp is not bound in this Context

My context.xml is inside META_INF and it looks similar to

<context>

<Resource
name="jms/QueueConnectionFactory"
auth="Container"
type="com.ibm.mq.jms.MQQueueConnectionFactory"
factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory"
description="JMS Queue Connection Factory"
HOST="10.20.16.178"
PORT="1418"
CHAN="SYSTEM.WMS.SVRCONN"
TRAN="1"
QMGR="WMS01T"

/>

<Resource
name="jms/CarrierSelectionRequest"
auth="Container"
type="com.ibm.mq.jms.MQQueue"
factory="com.ibm.mq.jms.MQQueueFactory"
description="JMS Queue"
QU="QL.10.WMS.OUT.JESIE.CARRIER_SEL_REQ_PERF" />

</context>

and my web.xml have the following

<resource-env-ref>
<resource-env-ref-name>jms/QueueConnectionFactory</resource-env-ref-name>
<resource-env-ref-type>javax.jms.QueueConnectionFactory</resource-env-ref-type>
</resource-env-ref>

Can some one let me know where iam going wrong . I am using tomcat 5.5 .
Samson Kamau Muiruri
Greenhorn

Joined: May 24, 2011
Posts: 1

I havent really read your code because am in a hurry but i thought a quick answer might help you. I was experiencing the same problem while deploying in tomcat 6. The problem was being caused by catalina.jar in the war file.
Try cleaning up the war (remove jars files from the war's lib folder that are present in tomcat's lib folder) they deploy.
Good luck.

Kamau.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java:comp is not bound in this Context
 
Similar Threads
How to JNDI-Cannot create resource instance
ConnectionPool or resource-ref for JMS connection for P2P in WAS
Persistent Messages, What heppens if a system is started!
JMS and Websphere 6
Servlets, MDB and OC4J