I think it's not the missing library because the java.awt is a standard library. I try to copy the standard jar file to the axis2 library but the problem is still there. Could any help me with this? Thanks for your help anyway. Deepal
Deepal Jayasinghe wrote: > > Is that something to do with missing library file ? > If so please try to put th .jar file into > TOMCAT_HOME/webapps/axis2/WEB-INF/lib > > Thanks > Deepal > >> Hi all, >> Currently I try to modify the standard Axis2 Handlers to resize the image >> automatically. >> However, when I using the Graphics2D inside the Axis2 Handler, they >> cannot >> link the library or something like that. This is the stack trace from the >> Tomcat server: >> >> >> Exception in thread "Image Fetcher 0" java.lang.UnsatisfiedLinkError: no >> jpeg in java.library.path >> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) >> at java.lang.Runtime.loadLibrary0(Runtime.java:823) >> at java.lang.System.loadLibrary(System.java:1030) >> at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) >> at java.security.AccessController.doPrivileged(Native Method) >> at sun.awt.image.JPEGImageDecoder.<clinit>(JPEGImageDecoder.java:39) >> at >> sun.awt.image.InputStreamImageSource.getDecoder(InputStreamImageSource.java:214) >> at >> sun.awt.image.ByteArrayImageSource.getDecoder(ByteArrayImageSource.java:41) >> at >> sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240) >> at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) >> at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) >> java.lang.NullPointerException >> at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1173) >> at >> sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:146) >> at sun.awt.FontConfiguration.<init>(FontConfiguration.java:71) >> at sun.awt.windows.WFontConfiguration.<init>(WFontConfiguration.java:23) >> at >> sun.awt.Win32GraphicsEnvironment.createFontConfiguration(Win32GraphicsEnvironment.java:256) >> at >> sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:197) >> at java.security.AccessController.doPrivileged(Native Method) >> at >> sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:105) >> at >> sun.awt.Win32GraphicsEnvironment.<init>(Win32GraphicsEnvironment.java:70) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> at >> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >> at >> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> at java.lang.Class.newInstance0(Class.java:355) >> at java.lang.Class.newInstance(Class.java:308) >> at >> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) >> at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) >> at >> org.apache.axis2.handler.module.imageProcessor.ImageProcessorHandler.invoke(ImageProcessorHandler.java:93) >> at org.apache.axis2.engine.Phase.invoke(Phase.java:382) >> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) >> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) >> at >> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:48) >> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) >> at >> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328) >> at >> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) >> at >> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) >> at >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) >> at >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) >> at java.lang.Thread.run(Thread.java:619) >> >> >> And this is the code that I use to call the Axis2 services: >> >> log.info("1"); >> BufferedImage thumbImage = new BufferedImage(thumbWidth, >> thumbHeight, BufferedImage.TYPE_INT_RGB); >> log.info("2"); >> Graphics2D graphics2D = thumbImage.createGraphics(); >> log.info("3"); >> >> graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, >> RenderingHints.VALUE_INTERPOLATION_BILINEAR); >> The exception is raised after "2" (i.e. the handler cannot find the >> Graphics2D or fail to create the graphics2D.) >> Could any one help me with this. >> Thank you so much. >> Harry >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Using-Graphics2D-in-Axis2-Handler-tf4296934.html#a12232233 Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]