Results 1 to 2 of 2

Thread: service invoked remotely by another service by http invoker : classloader problem

  1. #1
    Join Date
    Sep 2005
    Posts
    11

    Default service invoked remotely by another service by http invoker : classloader problem

    Hello,

    I use http Invoker remoting technology to access services remotely.

    I have a service that invoke remotely another service by http invoker.
    These 2 services are deployed in 2 separated wars. In each war, there is the object ClientIdentification.

    First, the service (MyService) calls remotely the other service (clientService) to get the object ClientIdentification (1) :
    Secondly, the service (MyService) calls remotely the other service (ClientService) to update the object ClientIdentification. (2)

    Code:
    public void MyService {
    
             public void updateClient() {
    	
    ClientIdentification clientIdentification =  this.clientService.viewClient("000001");   (1)
                    clientIdentification.setNumberOfChildren(4);
                    this.clientService.updateClient(clientIdentification);   (2)
             }
    }
    When I do the update, there is the following exception :

    org.springframework.web.util.NestedServletExceptio n: Class not found during deserialization; nested exception is java.lang.ClassNotFoundException: No ClassLoaders found for: com.cwsoft.client.client.businessobject.ClientIden tification
    Caused by:
    java.lang.ClassNotFoundException: No ClassLoaders found for: com.cwsoft.client.client.businessobject.ClientIden tification

    I suspect that the classloader of the ClientIdentification object in the caller service is not the same as the ClientIdentification object in the service accessed.

    Is there any solution or advice to resolve this problem ?

    Thanks in advance,

    Jérémie Balcaen

  2. #2
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    164

    Default

    Depends on your app server; some app servers allow a 'flat' classloading scheme (JBoss), though the value of this is dubious; have had the most luck with each application being isolated.

    Explore the documentation for your appserver around configuring classloading behaviour.
    Chris Lee (blog)
    Principal Consultant
    Digital Ascent Inc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •