0

I get an uncaught exception error while I try to fetch the data from db2 using type 4 driver within the servlet.I used db2jcc.jar and its license file it works first time but after some time it shows following exception

Uncaught exception thrown in one of the service methods of the servlet: Check. Exception thrown : java.lang.VerifyError: class loading constraint violated (class: com/ibm/db2/jcc/am/jb method: a(Ljava/lang/String;Lcom/ibm/db2/jcc/SQLJSection;Lcom/ibm/db2/jcc/am/hb;Lcom/ibm/db2/jcc/am/hb;)Lcom/ibm/db2/jcc/am/um;) at pc: 0

Please help me to resolve this problem. thanks

Maerlyn
  • 33,687
  • 18
  • 94
  • 85
  • Could be broken jar file, or wrong license or could be that that class already loaded from some other place check this link http://stackoverflow.com/questions/2861807/was-6-1-java-lang-verifyerror-class-loading-constraint-violated – Sergey Benner Feb 13 '12 at 16:18
  • Show us the code that's causing the problem. – Peter Svensson Feb 13 '12 at 17:19

1 Answers1

1

java.lang.VerifyError: occurs when your classloader finds two copies of same class. I suspect two jars are visible for your classloader. Make sure only required jars are there.

kosa
  • 65,990
  • 13
  • 130
  • 167
  • please tell me the procedure to remove copy of jars..?? –  Feb 13 '12 at 16:27
  • Check your lib and classpath locations that same jar exists twice (or) multiple versions of same jar. – kosa Feb 13 '12 at 17:19