[FSF Associate Member] View Annang Sowah's profile on LinkedIn

Thursday, 31 October 2013

JSF Primefaces Fileupload runtime dependency error

There are times when you create a Primefaces Java project on netbeans and upon first build you are greeted with an error whose stack trace indicates a missing runtime dependency. The error is, as snapped below, related to the Primefaces Fileupload widget component not having access to a class input on the classpath of your project.
The error is summarised as : Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency.

click on snapshot to enlarge 

The primefaces widget has been designed by PrimeTechnology to depend on the Apache Commons classes which can be obtained from the Apache Commons download page as an archive.

Extract and drop the commons-fileupload-1.3.jar file in your project library folder or along your project classpath and recompile project.

In netbeans IDE, just add the jar file to the library of your project as shown below.

Now rebuild your project and EUREKA.