Web project can't see .jar in dependent project [message #167219] |
Sun, 23 April 2006 08:24  |
Eclipse User |
|
|
|
Originally posted by: eclipse.spfweb.co.uk
Hi,
Using Eclipse 3.1.2 (on OS X 10.4.6), and Web Tools version 1.0.1.
The problem I have is my web project 'WEB' is dependent on another project,
'BACKEND' in the same workspace; 'BACKEND' uses
mysql-connector-java-3.1.12-bin.jar
I assume I'm doing the right thing in adding project 'BACKEND' to the build
path of project 'WEB' - obviously, so the thing compiles!
Then, I ticked project 'BACKEND' in the J2EE Module Dependencies.
However, when a particular sequence of code tries to load the JDBC driver I
get a ClassNotFoundException for com.mysql.jdbc.Driver.
I have things organised like this because project 'BACKEND' is also a
dependency to a couple of other projects - a command-line tool and a client
GUI application.
These two other front-end apps work fine, it's just this missing dependency
in 'WEB' to a .jar file that is causing me grief!
Where should I be looking to resolve this problem?
Thanks very much for any help.
--
Steve.
|
|
|
Re: Web project can't see .jar in dependent project [message #168511 is a reply to message #167219] |
Thu, 04 May 2006 09:50  |
Eclipse User |
|
|
|
Sadly enough: in bugzilla.... Publishing dependencies is a disaster in
WTP and has to this time never worked correctly. The current release
(1.5rc1a) is able to publish dependent project .class files into a .jar
on the deployment server but it does not deploy .jar files *within* the
project, even if they are marked exported. In addition adding the jar in
the J2EE dependencies page (which imo should NOT be needed) doesn't do
anything at all...
Your best bet is to copy (yecc) the .jar manually into the WEB-INF/lib
dir of your web project. Which sucks bigtime but at least it works for
*simple* projects.
Steve Folly wrote:
> Hi,
>
> Using Eclipse 3.1.2 (on OS X 10.4.6), and Web Tools version 1.0.1.
>
> The problem I have is my web project 'WEB' is dependent on another project,
> 'BACKEND' in the same workspace; 'BACKEND' uses
> mysql-connector-java-3.1.12-bin.jar
>
> I assume I'm doing the right thing in adding project 'BACKEND' to the build
> path of project 'WEB' - obviously, so the thing compiles!
>
> Then, I ticked project 'BACKEND' in the J2EE Module Dependencies.
>
> However, when a particular sequence of code tries to load the JDBC driver I
> get a ClassNotFoundException for com.mysql.jdbc.Driver.
>
> I have things organised like this because project 'BACKEND' is also a
> dependency to a couple of other projects - a command-line tool and a client
> GUI application.
>
> These two other front-end apps work fine, it's just this missing dependency
> in 'WEB' to a .jar file that is causing me grief!
>
> Where should I be looking to resolve this problem?
>
> Thanks very much for any help.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04087 seconds