Reputation: 51
I have setup a dynamic web project in eclipse with JSF in which I trust on code from another project (framework). Therefore, I added the framework project to the build path of the website project.
So far so good, Eclipse recognises every class and the project builds without errors.
Problem is though that when I do "run on server" to test it on tomcat 6.0.24, the application fails. I get ClassNotFoundException on every class from the framework project.
Is this a bug or is some specific configuration necessary for this?
Upvotes: 5
Views: 3929
Reputation: 942
I was googling and ended up here for a similar problem. I wanted to make a note for others about the current situation on Eclipse Indigo, as the terminology has changed a bit by the looks of things.
On your project properties, do a filter/search for "deployment assembly".
It is then straightforward to add a project dependency. Job Done.
Thanks to Alexander's edited answer which led me to this.
Upvotes: 8
Reputation: 45576
Did you check Warnings in Problems
view?
Do you see Classpath entry /your/framework.jar will not be exported or published. Runtime ClassNotFoundExceptions may result
warning?
If you do.
Quick Fix
.Select a Fix
box.Finish
.EDIT
Now, I think I understand where disconnect is. I think now I remember the joy of figuring this out for the first time.
In your website project ( I will speculate here , but I guess you've created it as a Dynamic Web Project
):
Java EE Module Dependencies
panelJAR/Module
column. Beware, that for reasons not known to me, the list is not sorted ( and is not sortable ) in any particular order, so you may need to search for your project reference there.The results of this operation will be written to /website-project/.settings/org.eclipse.wst.common.component
file. Put this file into your source control.
Upvotes: 2