views:

14

answers:

1

We have a project that we shoud update from ejb2.1 to 3.1 and jboss from 3.2.1 to latest Jboss6 milestone. Our Project Structure: we have an ear that contains application.xml, that points to ejb-jar(2.1) classes, but actual clasess are stored in WEB-INF/classes. Now when we load ejb via jndi we get it, but when we are trying to cast in business interface we get ClassCastException. I think it is an issue with classloaders. Could anyone help how to setup jboss6 to use one classloader for all classes.

Thx

A: 

JBoss classloading scenarios can get complex, as described here. What might seem intuitively like the "right" way of doing things often turns out to contradict the classloader delegation model of the Java2 specification.

This is just one of the many things that has changed considerably between JbossAS 3 and 6. I suggest reading the above document to get a feel for how the classloader in JBoss works, and how to configure it to do what you want.

skaffman