aspose file tools
The moose likes Java in General and the fly likes Class Cast Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Class Cast Exception" Watch "Class Cast Exception" New topic
Author

Class Cast Exception

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
i m using JBoss 4.0.3 and i am getting a class cast exception when i try to look up any thing in the context...
e.g. when i say:
myQueue = (Queue) ctx.lookup("queue/A")
i get a class cast exception.

I have included jms.jar in the classpath.

Any help will be appreciated..

Thanx in advance.
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2341
Originally posted by Sahil Sharma:
i m using JBoss 4.0.3 and i am getting a class cast exception when i try to look up any thing in the context...
e.g. when i say:
myQueue = (Queue) ctx.lookup("queue/A")
i get a class cast exception.

I have included jms.jar in the classpath.

Any help will be appreciated..

Thanx in advance.


Try something like this to see what the actual type of the object is.

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14670
    
  11

You can also check in the JBoss JMXConsole what kind of object "queue/A" is mapped to.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class Cast Exception
 
Similar Threads
Read the JMS Queue subscriber count
Cant get reference to Queue
classcast exception while using JMS with Jboss
Using Stored procedure in spring with hibernate
Help required for JMS on Jboss server