• 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
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

InvocationTagretException and more....

 
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 installed jForum on two machines,

Test Server : Fedora Core 3 with Java 1.5 & Tomcat 5.5.9
Production Server : Fedora Core 2 with Java 1.4.2 & Tomcat 4.1

The forum works fine on the test server, but on the production server i have an exception in the registration page. I get an InvocationTagretException mostly, but i have also got a exception about unable to connect to the X11 server. The two exceptions i get are

1 (very rarely) : Can't connect to X11 window server using ':0.0' as the value of DISPLAY variable.
I
2 (Mostly) : java.lang.reflect.InvocationTargetException

The exeption stack trace is as follows.

01:17:27,189 ERROR [ExceptionWriter ] java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.jforum.Command.process(Command.java:106)
at net.jforum.JForum.service(JForum.java:298)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
.....
Caused by: com.octo.captcha.CaptchaException
at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:547)
at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:515)
at com.octo.captcha.engine.image.ListImageCaptchaEngine.getNextImageCaptcha(ListImageCaptchaEngine.java:559)
at net.jforum.entities.UserSession.createNewCaptcha(UserSession.java:347)
at net.jforum.view.forum.UserAction.insert(UserAction.java:142)
... 35 more
Caused by: java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.getFont(RandomFontGenerator.java:496)
at com.octo.captcha.component.image.fontgenerator.TwistedRandomFontGenerator.getFont(TwistedRandomFontGenerator.java:495)
at com.octo.captcha.component.image.fontgenerator.TwistedAndShearedRandomFontGenerator.getFont(TwistedAndShearedRandomFontGenerator.java:494)
at com.octo.captcha.component.image.wordtoimage.ComposedWordToImage.getFont(ComposedWordToImage.java:559)
at com.octo.captcha.component.image.wordtoimage.AbstractWordToImage.getAttributedString(AbstractWordToImage.java:528)
at com.octo.captcha.component.image.wordtoimage.AbstractWordToImage.getImage(AbstractWordToImage.java:512)
at com.octo.captcha.image.gimpy.GimpyFactory.getImageCaptcha(GimpyFactory.java:544)
... 39 more


Please advice what can i do to overcome this.

thanks in advance
Praveen
[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
Praveen

You have to set java.awt.headless=true.

https://coderanch.com/t/574500

Marc
[originally posted on jforum.net by marc]
 
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
Marc,

Thankyou very much. I will try that out. I solved the problem by starting xserver and then tomcat and then stopping xserver after tomcat started up. I will try the other option too.

warm regards
Praveen
[originally posted on jforum.net by pkg]
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic