Date: Wed, 22 Dec 2004 17:54:54 +0100 From: Roberto Nunnari <roberto.nunnari@supsi.ch> To: Franco Bruno Borghesi <franco@akyasociados.com.ar> Cc: freebsd-java@freebsd.org Subject: Re: {Spam?} Re: BufferedImage.createGraphics() from a servlet Message-ID: <41C9A6DE.4040903@supsi.ch> In-Reply-To: <41C9A102.3050303@akyasociados.com.ar> References: <41C8CC00.7070106@supsi.ch> <41C8D2CC.4020307@supsi.ch> <41C9A102.3050303@akyasociados.com.ar>
next in thread | previous in thread | raw e-mail | index | archive | help
Ciao Franco. Thank you very much for your hints. I'll try probably this evening and will let you know if it works. Franco Bruno Borghesi wrote: > I had the same problem a few months ago. I remember I defined this > > export JAVA_OPTS="-Djava.awt.headless=true" > > on my tomcat startup script. I also remember that I had to instal > XFree86-libraries on my server, and recompile/reinstall jdk-14. > > This way you don't need to run X on the server, you just need the > libraries. > Hope this helps. > > > Roberto Nunnari wrote: > >> Sorry.. forgot to mention the errors.. >> the servlet stacktrace when running xdm from /etc/ttys is: >> >> 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 >> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041) >> at ch.nunnisoft.webcounter.Counter.processRequest(Counter.java:103) >> at ch.nunnisoft.webcounter.Counter.doGet(Counter.java:156) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) >> >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) >> >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) >> >> at >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) >> >> at >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) >> >> at >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) >> >> at >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) >> at >> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) >> >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) >> >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) >> >> at >> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) >> >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) >> >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) >> >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) >> >> at >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577) >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) >> >> at >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) >> >> at >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) >> >> at >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) >> >> at >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) >> >> at >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) >> at >> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) >> >> at >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) >> >> at >> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) >> >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) >> >> at java.lang.Thread.run(Thread.java:534) >> >> >> Roberto Nunnari wrote: >> >>> Hi all. >>> >>> I'm having trouble running a simple servlet that does the >>> following: >>> >>> BufferedImage image = new BufferedImage(100, 20, >>> BufferedImage.TYPE_3BYTE_BGR); >>> Graphics2D g = image.createGraphics(); >>> >>> This are the facts: >>> >>> -bash-2.05b# uname -a >>> FreeBSD jupiter.noonlights.net 5.2.1-RELEASE-p9 FreeBSD >>> 5.2.1-RELEASE-p9 #3: Sat Aug 14 06:30:22 CEST 2004 >>> root@jupiter.noonlights.net:/usr/obj/usr/src/sys/JUPITER i386 >>> >>> -bash-2.05b# XFree86 -version >>> XFree86 Version 4.3.0 >>> ... >>> >>> -bash-2.05b# java -version >>> java version "1.4.2-p6" >>> Java(TM) 2 Runtime Environment, Standard Edition (build >>> 1.4.2-p6-root_09_aug_2004_03_45) >>> Java HotSpot(TM) Client VM (build 1.4.2-p6-root_09_aug_2004_03_45, >>> mixed mode) >>> >>> -bash-2.05b# pkg_info |grep wrapper >>> javavmwrapper-1.4 Wrapper script for various Java Virtual Machines >>> wrapper-1.0_3 Wrapper for XFree86-4 server >>> >>> note that I don't have a monitor attached, but the server >>> is running.. >>> >>> -bash-2.05b$ startx -listen_tcp & >>> >>> -bash-2.05b$ xhost + >>> >>> .. if I enable xdm in /etc/ttys then I get connection refused >>> messages from the Xserver.. >>> >>> can any kind soul help me out? >>> >>> Thank you. >> >> >> >> -- Roberto Nunnari -software engineer- mailto:roberto.nunnari@supsi.ch Scuola Universitaria Professionale della Svizzera Italiana Dipartimento Tecnologie Innovative http://www.dti.supsi.ch SUPSI-DTI Via Cantonale tel: +41-91-6108561 6928 Manno """ fax: +41-91-6108570 Switzerland (o o) =======================oOO==(_)==OOo========================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41C9A6DE.4040903>