1

I am using Primefaces 5.2, jsf 2.2 and Tomcat 8 on a Linux server. This is the line in my xhtml:

<p:fileUpload fileUploadListener="#{uploadController.complete}" multiple="true"/>

The method in the class UploadController:

 public void complete(FileUploadEvent fileUploadEvent) {
     UploadedFile item = fileUploadEvent.getFile();
     // ... etc. nothing special, all standard reading
 }

If I start up my page in a jetty, everything works fine.

But if I start it up on the linux server with tomcat 8, i got

javax.el.ELException Property 'complete' not found on type

exception. I also tried to run my code on my Windows machine in a tomcat 8 (started up by Maven in a cargo container). No problem there.

One step further was to put a parameter for method UploadController.complete :

    <p:fileUpload fileUploadListener="#{uploadController.complete(fileUploadEvent)}" multiple="true"/>

...the only way a parameter was excepted (no f:param , f:attribute,... were accepted => same ELException). But then the event "fileUploadEvent" in UploadController is NULL.

How to solve the problem?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
jahuer1
  • 377
  • 4
  • 15
  • 1
    Sounds like a polluted runtime classpath (in other words, a pom with incorrectly scoped dependencies). Do you have any server-specific JAR files in webapp's `/WEB-INF/lib`, such as `el-api.jar`, etc? – BalusC Aug 25 '15 at 07:54
  • Problem could be missing jar in your jetty classpath. – vels4j Aug 25 '15 at 08:21
  • Initially no. As I read that this may help, as there might be an incomplete installation, I tried to add. But no effect. I saw that there is a el-api.jar in the tomcat /lib directory. And it seems to be quite up to date. – jahuer1 Aug 25 '15 at 08:25
  • Do not touch the server lib as long as you don't understand how this stuff works. Coming back to the problem, please list all JARs present in `/WEB-INF/lib` of the Maven-produced WAR file. – BalusC Aug 25 '15 at 08:49
  • There are 127 jar's... . Which to focus? – jahuer1 Aug 25 '15 at 10:45
  • There are 127 jar's... . Which to focus? But I made another approach: I made my own kubuntu server with my own installation of tomcat 8 and java 1.8. Astonishingly the code seems to run there! What is the difference? Original: - openjdk version "1.8.0_45-internal-b14" - Apache Tomcat Version 8.0.23 My new Server: - Oracle Java 1.8.0_60-b27 - Apache Tomcat Version 8.0.24 – jahuer1 Aug 25 '15 at 11:02

0 Answers0