javaのメモリリーク?を解決するには?
あるjavaプログラムを一ヶ月ほど動かしていたら以下のエラーが発生し
プログラムが終了してしまったのですけれど、どこのコードを修正して直せば
いいのか分かりません。
[Unloading class sun.reflect.GeneratedMethodAccessor26483]
[Unloading class sun.reflect.GeneratedMethodAccessor26496]
[Unloading class sun.reflect.GeneratedMethodAccessor26519]
[Unloading class sun.reflect.GeneratedMethodAccessor26503]
[Unloading class sun.reflect.GeneratedMethodAccessor26513]
[Unloading class sun.reflect.GeneratedMethodAccessor26514]
[Unloading class sun.reflect.GeneratedMethodAccessor26495]
[Unloading class sun.reflect.GeneratedMethodAccessor26516]
[Unloading class sun.reflect.GeneratedMethodAccessor26511]
[Unloading class sun.reflect.GeneratedMethodAccessor26492]
[Unloading class sun.reflect.GeneratedMethodAccessor26501]
[Unloading class sun.reflect.GeneratedMethodAccessor26491]
[Unloading class sun.reflect.GeneratedMethodAccessor26487]
[Unloading class sun.reflect.GeneratedMethodAccessor26512]
[Unloading class sun.reflect.GeneratedMethodAccessor26500]
[Unloading class sun.reflect.GeneratedMethodAccessor26508]
[Unloading class sun.reflect.GeneratedMethodAccessor26518]
[Unloading class sun.reflect.GeneratedMethodAccessor26488]
[Unloading class sun.reflect.GeneratedMethodAccessor26507]
[Unloading class sun.reflect.GeneratedMethodAccessor26520]
[Unloading class sun.reflect.GeneratedMethodAccessor26505]
[Unloading class sun.reflect.GeneratedMethodAccessor26510]
[Unloading class sun.reflect.GeneratedMethodAccessor26499]
[Unloading class sun.reflect.GeneratedMethodAccessor26485]
[Unloading class sun.reflect.GeneratedMethodAccessor26502]
[Unloading class sun.reflect.GeneratedMethodAccessor26484]
[Unloading class sun.reflect.GeneratedMethodAccessor26486]
[Unloading class sun.reflect.GeneratedMethodAccessor26515]
[Unloading class sun.reflect.GeneratedMethodAccessor26504]
[Unloading class sun.reflect.GeneratedMethodAccessor26489]
[Unloading class sun.reflect.GeneratedMethodAccessor26498]
[Unloading class sun.reflect.GeneratedMethodAccessor26509]
[Unloading class sun.reflect.GeneratedMethodAccessor26506]
[Unloading class sun.reflect.GeneratedMethodAccessor26493]
[Unloading class sun.reflect.GeneratedMethodAccessor26490]
[Unloading class sun.reflect.GeneratedMethodAccessor26517]
[Unloading class sun.reflect.GeneratedMethodAccessor26497]
[Unloading class sun.reflect.GeneratedMethodAccessor26494]
Exception in thread "main" java.lang.NullPointerException
1114115.292: [GC [PSYoungGen: 21360K->182K(21504K)] 72667K->51488K(74368K), 0.0018360 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
1114116.249: [GC [PSYoungGen: 21366K->316K(21376K)] 72672K->51682K(74240K), 0.0022510 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
1114117.695: [GC [PSYoungGen: 21372K->368K(20672K)] 72738K->57050K(77632K), 0.0185720 secs] [Times: user=0.02 sys=0.01, real=0.02 secs]
1114117.713: [Full GC [PSYoungGen: 368K->0K(20672K)] [PSOldGen: 56681K->52783K(60608K)] 57050K->52783K(81280K) [PSPermGen: 19491K->19491K(19840K)], 0.2197260 secs] [Times: user=0.21 sys=0.00, real=0.22 secs]
1114118.414: [GC [PSYoungGen: 20288K->448K(20928K)] 73071K->53231K(81536K), 0.0022310 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
Heap
PSYoungGen total 20928K, used 12741K [0xa9b40000, 0xab2d0000, 0xb45e0000)
eden space 19520K, 62% used [0xa9b40000,0xaa741508,0xaae50000)
from space 1408K, 31% used [0xab170000,0xab1e0000,0xab2d0000)
to space 2304K, 0% used [0xaae50000,0xaae50000,0xab090000)
PSOldGen total 60608K, used 52783K [0x945e0000, 0x98110000, 0xa9b40000)
object space 60608K, 87% used [0x945e0000,0x9796bc00,0x98110000)
PSPermGen total 19840K, used 19565K [0x8c5e0000, 0x8d940000, 0x945e0000)
object space 19840K, 98% used [0x8c5e0000,0x8d8fb768,0x8d940000)
お礼
なるほど。。。 わかりました! ありがとうございました。 >各種JavaVMでのGCの実装によって違うので はっきりとはいえません。 これってJavaの質問の際によくでてくるフレーズですね。 キーワードですね!