• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

"Error while setting your avatar"

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Error while setting your avatar. It may be related to the absence of graphical libraries in the server. Please contact the site admnistrator.

Where do I configure this? No use contacting the site administrator since that's me ;)

Saw a couple of posts about headless display(whatever that is) so I tried with that, but it didn't help.
I am so very close to getting it to work now so please help

-Christer
[originally posted on jforum.net by cnordvik]
 
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
Are you using Linux?

If you do: if you have X installed, then you shoulnd't get this error. If you don't have X installed, then the -Djava.awt-headless=true should work.. if you tryied headles, how did you configured it?
Also, did you give write permission to the "images" dir?

If you are not using Linux: then that's bizarre. Check if the 'images" dir has write permission for everyone.

I'll update the code to display in the logs the exception occurred.

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
If compiling the code is not a problem for you, open src/net/jforum/view/forum/ViewCommon.java, and search for



this is at line ~152. In the catch block, put a call to e.printStackTrace(). The code will look like



Recompile the code and try to upload an avatar, then, after the error is shown, see tomcat logs.

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
Running WinXP. Now I have tried it on 2 different machines(same DB though... MySQL 3.23). And I have the same problem.

I have set the write permissions correctly on the images folder.

I think I got a little further by creating the "tmp" directory. Now I can see the images being uploaded in the tmp folder but I still get the same error message. If I rename the tmp file to ".jpg" then the image is fine.

Tried outputting the exception to the log file(stderr and stdout) like you suggested but I couldn't see anything. Thought that was strange since the exception is only thrown a single place as far as I could see.

Well the forum is at http://www.privatboligsalg.no:8091/JForum2/forums/list.page if you want to see for yourself...

-Christer, tired of debugging
[originally posted on jforum.net by cnordvik]
 
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


Now it works... magic I say. Well, what can I say. Hope it stays this way

Thanks for your help!

-Christer
[originally posted on jforum.net by cnordvik]
 
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
I had the same issue with avatars on WinXP. You need to create the directory 'avatar' within the images directory. For some reason on manual install it wasn't created. Hope that helps others!
[originally posted on jforum.net by Didas]
 
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
Which JForum's version? I get the .zip file from sf.net and the directory "images/avatar" is there.

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
When I installed JForum 2.1, I had this identical error. I inserted the "e.printStrackTrace();" and was able to view the error in the log file. Which basically said the 'images/avatar' file did not exist. I simply created the 'avatar' directory and all was good.
[originally posted on jforum.net by Didas]
 
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
Maybe on installation I messed something up?? I'm still having issues with the email notification... "Caused by: java.lang.NoSuchMethodError: javax.mail.Session.getDefaultInstance(Ljava/util/Properties; )Ljavax/mail/Session;"

Driving myself nuts with this one...
[originally posted on jforum.net by Didas]
 
Friends help you move. Good friends help you move bodies. This tiny ad will help:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic