• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

problem in calling entity bean from session bean

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all...

i am calling entity bean form session bean . i am getting the following error.
java.lang.NoClassDefFoundError .employee.EmpEntityHome


at run time session bean did not get enitybean home..

i have set all the class path..

follwing is the dir structure of my application

d:\demo\Jsp
d:\demo\WEB-INF\classes\servlet
d:\demo\WEB-INF\lib

d:\ejb\entity\classes\employee\.class files
d:\ejb\entity\src\employee\.java files

d:\ejb\session\classes\emp\.class files
d:\ejb\session\src\emp\.java files


i do the folling things..

1. deploy the entity bean i get the (entity.jar) and put the entity.jar into the lib folder then i the set classpath of that jar file. 2. deploy the session bean i get the (session.jar) and put that session.jar into the lib folder then i set classpath of that jar file.

now i i try to call the sessionbean form the servlet. it will give the above error which i have mentioned.

same code which i write in sessionbean if i write in the servlet and not use session bean give directly call from servlet to entity bean then it works fine if i use session bean between that it gives me error

i check the class path ,package i included many times. there is not problem

can i need to combine both the jar file into ear file,if so how can i make a ear file. i am using weblogic 7.0 .

plz help me out to solve this problem

Regards
amit grover
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because of you have deployed session beans and entity beans in separate jar files; classes of entity bean are not available to session beans and vise visa. The easy solution fro this is put entity.jar into the server class path. Other solution is package all EJBs (entity and session beans) together in one single EJB jar file. There are many more solutions´┐Ż. Try this first.
 
You didn't tell me he was so big. Unlike this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic