Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 8944
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,
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic