Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Classpath dependancy validator warning(Classpath dependancy validator message & other warnings)
Classpath dependancy validator warning [message #538095] Fri, 04 June 2010 18:26 Go to next message
Phil Freihofner is currently offline Phil Freihofner
Messages: 32
Registered: May 2010
Member
I am curious what, if anything, to do with the following warning (from the "Markers" tab):

Classpath entry org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/Postgre SQL JDBC Driver will not be exported or published. Runtime ClassNotFoundExceptions may result.

Indeed, in the project in question, I get a ClassNotFound exception. Where can I learn about this? I don't see anything in the Connectivity properties that says anything about exporting or not.

In scrutinizing the various warning messages, I also have a warning during the startup of the Apache server:

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [long path list here]

And:

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Nearby' did not find a matching property.

What is the significance of these?

In part, this is a continuation of exploring a question I have in earlier. Hopefully the different emphasis of the question will prevent this from being perceived as a double post, and I promise to follow up in each context as appropriate.

Thanks!
Re: Classpath dependancy validator warning [message #538106 is a reply to message #538095] Sat, 05 June 2010 00:13 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3131
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 6/4/2010 4:26 PM, Phil Freihofner wrote:
> I am curious what, if anything, to do with the following warning (from
> the "Markers" tab):
>
> Classpath entry
> org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/Postgre SQL JDBC
> Driver will not be exported or published. Runtime
> ClassNotFoundExceptions may result.
>
> Indeed, in the project in question, I get a ClassNotFound exception.
> Where can I learn about this? I don't see anything in the Connectivity
> properties that says anything about exporting or not.
>
> In scrutinizing the various warning messages, I also have a warning
> during the startup of the Apache server:
> INFO: The APR based Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path: [long path list here]
>
> And:
>
> WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
> property 'source' to 'org.eclipse.jst.jee.server:Nearby' did not find a
> matching property.
>
> What is the significance of these?
>
> In part, this is a continuation of exploring a question I have in
> earlier. Hopefully the different emphasis of the question will prevent
> this from being perceived as a double post, and I promise to follow up
> in each context as appropriate.
>
> Thanks!



I believe what you're seeing is this.

In Java Build Path -> Libraries you have libraries, other than the JRE
System Library, that contribute to your project. If you plan on
deploying the application to a container like Tomcat, you need to decide
whether and which of the libraries to copy to the WAR for that purpose.
This is done by selecting them in Properties -> Java EE Module
Dependencies. Once you do this, I think your warnings will disappear.

Your container may already offer some of the libraries you otherwise
must add to your project. So, you might decline to fix this. However, if
you can't run when you deploy, then this is an indication that you
should include the JARs containing the missing symbols.

Hope this is a) accurate and b) that it helps.

Russ Bateman
Re: Classpath dependancy validator warning [message #538112 is a reply to message #538106] Sat, 05 June 2010 02:20 Go to previous messageGo to next message
Phil Freihofner is currently offline Phil Freihofner
Messages: 32
Registered: May 2010
Member
Thank you so much!

I was a bit thrown by the use of the term WAR, as the project was not built from a WAR, and I don't understand where this is located. But I was able to find a reference to the PostgreSQL Driver in "Properties -> Java EE Module
Dependencies" as you described, and it was unchecked.

Upon checking it, the Marker warning disappeared, and the program did find and connect to the database when I ran it.

This has been one of the hardest things I have ever tried to figure out, and I am very, very grateful to you for taking the time to answer my question.
Re: Classpath dependancy validator warning [message #538137 is a reply to message #538112] Sat, 05 June 2010 11:10 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3131
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 6/5/2010 12:20 AM, Phil Freihofner wrote:
> Thank you so much!
>
> I was a bit thrown by the use of the term WAR, as the project was not
> built from a WAR, and I don't understand where this is located. But I
> was able to find a reference to the PostgreSQL Driver in "Properties ->
> Java EE Module Dependencies" as you described, and it was unchecked.
> Upon checking it, the Marker warning disappeared, and the program did
> find and connect to the database when I ran it.
>
> This has been one of the hardest things I have ever tried to figure out,
> and I am very, very grateful to you for taking the time to answer my
> question.

You're certainly welcome Phil. Check out
http://www.javahotchocolate.com/ for stuff like this.

I write to prove to myself that I grok. And why not drop bread crumbs
for the next Hansel and Gretl that come along?

Russ
Re: Classpath dependancy validator warning [message #634491 is a reply to message #538137] Thu, 21 October 2010 19:27 Go to previous messageGo to next message
Phil Freihofner is currently offline Phil Freihofner
Messages: 32
Registered: May 2010
Member
Hi - I am now using a different setup and am getting this same error. Unfortunatly, the solution does not seem to be possible in this new context.

Error warning:
Classpath Dependency Validator Message
Classpath entry org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/MySQL JDBC Driver will not be exported or published. Runtime ClassNotFoundExceptions may result.

I am now using:
Eclipse Java EE IDE for Web Developers.
Version: Helios Release
Build id: 20100617-1415

I am using Tomcat 7.0.2.

The JDBC driver was added to the Build Path via AddLibrary>Connectivity Driver Definition. The same method of adding this driver code works for a different project that does NOT use Apache.

Previously, I was able to select the project's "Properties>Java EE Module Dependencies". With this new version of Eclipse, the "Java EE Module Dependencies" does not exist, and I am having trouble trying to determine what the equivalent might be.

Many thanks!

Phil Freihofner
Re: Classpath dependancy validator warning [message #634493 is a reply to message #634491] Thu, 21 October 2010 19:43 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3131
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2010.10.21 17:27, Phil Freihofner wrote:
> Hi - I am now using a different setup and am getting this same error.
> Unfortunatly, the solution does not seem to be possible in this new
> context.
>
> Error warning:
> Classpath Dependency Validator Message
> Classpath entry
> org.eclipse.datatools.connectivity.jdt.DRIVERLIBRARY/MySQL JDBC Driver
> will not be exported or published. Runtime ClassNotFoundExceptions may
> result.
>
> I am now using:
> Eclipse Java EE IDE for Web Developers.
> Version: Helios Release
> Build id: 20100617-1415
>
> I am using Tomcat 7.0.2.
>
> The JDBC driver was added to the Build Path via AddLibrary>Connectivity
> Driver Definition. The same method of adding this driver code works for
> a different project that does NOT use Apache.
>
> Previously, I was able to select the project's "Properties>Java EE
> Module Dependencies". With this new version of Eclipse, the "Java EE
> Module Dependencies" does not exist, and I am having trouble trying to
> determine what the equivalent might be.
>
> Many thanks!
>
> Phil Freihofner

You must ask this in the eclipse webtools forum if you want an answer.

This is exactly why I don't use Helios for web-application development.
I think they broke this aspect of WTP for Helios and only the super
gurus are able to work around it or explain how it's done instead of
using the old Java EE Module Dependencies configuration. I still don't
get how to do it, but Galileo works perfectly, so I haven't stressed
over it. For WTP stuff (and Android for now), I just stay with Galileo.
Otherwise, Helios works well.
Re: Classpath dependancy validator warning [message #634504 is a reply to message #634493] Thu, 21 October 2010 21:34 Go to previous messageGo to next message
Phil Freihofner is currently offline Phil Freihofner
Messages: 32
Registered: May 2010
Member
Hi -

Thanks Russell! I found a solution to the problem in this message: #550535, on the WebTools forum as you suggested.

Galileo's "Properties->EE Dependencies" has been replaced by Helios' "Properties->Deployment Assembly". On that form I did the following:

Add->Classpath Container->Connectivity Driver Definition, and selected my JDBC driver.

After doing this, the Web Application's JSP allowed me to connect to the database and gave me the results of a simple query.

For some reason, though, the Classpath Dependency Validator Warning is persisting. I've left a thread open on WebTools to see if anyone knows what to do about that, though it is of lesser concern than just getting the db connection to work.

Now, onto the next steps: (1) working at home outside of Eclipse (via WAR dropped in Tomcats "webfiles" dir), (2) on the remote site using the remote Tomcat and remote MySQL db.
Re: Classpath dependancy validator warning [message #870859 is a reply to message #634504] Wed, 09 May 2012 23:08 Go to previous message
Gail Hedani is currently offline Gail Hedani
Messages: 1
Registered: May 2012
Junior Member
I've been searching for a solution to this "warning" for a while now and thanks to this thread, I got the answer! Thanks and can you believe that I'm using RAD 8 with all the latest fixes and it still has the problem that Phil points out...that the warning and error doesn't go away but when I deploy it, it works fine!

Thanks to Phil for mentioning that. Otherwise, I'd be banging my head for nothing.

Previous Topic:Adding Task Tags to other Editors?
Next Topic:Tomcat IPath error in Eclipse
Goto Forum:
  


Current Time: Mon Jul 28 02:17:28 EDT 2014

Powered by FUDForum. Page generated in 0.02028 seconds