Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Project with dependencies fails when deployed in Tomcat

Hello all.

I posted this on the eclipse jdt newsgroup but got no response, so I thought
I'd try here. Sorry for the cross-post.

I am trying to deploy a project (call is A) to Tomcat which has a dependency
on (ie. needs classes from) another project (call it B).

I've tried all of the following in Java Build Path:

1. In the Projects tab, add project B.
2. In the Libraries tab add B's class folder.
3. In the Order and Export tab, export B's class folder.

.... and none of it works. When I run app A, whenever a class is needed from
app B it fails with a java.lang.NoSuchMethodError.

What I need is for Eclipse to somehow automatically copy B's classes into my
deployed A app. I thought Export did that but the fact that all of these
options are under Java Build Path makes me think that it's for building the
app, not running it.

I am sure this is possible but I don't see a solution anywhere on the
newsgroups. Can someone give me a hand?

Many thanks,
Bob

ps. I also tried adding project B's source, in the Source tab of Java Build
Path, and this works but this seems like a rather ugly solution. It copies
the project B's class files into project A's class directory, which is ok,
but it also adds a virtual link from project A -> B, which is annoying
because 1) you see project B's source code as being under project A, and 2)
when you search for a Resource (Ctrl-Shift-R) from project B, it comes up as
also being in project A. In fact it's just a virtual link to project B's
source, and any change made in one will affect the other. But still, this is
annoying.
-- 
View this message in context: http://www.nabble.com/Project-with-dependencies-fails-when-deployed-in-Tomcat-tf3187470.html#a8846863
Sent from the Eclipse JDT - General mailing list archive at Nabble.com.



Back to the top