Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Classpath Issues w/Tomcat
Classpath Issues w/Tomcat [message #70908] Tue, 01 February 2005 17:18 Go to next message
Eclipse UserFriend
Originally posted by: robwms63.yahoo.com

I have refactored a large project into two projects. If I try and start
tomcat in the project w/my JSPs, etc., it can't find the classes from
the other project. So I add that project to the Run definition for the
server, then I get a JDom error: JDomException: NoClassDefFoundError. In
reading around, it appears that this happens when some other XML lib
that is DOM 1.0 (not 2.0) compliant gets in front of xerces.jar in the
classpath. I tried just adding the /WEB-INF/classes dir from the core
project, but same error. I've wasted enough time on this that I could
have just ditched JDom and rewritten my XML routine using dom4j.

Any advice welcome.
Re: Classpath Issues w/Tomcat [message #70946 is a reply to message #70908] Tue, 01 February 2005 18:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: robwms63.yahoo.com

The problem I'm having is creating a bean in Spring. The bean's class is
from the included project (not the project I'm trying to start Tomcat
from, the one I added to the Run/Classpath). In this case, it throws
errors. If I move the classes to the /WEB-INF/classes dir, it runs. Is
that what I have to do? Make an ant task to copy changes up from the
dependent projects each time? That would really slow things down.


Rob Williams wrote:
> I have refactored a large project into two projects. If I try and start
> tomcat in the project w/my JSPs, etc., it can't find the classes from
> the other project. So I add that project to the Run definition for the
> server, then I get a JDom error: JDomException: NoClassDefFoundError. In
> reading around, it appears that this happens when some other XML lib
> that is DOM 1.0 (not 2.0) compliant gets in front of xerces.jar in the
> classpath. I tried just adding the /WEB-INF/classes dir from the core
> project, but same error. I've wasted enough time on this that I could
> have just ditched JDom and rewritten my XML routine using dom4j.
>
> Any advice welcome.
Re: Classpath Issues w/Tomcat - flexible project structure? [message #70985 is a reply to message #70946] Wed, 02 February 2005 06:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.shabalov.exadel.com

I have solution for such situation, I've used that projects structure for a
while. Actually I've proposed that structure to team that is working on project
structure, and they tell me that is suppose to be supported (eventually?).

The idea is to modify Tomcat deployment settings and use special class loader
for your application that is able to load classes directly from "bin" folders of
your projects. Solution is simple and work well, I can provide more details if
you still need it...

Best,
Igor Shabalov.


Rob Williams wrote:
> The problem I'm having is creating a bean in Spring. The bean's class is
> from the included project (not the project I'm trying to start Tomcat
> from, the one I added to the Run/Classpath). In this case, it throws
> errors. If I move the classes to the /WEB-INF/classes dir, it runs. Is
> that what I have to do? Make an ant task to copy changes up from the
> dependent projects each time? That would really slow things down.
>
>
> Rob Williams wrote:
>
>> I have refactored a large project into two projects. If I try and
>> start tomcat in the project w/my JSPs, etc., it can't find the classes
>> from the other project. So I add that project to the Run definition
>> for the server, then I get a JDom error: JDomException:
>> NoClassDefFoundError. In reading around, it appears that this happens
>> when some other XML lib that is DOM 1.0 (not 2.0) compliant gets in
>> front of xerces.jar in the classpath. I tried just adding the
>> /WEB-INF/classes dir from the core project, but same error. I've
>> wasted enough time on this that I could have just ditched JDom and
>> rewritten my XML routine using dom4j.
>>
>> Any advice welcome.
Re: Classpath Issues w/Tomcat - flexible project structure? [message #71021 is a reply to message #70985] Wed, 02 February 2005 09:24 Go to previous messageGo to next message
Karsten is currently offline KarstenFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,

I would like to hear more about the "bin" solution will make the
"build-guy" at our company very happy... less work for him... :P

Here is my actual solution:
Mine is only a temporary solution... not suitable for the "customer-build"

I also work with diffrent dependency projects... there is a simple
solution for running and debugging from eclipse... BUT it does not
"really" work it won't build you an "independant" deployable ear/war
file...at the "run configuration" of your server you can set the
classpath to contain your dependency projects... this makes them visible
to your application server / servlet container if you run/debug the
server from eclipse...
Re: Classpath Issues w/Tomcat [message #71539 is a reply to message #70946] Fri, 04 February 2005 11:27 Go to previous message
Eclipse UserFriend
Originally posted by: peter.weiss.r-it.at

We have the same Problem. Our Prroject Structure is very complex, we have
many Projects wich have dependencies. With the Sysdeo Plugin there is a
Classloader, which can handle Class Folders and Archives, but you have to
set them explizit on the Devloader Page.

It would be helpfull if there where a solution, where the Eclipse
Classpath for the Project and the Project References automatically would
be included to the Apllication Server Classpath.

Because of this Limitation, i have to go back to the Sysdeo Plugin,
because of to much work to Refactor our Projects or do the Builds manually.

Rob Williams wrote:

> The problem I'm having is creating a bean in Spring. The bean's class is
> from the included project (not the project I'm trying to start Tomcat
> from, the one I added to the Run/Classpath). In this case, it throws
> errors. If I move the classes to the /WEB-INF/classes dir, it runs. Is
> that what I have to do? Make an ant task to copy changes up from the
> dependent projects each time? That would really slow things down.


> Rob Williams wrote:
>> I have refactored a large project into two projects. If I try and start
>> tomcat in the project w/my JSPs, etc., it can't find the classes from
>> the other project. So I add that project to the Run definition for the
>> server, then I get a JDom error: JDomException: NoClassDefFoundError. In
>> reading around, it appears that this happens when some other XML lib
>> that is DOM 1.0 (not 2.0) compliant gets in front of xerces.jar in the
>> classpath. I tried just adding the /WEB-INF/classes dir from the core
>> project, but same error. I've wasted enough time on this that I could
>> have just ditched JDom and rewritten my XML routine using dom4j.
>>
>> Any advice welcome.
Previous Topic:Getting started
Next Topic:how to print xsd graph
Goto Forum:
  


Current Time: Fri Aug 16 16:01:25 GMT 2024

Powered by FUDForum. Page generated in 0.04574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top