You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Benoit Decherf (JIRA)" <ji...@apache.org> on 2006/12/06 17:43:22 UTC

[jira] Created: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
-----------------------------------------------------------------------------

                 Key: AXIS2-1835
                 URL: http://issues.apache.org/jira/browse/AXIS2-1835
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.1
         Environment: jdk 1.5
            Reporter: Benoit Decherf


I want to create a service which return an object containing a List:

The object to return:
public class Container {
  private List myList = new ArrayList();

  public List getList() {
    return myList;
  }
}

The service (pojo) :
public class MyService {
  private Container container = new Container();

  public Container getContainer() {
    container.getList().add("a test");
    return container;
  }
}

When I try to access the service I receive an Exception:
Caused by: java.lang.IllegalArgumentException: null rcl
        at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
        at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)


I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?

I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".

Thanks,
Benoit

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471300 ] 

Deepal Jayasinghe commented on AXIS2-1835:
------------------------------------------

run you code and got the following output;

not null
test


> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Federica Ciotti (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471611 ] 

Federica Ciotti commented on AXIS2-1835:
----------------------------------------

ops.I forgot to update my eclipse classpath with the latest snapshot, I got the right output now, 
many thanks

why do you have null value for the returnTypes arg?

federica

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1835?page=all ]

Deepal Jayasinghe reassigned AXIS2-1835:
----------------------------------------

    Assignee: Deepal Jayasinghe

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "parimalb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611504#action_12611504 ] 

parimalb commented on AXIS2-1835:
---------------------------------

Hi Deepal,

 

I am using Axis2 1.4. I want to return object (Weather) from web method
which contains list of another object (Season object). Season object also
contains list of another objects.  

>From web service client, I am able to access all other properties
(tempreture, rain etc)   except list of season object.  If I convert the
datatype of season list from java.util.list to simple array then it works
fine. But our java classes are already developed and now we want to expose
them as webservice.    

 

Therefore could you please tell me is there any way to access java list from
object returned from web service? 

 

Thanks,

Parimal

 


"Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment."
www.cybage.com 




> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>            Assignee: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Benoit Decherf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1835?page=all ]

Benoit Decherf updated AXIS2-1835:
----------------------------------

    Attachment: patchBeanUtil.patch

I propose this patch. There is 2 changes:
one is change the isArrayList method of SimpleTypeMapper to isCollection so that all collection could be return and not just ArrayList.

The other one is to check if the ClassLoader is null and add the SystemClassLoader in this case.

What do you think about this ? 

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Reopened: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reopened AXIS2-1835:
--------------------------------------


> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471264 ] 

Deepal Jayasinghe commented on AXIS2-1835:
------------------------------------------

can you please attache your client code. btw I have attach the code that I used to invoke the service

  RPCServiceClient client = new RPCServiceClient();
        Options  opts = new Options();
        opts.setAction("urn:getContainer");
        opts.setTo(new EndpointReference("http://localhost:8000/axis2/services/MyService"));
        client.setOptions(opts);
        client.invokeBlocking(new QName("http://ws.apache.org/axis2/xsd","getContainer"),new Object[]{null});

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-1835.
--------------------------------------

    Resolution: Fixed

applied the patch , thx Benoit for the patch.

Thanks
Deepal

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Federica Ciotti (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471293 ] 

Federica Ciotti commented on AXIS2-1835:
----------------------------------------

Client code:
public class Test1 {
	public static void main(String[] args){

		RPCServiceClient sender = null;
		try{
			sender = new RPCServiceClient();
			EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/findService/");
			EndpointReference myEPR = new EndpointReference("http://localhost:8080/axis2/services/clientService");

			Options options = new Options();
			options.setTo(targetEPR);
			options.setFrom(myEPR);
			sender.setOptions(options);

			/*QName opInit = new QName("http://one/xsd", "initFind");
		Object[] arg1 = new Object[] {};
		sender.invokeRobust(opInit, arg1);*/

			QName opget = new QName("http://one/xsd", "getFindResult");
			Object[] arg = new Object[] {};	
			Class[] returnTypes = new Class[] {FindResult.class};

			Object[] response = sender.invokeBlocking(opget, arg, returnTypes);
			FindResult al = (FindResult) response[0];
			if (al == null) {System.out.println("Null");}
			else { 
				System.out.println("not null");
				ArrayList<String> list = al.getList();
				System.out.println(list.get(0));
			}

			/*OMElement OMresponse = sender.invokeBlocking(opget, arg);
		String s = OMresponse.toString();
		System.out.println(s);*/

		}catch(AxisFault a){System.out.println("AxisFault in main"); a.printStackTrace();  } 

	}
}
--------------------------
Service Code:
package one;
public class FindResult {
	private ArrayList<String> myList = new ArrayList<String>();
	
	public FindResult(){
		myList.add("test");
		myList.add("test1");}
	
	public ArrayList<String> getList() {
	    return myList;}
}
package one;
public class ServiceFindResult {
	
private FindResult res = new FindResult();
	
	public void initFind(){
		res = new FindResult();}
	
	public FindResult getFindResult(){
		return res;}
}


> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-1835.
--------------------------------------

    Resolution: Fixed

Hi 

Please Get the latest SNAPSHOT and try.

I invoked the service and got the following response

<ns:getContainerResponse xmlns:ns="http://ws.apache.org/axis2/xsd">
            <return>
               <list>a test</list>
            </return>
         </ns:getContainerResponse>



> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Benoit Decherf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1835?page=all ]

Benoit Decherf updated AXIS2-1835:
----------------------------------

    Attachment: patchSimpleTypeMapper.patch

remove the method isArrayList and add the isCollection. 

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Federica Ciotti (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470962 ] 

Federica Ciotti commented on AXIS2-1835:
----------------------------------------

I'm trying to do the same, I've just updated my axis2 with the patch but now I get 

Exception in thread "main" java.lang.NullPointerException
	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:299)
	at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:554)
	at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:504)
	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:443)
	at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:97)
	at one.Test_ServiceFindBusiness.main(Test_ServiceFindBusiness.java:56)

Did I miss something? 

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1835) return a java.lang.List return a java.lang.IllegalArgumentException: null rcl

Posted by "Federica Ciotti (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471261 ] 

Federica Ciotti commented on AXIS2-1835:
----------------------------------------

Sorry Deepal, I miss to say that I'm using a RPCMessageReceiver.

With the instruction:
      	OMElement resp = sender.invokeBlocking(opAdd, arg);
I get the right response.

The exception comes when I do:
       Object[] response = sender.invokeBlocking(opAdd, arg, returnTypes);

Exception in thread "main" java.lang.NullPointerException
at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:299)
at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:554)
at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:504)
at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:443)
at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:97)
at one.Test_ServiceFindBusiness.main(Test_ServiceFindBusiness.java:56) 

Seems like a deserilization problem, should I create a new issue?

Many Thanks

> return a java.lang.List return a java.lang.IllegalArgumentException: null rcl
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1835
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1835
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>         Environment: jdk 1.5
>            Reporter: Benoit Decherf
>         Assigned To: Deepal Jayasinghe
>         Attachments: patchBeanUtil.patch, patchSimpleTypeMapper.patch
>
>
> I want to create a service which return an object containing a List:
> The object to return:
> public class Container {
>   private List myList = new ArrayList();
>   public List getList() {
>     return myList;
>   }
> }
> The service (pojo) :
> public class MyService {
>   private Container container = new Container();
>   public Container getContainer() {
>     container.getList().add("a test");
>     return container;
>   }
> }
> When I try to access the service I receive an Exception:
> Caused by: java.lang.IllegalArgumentException: null rcl
>         at org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>         at org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)
> I checked the code, and I saw in the class org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send a list is the ArrayList. Why ?
> I change the isArrayList method in org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a java.util.List instead of just the ArrayList and it works fine. So why limit to ArrayList (and not just Collection)?
> I think there is an other bug which return the IllegalArgumentException in org.codehaus.jam.internal.reflect.ReflectClassBuilder.java:
> In the method getPullParser of the class BeanUtil, there is no check on what returns beanObject.getClass().getClassLoader() before doing the addClassLoader.
> Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader. So that explain why the error is "null rcl".
> Thanks,
> Benoit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org