Labels

Monday, October 14, 2013

Runtime ClassNotFoundExceptions may result

Problem:

When using Eclipse Kepler to create Java EE projects, I was getting the following warnings:

Classpath entry <jar library here> will not be exported or published.  Runtime ClassNotFoundExceptions may result.

Solution:

The warning is telling me that the jar file (in my case it was a log4j library) will not be included in the archive that is deployed to application server.  This warning is just a reminder that unless you put the jar file in the classpath of the application server you will receive ClassNotFoundExceptions when trying to run the projects.  A very handy reminder but somewhat irritating since I don't like the little yellow triangle with exclamation point that appears on the project because of the warning.  The can be fixed by adding the jar file for the required library to the Deployment Assembley (Project Properties -> Deployment Assembly -> Add... -> Java Build Path Entries -> <jar library>).  The downside to this is that the jar will be included in the EAR or WAR that is generated thus making is much larger.

1 comment:

  1. Casino Finder (Redwoods) - Mapyro
    Find Casino 제천 출장마사지 Finder 양주 출장샵 (Redwoods) location in Redwoods, United States. 거제 출장안마 Nearby Trails: 성남 출장샵 574 Highway 315, Redwoods, United States, 경상북도 출장안마

    ReplyDelete