• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class Cast Exception  RSS feed

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also check in the JBoss JMXConsole what kind of object "queue/A" is mapped to.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!