dev@glassfish.java.net

LinkageError caused by java.lang.VerifyError ... Bad type in putfield/putstatic ?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 22 May 2009 11:10:03 -0700

Team,

Does anybody know what can cause this type of a LinkageError:

Caused by: java.lang.VerifyError: (class:
org/glassfish/enterprise/iiop/impl/GlassFishORBManager, method: initORB
signature: (Ljava/util/Properties;)V) Bad type in putfield/putstatic
         at
org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.postConstruct(GlassFishORBFactoryImpl.java:29)
         at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:170)


I see this error if I remove org.omg.CORBA package (only it, not its
subpackages) from the glassfishv3/glassfish/osgi/felix/conf/config.properties
(because it's available in the glassfish-corba-omgapi module) and then try to
deploy an app with remote EJBs (i.e. force orb integration modules to be
loaded). The same error happens on server restart if I first deploy the app,
then modify the felix/conf/config.properties file.

Googling for this error brings cases when 2 versions of the same class was
present in 2 jars. But GlassFishORBManager is there in only one. Or a jdk 1.4
bug where you downcast the result to one of the interfaces (String to Clonable),
which a) had been fixed back then and b) doesn't seem to be the case here as
well :(.

It doesn't make a difference whether I start GF via 'java -jar' or asadmin.

Any ideas are greatly appreciated.

thank you,
-marina