Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception during processing: java.lang.ClassCastException  RSS feed

Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a stateless session bean which has a method that returns a collection. S0
I wrote a wrapper class that uses this stateless bean, converts
this collection to standard string[] and deployed to Weblogic appserver 8.1.

But after deploying, when I tried to access this webservice, I am getting:


This is the method in the wrapper class, which I am trying to access from webservice client:

public String[] getA(String custtomerNumber) {
String[] retAs = null;
try {
ArrayList als = (ArrayList)sfb.getAls(custNum); //sfb is the session bean home
retAs = new String[als.size()];
for(int i = 0; i < als.size(); i++){
retAs[i] = (String)als.get(i);
} catch (RemoteException e) {
return retAs;
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!