Jboss share classes between war and sar

K

kapilbajaj

Hi,

I have a web archive and service archive running with Jboss-4.0.2. My
requirement is to import some classes from war into sar.

I can get the compilation by defining classpath to use classes from
different src. But somehow when I run jboss, I get class not found
exception.
I tried specifying war in jboss-service.xml of sar under classpath->
archives. Since war contains classes like WEB-INF/classes/<package>, it
not able to find package.

Please let me know if there is any way to share classes among different
archives.

Thanks,
Kapil
 
J

Jeff.C

I met similar problems several years ago.
When I deployed an .ear file which includes a war file, some
ejbs(jars.) and some utility jar files. The utility jar files cant be
shared by war and ejbs. The problem took me several days.
But your question is another case, I think you need to know the
relationship between classloaders of sar and war.
 
K

kapilbajaj

Thanks for the solutions. common classes in a seperate jar solved
problem

-Kapil
 
R

Raymond DeCampo

Hi,

I have a web archive and service archive running with Jboss-4.0.2. My
requirement is to import some classes from war into sar.

I can get the compilation by defining classpath to use classes from
different src. But somehow when I run jboss, I get class not found
exception.
I tried specifying war in jboss-service.xml of sar under classpath->
archives. Since war contains classes like WEB-INF/classes/<package>, it
not able to find package.

Please let me know if there is any way to share classes among different
archives.

I understand that you have solved the problem, but as an FYI, you should
know that the default configuration for JBoss is not fully J2EE
compliant. Consult the readem_j2ee.html file in your JBoss home
directory for instructions on how to change the configuration to make it
J2EE compliant.

HTH,
Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top