• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

PDF upload exception

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am running JForum on two different Linux machines.
When a user tries to upload a PDF file in the "Attach Files" dialog and clicks "Submit" ( size within allowed limits ), I get the following exception.

But this happens only on one machine, the other works fine. The machine in which the upload works had the Extension and Extension Groups configured for pdf once. [ But this shouldnt matter as the Extension Group was removed later]

Can anyone suggest me what to do to make the upload work ? :idea:


<meta http-equiv="Content-Type" content="text/html; charset= Expression encoding is undefined on line 5, column 63 in default/forum_base.htm. <br /> The problematic instruction: ---------- ==> ${encoding} [on line 5, column 61 in default/forum_base.htm] in include "default/forum_base.htm" [on line 7, column 1 in exception.html]
---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression encoding is undefined on line 5, column 63 in default/forum_base.htm. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.Environment.include(Environment.java:1256) at freemarker.core.Include.accept(Include.java:156) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.Environment.process(Environment.java:156) at freemarker.template.Template.process(Template.java:219) at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:90) at net.jforum.JForum.service(JForum.java:503) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



watching you all
sunthin
[originally posted on jforum.net by SunThin]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

this error is not the real problem - application errors usually point to some java class. You can find it in your Tomcat logs.

Post it here, if possible.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rafael,

Here is the extract of the Exception from Tomcat Log. If possible, can you explain what is wrong with the upload? ( corrupt pdf file ???)

FYI: I have done some changes to JForum for customizing it.


13:49:08,500 INFO [PostAction ] insert()
13:53:30,623 ERROR [ExceptionWriter ] net.jforum.exceptions.MultipartHandlingException: Error while processing multipart content: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
at net.jforum.ActionServletRequest.<init>(ActionServletRequest.java:304)
at net.jforum.JForum.service(JForum.java:371)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



cheers
Sundar(sunthin)
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Another instance of the upload threw the following exception. I hope I have to look at the application folder permissions. But I welcome any suggestion from you on this problem.



06:54:39,393 INFO [PostAction ] insert()
06:55:04,483 ERROR [ExceptionWriter ] net.jforum.exceptions.MultipartHandlingException: Error while processing multipart content: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. ****myfilepath_hidden****/jforum/tmp/upload_00000038.tmp (No such file or directory)
at net.jforum.ActionServletRequest.<init>(ActionServletRequest.java:304)
at net.jforum.JForum.service(JForum.java:371)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



cheers
Sundar
[originally posted on jforum.net by SunThin]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look if the "tmp" directory exists and is writabble.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rafael,

Just now fixed the issue.
You are right. While deploying the application , I missed out two folders "upload" and "tmp".


But now its working after bundling with these two missing folders.


cheers and thanks
Sundar
[originally posted on jforum.net by Anonymous]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic