exception - Causes of getting a java.lang.VerifyError -


i'm investigating following java.lang.verifyerror

java.lang.verifyerror: (class: be/post/ehr/wfm/application/serviceorganization/report/displayreportservlet, method: getmonthdata signature: (iiljava/util/collection;ljava/util/collection;ljava/util/hashmap;ljava/util/collection;ljava/util/locale;lorg/apache/struts/util/messagere˜̴mt̴mÚw€mçw€mp:”mŒŒ                 @ java.lang.class.getdeclaredconstructors0(native method)                 @ java.lang.class.privategetdeclaredconstructors(class.java:2357)                 @ java.lang.class.getconstructor0(class.java:2671) 

it occurs when jboss server in servlet deployed started. compiled jdk-1.5.0_11 , tried recompile jdk-1.5.0_15 without succes. compilation runs fine when deployed, java.lang.verifyerror occurs.

when changed method name , got following error:

java.lang.verifyerror: (class: be/post/ehr/wfm/application/serviceorganization/report/displayreportservlet, method: getmd signature: (iiljava/util/collection;lj    ava/util/collection;ljava/util/hashmap;ljava/util/collection;ljava/util/locale;lorg/apache/struts/util/messageresources ØÅn|ØÅnÚw€mçw€mx#Öm|xÔm             @ java.lang.class.getdeclaredconstructors0(native method)             @ java.lang.class.privategetdeclaredconstructors(class.java:2357             @ java.lang.class.getconstructor0(class.java:2671)             @ java.lang.class.newinstance0(class.java:321)             @ java.lang.class.newinstance(class.java:303) 

you can see more of method signature shown.

the actual method signature is

  private pgasepdftable getmonthdata(int month, int year, collection daytypes,                           collection calendardays,                           hashmap bcspecialdays,                           collection activityperiods,                           locale locale, messageresources resources) throws   exception { 

i tried looking @ javap , gives method signature should be.

when other colleagues check out code, compile , deploy it, have same problem. when build server picks code , deploys on development or testing environments (hpux), same error occurs. automated testing machine running ubuntu shows same error during server startup.

the rest of application runs okay, 1 servlet out of order. ideas helpful.

java.lang.verifyerror can result when have compiled against different library using @ runtime.

for example, happened me when trying run program compiled against xerces 1, xerces 2 found on classpath. required classes (in org.apache.* namespace) found @ runtime, classnotfoundexception not result. there had been changes classes , methods, method signatures found @ runtime did not match there @ compile-time.

normally, compiler flag problems method signatures not match. jvm verify bytecode again when class loaded, , throws verifyerror when bytecode trying should not allowed -- e.g. calling method returns string , stores return value in field holds list.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -