As per the javadocs of ArrayStoreException:
Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. For example, the following code generates an ArrayStoreException:
Object x = new String;
x = new Integer(0);
You say that it works with JUnit and not from a war deployed in the server. Is this war a different application? How are you applications packaged?
The applications are packaged as follows:
one .EAR (A) with 3 stateless session beans
one .EAR (B) with 1 stateless session bean and a web-service server deployed in a .WAR.
The webservice from (B) reads objects from two of the beans in (A). Requests without 'generics' in the interface work perfectly.
And yes, accessing the beans in (B) from jUnit works even with 'generics'.
And, by the way, the same configuration works flawlessly on AIX with
Websphere 6.1 (SP 11?), so I think it's something JBoss-specific.
I changed the packaging: all beans and the .WAR are now deployed in one .EAR - and it works.
Please disregard my previous post - it still doesn't work!
The configuration now is:
one .EAR with
4 stateless session beans
2 .WAR's (jax-ws webservice servers)
I just wonder, is this something that should work on JBoss
or is it (not yet) supported?
Thanks for any ideas!
I have finally found the problem:
The jar-files (commons-lang.jar, some application DTO
and helper classes) were in the web-inf directory of
the war file. The classpath in the manifest.mf file was
After moving the jars to the .ear file and setting the
classpath, everying works as desired.
JBoss seems to be more demanding concerning the
classpath than Websphere.