• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

app modules

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have the below questions.

1. In my application ear, I have a ejb module (project) and web module(project).
Which module's (ejb / web) will be loaded first by the class loader?
Is it web, since, web classes call the ejbs?.

2. I have a jar file with utility .class files.I have included this jar in the web project's lib folder.But,at runtime,I get "NoClassDefFoundError" when the classes of utility jar is called.
Do I miss any setting?If so, please let me know.
Also, when I include the same utiltiy jar in ear and refer it in web module(Java Jar Dependencies), everything works fine.

Thanks in advance,
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tmmet Johnson:
Hi,
I have the below questions.

1. In my application ear, I have a ejb module (project) and web module(project).
Which module's (ejb / web) will be loaded first by the class loader?
Is it web, since, web classes call the ejbs?.

2. I have a jar file with utility .class files.I have included this jar in the web project's lib folder.But,at runtime,I get "NoClassDefFoundError" when the classes of utility jar is called.
Do I miss any setting?If so, please let me know.
Also, when I include the same utiltiy jar in ear and refer it in web module(Java Jar Dependencies), everything works fine.

Thanks in advance,



The order of classloading depends on the application server and also on classloader setting which you might have defined. Since you not facing any problem when putting the utility jar in the ejb jar , the ejb jar is getting loaded first. Are you using weblogic server ?
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This varies with the particular server and
different versions of each server, but
sometimes it helps to provide a
classpath in the manifest in order to
find libraries that are outside the
component war or ejb-jar, but are
in the ear.
 
Tmmet Johnson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for the answers.I am using websphere.
Can anyone answer my question no - 2?

Thanks,
 
reply
    Bookmark Topic Watch Topic
  • New Topic