facebook

ClassCastException in MDB

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #267521 Reply

    Hello,

    I’m trying to call a web service using the generated XFire client from an MDB and no matter what I try I get a ClassCastException. I’m using Spring 2.0.2 and I’m not sure if that is related, although I doubt it. I’ve tried instantiating the generated client class directly and also injecting it using Spring and no matter what it’s the same exception. It is failing in the create0 method which is called from the clients constructor, here:

    
        service0 = asf.create(
                    (PlaceAnOrderSoapPort.class),
                    props);
    

    When I run the static main method in the generated client it runs fine, just not in the container. Of course I am not calling the static main method from the MDB. I’m using JBoss 4.0.5. Anyone have any ideas?

    #267522 Reply

    tomeksz
    Member

    Can you debug this code and check what class is passes to constructor ? I can only guess that spring wraps object with some proxy ( if you e.g. use some spring aop ) and that causes problem.

    #267534 Reply

    It is the AnnotationServiceFactory and it takes the generated soap port class that XFire creates when you run wsgen or use the ME client stub generator. Someone from Genuitec have any ideas?

    Thanks,
    Randy

    #267620 Reply

    tomeksz
    Member

    Did you put breakpoint at this line and check what exactly is passed as props param ?
    This also can be a class loader problem

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: ClassCastException in MDB

You must be logged in to post in the forum log in