• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Message attach problem

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm aware that this has appeared in a few forum posts already
(e.g. http://www.coderanch.com/t/575946 and http://www.jforum.net/posts/list/2209.page) but I am still having a problem.

I am running the latest version (2.1.6), compiled from the src, and I cannot upload large files.

One of the topics above, from about May 2006, says that the offending file is: net/jforum/ActionServeltRequest.java but the header on that says that it hasn't been changed since 2nd Feb 2006???

For the record, the complete error I am getting is:



Any ideas?

Thanks,

/A
[originally posted on jforum.net by Antlerz]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This bug was fixed already. There were a problem with the path of file storage.

You can get the CVS version if you want.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the same as the error below? I was attaching 2 small files, 143k. Is there a way to fix it (hack or something) without upgrading just yet? I'm on 2.1.5

10:29:42,637 ERROR [ExceptionWriter ] java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.jforum.Command.process(Command.java:115)
at net.jforum.JForum.service(JForum.java:191)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: java.lang.String
at net.jforum.view.forum.common.AttachmentCommon.preProcess(AttachmentCommon.java:134)
at net.jforum.view.forum.PostAction.insertSave(PostAction.java:1007)
... 25 more


[originally posted on jforum.net by conquest]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not the same problem..

As the code of version 2.1.5 is different of 2.1.7, I'm not sure if the exception you reported is still there.. Hope not.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using 2.1.6 from cvs. I checked out with the 2.1.6 tag.
[originally posted on jforum.net by conquest]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, only if the code



has returned a stirng object.. but I can't imagine how the string would be there.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the 2.1.6 and here is how I fixed the upload issue.

A) I am 2.1.6 downloaded from the site.

in the JForum directory you have deployed to your web app container create a folder called "tmp" (eg. c:/tomcat/webapps/JForum/tmp). Give it world read/write permissions (or appropriate ownership if your forum is on the web at large) and now all your files will properly be uploaded.

What appears to happen is the DiskFileItemFactory runs out of memory space (its about 100KB) and then it goes to write the file to disk (to save memory and prevent OOM exceptions). If the folder does not exist the file doesn't get written and somewhere in that process a NullPointerException is thrown.

At least this is the theory I am operating on as it fixed the upload issue.
[originally posted on jforum.net by ewise]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!