Classpath entry will not be exported or published

Classpath entry will not be exported or published. Runtime ClassNotFoundExceptions may result.

This is an error I get when I use Eclipse 3.3.2 with WTP 2.0.6.
I added a few libraries to my BuildPath.

I found somebody having the same issues:

I have an Eclipse project that I have converted over to be a dynamic web project.
Now I have 100s of warnings that were not there before (we have a "no warnings" policy).

The warning is of the form:

Classpath entry /XXX/xxx.jar will not be exported or published.
Runtime ClassNotFoundException may result.

I have googled for parts of that warning without finding any hits.
The problem seem to occur when I have a project that has a JAR file included in the project.

1. How can I get the included JAR files exported correctly
(without having to explode the JARs within their respective projects).


2. Is there any way to override these warnings and change them to "ignore"
as you can do with the Java or Javadoc compiler settings?
Does anyone have any suggestions?
Best wishes, Ivan


This has been the answer:

hi Ivan,

WTP 2.0 M6 includes a new feature that allows you to add "J2EE module"
dependencies to classpath entries (cp containers and libraries) so that the
resolved contributions from these entries will be included in
published/exported structure of the module (will be added to the root of the
EAR or the WEB-INF/lib directory of web modules, depending on the type of

Management of these dependencies can all be handled through the standard
"J2EE Module Dependencies" UI (there is also a programmatic API).

Part of this support is a validator that adds errors for various conditions
as well as the warning you have encountered. The motivation behind that
warning is that you may have a potential runtime problem if there is
something on the project classpath which is not included in the published
structure of the module and is not part of the standard WTP cp containers
that expose classes available on the server (these "standard" cp containers
are not selectable within the "J2EE Module Dependencies" UI and do not
trigger the warning).

The answer to #1 is to select these cp entries as J2EE module dependencies
(this will also cause the warning to disappear).

I have recently made the following change in this area:

-An extension point has been added (will be in the next I-build) that allows
adopters to register additional cp containers that should not be considered
as potential dependencies (associated cp container entries will therefore
not be available for selection in the J2EE Module Dependencies UI and the
warning will not be generated).



Yet adding my libs to J2EE module dependencies will result in an error:

org.apache.jasper.JasperException: java.lang.NullPointerException

root cause


Ignoring the warning works just fine, yet the ugly yellow exclamation mark gets on my nerves.
I am on it, maybe I'll find a solution.

By the way, there's more to that conversation, but this was more or less what made me decide to ignore the warnings.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

One Response to “Classpath entry will not be exported or published”

  1. Harry says:

    Ignore It in Eclipse for ever:
    Windows -> Preferences -> Validation -> deactivate "Classpath Dependencies Validator"
    (at least 🙂 )

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply