You can set "java.awt.headless=true" in your configuration file (wherever the JVM properties are set in your installation of tomcat), but I usually just call System.setProperty() (iirc) in some static initializer or application server listener. Then you don't have to worry about virtual servers or getting somebody to change the JVM config.
Bear -----Original Message----- From: method8 [mailto:[email protected]] Sent: Monday, August 31, 2009 9:32 AM To: [email protected] Subject: Re: [iText-questions] java.lang.UnsatisfiedLinkError: running tomcat on java headless? Do you suggest I install this virtual X? If yes would I have to re-install java? Or can I just install the missing packages? Since I'm using Debian I suppose I'll have to use apt-get rather than yum, am I right? Thanks! Paulo Soares-3 wrote: > > Looks like the java.awt classes are not even installed. See > http://1t3xt.be/?X000414. > > Paulo > >> -----Original Message----- >> From: method8 [mailto:[email protected]] >> Sent: Monday, August 31, 2009 4:17 PM >> To: [email protected] >> Subject: [iText-questions] java.lang.UnsatisfiedLinkError: >> running tomcat on java headless? >> >> >> Dear all, >> >> I'm using the iText library to generate pdfs from a database >> on the fly. >> Whenever I use some of it's features that require simple things like >> java.awt.Color, I get an java.lang.UnsatisfiedLinkError as shown: >> >> java.lang.UnsatisfiedLinkError: >> /usr/lib/jvm/java-1.5.0-sun-1.5.0.18/jre/lib/amd64/libawt.so: >> libmlib_image.so: cannot open shared object file: No such >> file or directory >> at java.lang.ClassLoader$NativeLibrary.load(Native Method) >> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) >> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) >> at java.lang.Runtime.loadLibrary0(Runtime.java:822) >> at java.lang.System.loadLibrary(System.java:993) >> at >> sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.awt.Toolkit.loadLibraries(Toolkit.java:1509) >> at java.awt.Toolkit.<clinit>(Toolkit.java:1530) >> at java.awt.Color.<clinit>(Color.java:250) >> at tablereport.processRequest(tablereport.java:55) >> at tablereport.doGet(tablereport.java:130) >> at >> javax.servlet.http.HttpServlet.service(HttpServlet.java:689) >> at >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt >> er(ApplicationFilterChain.java:269) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli >> cationFilterChain.java:188) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW >> rapperValve.java:213) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardC >> ontextValve.java:172) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHost >> Valve.java:127) >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport >> Valve.java:117) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn >> gineValve.java:108) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap >> ter.java:174) >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Process >> or.java:874) >> at >> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHa >> ndler.processConnection(Http11BaseProtocol.java:665) >> at >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT >> cpEndpoint.java:528) >> at >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le >> aderFollowerWorkerThread.java:81) >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( >> ThreadPool.java:689) >> at java.lang.Thread.run(Thread.java:595) >> >> I tried using tomcat users fora, but it looks like it might be iText >> related. >> >> What I gathered so far: >> >> 1. It looks like running java headless could solve the >> problem, however it >> looks like it shouldn't even matter in this case. >> >> 2. I am seriously thinking it might be Debian and permissions related. >> >> 3. It might just be the linux box I'm running this servlet >> on, has no X, >> (it's a remote VPS) therefore java.awt functionalities might not work. >> >> Thanks for your help, >> >> William > > > Aviso Legal: > > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter > informação confidencial ou legalmente protegida. A incorrecta transmissão > desta mensagem não significa a perca de confidencialidade. Se esta > mensagem for recebida por engano, por favor envie-a de volta para o > remetente e apague-a do seu sistema de imediato. É proibido a qualquer > pessoa que não o destinatário de usar, revelar ou distribuir qualquer > parte desta mensagem. > > > > Disclaimer: > > This message is destined exclusively to the intended receiver. It may > contain confidential or legally protected information. The incorrect > transmission of this message does not mean the loss of its > confidentiality. If this message is received by mistake, please send it > back to the sender and delete it from your system immediately. It is > forbidden to any person who is not the intended receiver to use, > distribute or copy any part of this message. > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > -- View this message in context: http://www.nabble.com/java.lang.UnsatisfiedLinkError%3A-running-tomcat-on-java-headless--tp25225211p25225425.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
