- This topic has 7 replies, 2 voices, and was last updated 19 years, 5 months ago by
Riyad Kalla.
-
AuthorPosts
-
Jurgis JurkstaMemberHi!
I have the following problem:
I have two projects
1) classes that I want to use for all my web projects
2) a web projectI can compile all together but classes from the first project are
not copied into web project’s /WEB-INF/classes directory and therefore
I can not run the web application. It fails with NoClassDefFoundError exception.I have experimented with project settings but could not fix the problem.
Any help would be appreciated.
Jurgis
January 25, 2006 at 7:51 pm #245346
Riyad KallaMemberJurgis,
You need to make project #1 a Java Project. After you do that, open your web project properties, select Java Build Path, click Projects tab and add your Java project. Then go down to Project Referneces and check it there. Hit OK.Now open your project properties and go to MyEclipse-Web > Deployment and make sure that deployment is set to “smart”, if not there, then have it set at the workbench level.
January 25, 2006 at 11:48 pm #245357
Jurgis JurkstaMemberThank you for the reply!
Unfortunatelly it did not fix the problem.
I created a new workspace with two projects and the problem still remains.
The test workspace is here: http://www.it-solutions.lv/~jurgis/tmp/TestWorkspace.zip (size: 3178K)Regards,
JurgisJanuary 26, 2006 at 7:50 am #245381
Riyad KallaMemberJurgis,
I got your workspace, opened it, clicked the deployment tool, made a Custom Location deployment to C:\Test\Deployment, and opened it up and my classes includes the output from the TestLib project just fine.I looked in your log file and found what the problem was:
!ENTRY com.genuitec.eclipse.ast.deploy.core 1 0 2006-01-26 06:47:22.916
!MESSAGE Error while added deployment-nature to project
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: /WebProject/.project.You need to refresh both your projects. Right click on their roots and do a Refresh.
January 26, 2006 at 10:33 am #245417
Jurgis JurkstaMemberRiyad,
Thank you for the help, it works!
I’m sorry but I checked only the WEB-INF directory under the workspace
and not the deployment directory.Is it possible to automatically create a .jar file from the first Java project
and deploy it into the WEB-INF/lib directory of the web project?Thank you!
JurgisJanuary 26, 2006 at 11:00 am #245422
Riyad KallaMemberIs it possible to automatically create a .jar file from the first Java project
and deploy it into the WEB-INF/lib directory of the web project?Yes, if you go back to your deployment settings and select the first option: “Jar dependent Java project output and place in ‘lib’ directory”
January 26, 2006 at 11:44 am #245430
Jurgis JurkstaMemberThanks a lot for the quick and professional support!
January 26, 2006 at 11:57 am #245436
Riyad KallaMemberNo problem, that’s what we do 😉
-
AuthorPosts