Hi,
When running the servlet that generates charts using JFreeChart 0.9.4 constantly getting exception that kills Java VM.
Does anybody have similar problem? At this point I have no idea whether it is VM related or the problem is in JFreeChart.
I'm running the servlet in Tomcat on Win2K workstation. Here is an error log that is generated by the VM when it dies...
------------------------
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : unknown exception code occurred at PC=0x77fb16cc
Function name=RtlTraceDatabaseEnumerate
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native Method)
at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:475)
at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:231)
at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:238)
at com.jrefinery.chart.ChartUtilities.writeBufferedImageAsJPEG(Unknown Source)
at com.jrefinery.chart.ChartUtilities.writeChartAsJPEG(Unknown Source)
at com.jrefinery.chart.ChartUtilities.writeChartAsJPEG(Unknown Source)
at com.citi.cititech.eae.apps.img.ImgServlet.writeChart(ImgServlet.java:337)
at com.citi.cititech.eae.apps.img.ImgServlet.doImage(ImgServlet.java:307)
at com.citi.cititech.eae.apps.img.ImgServlet.doPost(ImgServlet.java:179)
at com.citi.cititech.eae.apps.img.ImgServlet.doGet(ImgServlet.java:163)
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:260)
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:2396)
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:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
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:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)
Dynamic libraries:
0x00400000 - 0x00405000 C:\JBuilder7\jdk1.3.1\bin\java.exe
0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0C000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
0x6D420000 - 0x6D4EF000 C:\JBuilder7\jdk1.3.1\jre\bin\hotspot\jvm.dll
0x77E10000 - 0x77E74000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
0x77570000 - 0x775A0000 C:\WINNT\System32\WINMM.dll
0x6D220000 - 0x6D227000 C:\JBuilder7\jdk1.3.1\jre\bin\hpi.dll
0x6D3B0000 - 0x6D3BD000 C:\JBuilder7\jdk1.3.1\jre\bin\verify.dll
0x6D250000 - 0x6D266000 C:\JBuilder7\jdk1.3.1\jre\bin\java.dll
0x6D3C0000 - 0x6D3CD000 C:\JBuilder7\jdk1.3.1\jre\bin\zip.dll
0x6D340000 - 0x6D348000 C:\JBuilder7\jdk1.3.1\jre\bin\net.dll
0x75050000 - 0x75058000 C:\WINNT\System32\WSOCK32.dll
0x75030000 - 0x75043000 C:\WINNT\System32\WS2_32.DLL
0x75020000 - 0x75028000 C:\WINNT\System32\WS2HELP.DLL
0x785C0000 - 0x785CC000 C:\WINNT\System32\rnr20.dll
0x77980000 - 0x779A4000 C:\WINNT\System32\DNSAPI.DLL
0x77340000 - 0x77353000 C:\WINNT\System32\iphlpapi.dll
0x77520000 - 0x77525000 C:\WINNT\System32\ICMP.DLL
0x77320000 - 0x77337000 C:\WINNT\System32\MPRAPI.DLL
0x75150000 - 0x75160000 C:\WINNT\System32\SAMLIB.DLL
0x75170000 - 0x751BF000 C:\WINNT\System32\NETAPI32.DLL
0x77BE0000 - 0x77BEF000 C:\WINNT\System32\SECUR32.DLL
0x751C0000 - 0x751C6000 C:\WINNT\System32\NETRAP.DLL
0x77950000 - 0x7797A000 C:\WINNT\system32\WLDAP32.DLL
0x77A50000 - 0x77B46000 C:\WINNT\system32\OLE32.DLL
0x779B0000 - 0x77A4B000 C:\WINNT\system32\OLEAUT32.DLL
0x773B0000 - 0x773DE000 C:\WINNT\System32\ACTIVEDS.DLL
0x77380000 - 0x773A2000 C:\WINNT\System32\ADSLDPC.DLL
0x77830000 - 0x7783E000 C:\WINNT\System32\RTUTILS.DLL
0x77880000 - 0x7790D000 C:\WINNT\System32\SETUPAPI.DLL
0x77C10000 - 0x77C6E000 C:\WINNT\System32\USERENV.DLL
0x774E0000 - 0x77512000 C:\WINNT\System32\RASAPI32.DLL
0x774C0000 - 0x774D1000 C:\WINNT\System32\RASMAN.DLL
0x77530000 - 0x77552000 C:\WINNT\System32\TAPI32.DLL
0x71780000 - 0x7180A000 C:\WINNT\system32\COMCTL32.DLL
0x70BD0000 - 0x70C34000 C:\WINNT\system32\SHLWAPI.DLL
0x77360000 - 0x77379000 C:\WINNT\System32\DHCPCSVC.DLL
0x775A0000 - 0x77625000 C:\WINNT\System32\CLBCATQ.DLL
0x777E0000 - 0x777E8000 C:\WINNT\System32\winrnr.dll
0x777F0000 - 0x777F5000 C:\WINNT\System32\rasadhlp.dll
0x74FD0000 - 0x74FEF000 C:\WINNT\system32\msafd.dll
0x75010000 - 0x75017000 C:\WINNT\System32\wshtcpip.dll
0x6D020000 - 0x6D128000 C:\JBuilder7\jdk1.3.1\jre\bin\awt.dll
0x77800000 - 0x7781D000 C:\WINNT\System32\WINSPOOL.DRV
0x75E60000 - 0x75E7A000 C:\WINNT\System32\IMM32.dll
0x6D1E0000 - 0x6D21B000 C:\JBuilder7\jdk1.3.1\jre\bin\fontmanager.dll
0x69510000 - 0x695D7000 C:\WINNT\System32\OPENGL32.dll
0x6FAC0000 - 0x6FADF000 C:\WINNT\System32\GLU32.dll
0x72800000 - 0x72846000 C:\WINNT\System32\DDRAW.dll
0x728A0000 - 0x728A6000 C:\WINNT\System32\DCIMAN32.dll
0x12760000 - 0x12918000 C:\WINNT\System32\ialmgicd.dll
0x6D190000 - 0x6D1B2000 C:\JBuilder7\jdk1.3.1\jre\bin\dcpr.dll
0x6D2C0000 - 0x6D2DB000 C:\JBuilder7\jdk1.3.1\jre\bin\jpeg.dll
0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000 C:\WINNT\System32\PSAPI.DLL
Local Time = Thu Feb 13 10:38:45 2003
Elapsed Time = 92
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1-b24 mixed mode)
#
Codec problem?
Re: Codec problem?
Looks like the exception is happening outside of the VM in ntdll.dll which the underlying Sun class is using for the JPEG encoding. I would suggest installing the latest service pack on your operating system. I haven't had any problems with either NT 4.0 SP6 or Windows 2000 SP2 with JBuilder 7.0 and JFreeChart.
If that is not an option, or doesn't work, have you considered PNG encoding instead of JPEG. It is loss-less, produces compact files, is supported by all modern browsers and will not encounter the same problems as the JPEG codec. I tend to always use PNG rather than JPEG.
Regards,
Richard...
If that is not an option, or doesn't work, have you considered PNG encoding instead of JPEG. It is loss-less, produces compact files, is supported by all modern browsers and will not encounter the same problems as the JPEG codec. I tend to always use PNG rather than JPEG.
Regards,
Richard...