aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How to refer web project from ejb project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to refer web project from ejb project" Watch "How to refer web project from ejb project" New topic
Author

How to refer web project from ejb project

Kulbhushan Azad
Greenhorn

Joined: Nov 06, 2008
Posts: 3
Hi

I am using websphere 6.0 and i have to add a new stateless session bean in the ejb module which needs to access the existing business logic classes present in WEB project of the same EAR.

I am using RSA as the IDE for the development and added the webproject in the buildpath as a "required projects on the build path" entry. The application compiles fine . However , when i try to access the bean with local or remote client then its giving error as
java.lang.NoClassDefFoundError for the same reference class of web project which was used in the bean.

Please tell me where do i need to add the reference of this particular webproject class in order to correct this problem

Thanks a lot in advance
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

Well I don't how this would be possible but I would say that this is a very weird situation and I think you should think about redesigning your application a bit...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Raf Szczypiorski
Ranch Hand

Joined: Aug 21, 2008
Posts: 383
When you want to be able to access classes in both modules in an EAR, you put it in a separate jar file in a lib subdirectory. You can change the name of this directory in application.xml using the <library-directory> element. Check if this works for you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to refer web project from ejb project