-
1. Re: ArrayStoreException when accessing bean from war
jaikiran Jan 24, 2008 9:03 AM (in response to lorenzbeyeler)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[3];
x[0] = 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? -
2. Re: ArrayStoreException when accessing bean from war
lorenzbeyeler Jan 25, 2008 2:50 AM (in response to lorenzbeyeler)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.
Thanks,
Lorenz -
3. Re: ArrayStoreException when accessing bean from war
lorenzbeyeler Jan 25, 2008 4:12 AM (in response to lorenzbeyeler)I changed the packaging: all beans and the .WAR are now deployed in one .EAR - and it works.
Regards, Lorenz -
4. Re: ArrayStoreException when accessing bean from war
lorenzbeyeler Jan 28, 2008 2:49 AM (in response to lorenzbeyeler)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!
Lorenz -
5. Re: ArrayStoreException when accessing bean from war
lorenzbeyeler Jan 29, 2008 11:40 AM (in response to lorenzbeyeler)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
not set.
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.
Regards,
Lorenz Beyeler