當我執行我的代碼時,出現以下錯誤。 後,我從JDK 1.6中的字節代碼它將使方面升級到1.8java.lang.LinkageError:接口初始化時加載器約束違規
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "javax.security.auth.kerberos.JavaxSecurityAuthKerberosAccessImpl.keyTabTakeSnapshot(Ljavax/security/auth/kerberos/KeyTab;)Lsun/security/krb5/internal/ktab/KeyTab;" the class loader (instance of org/powermock/core/classloader/MockClassLoader) of the current class, javax/security/auth/kerberos/JavaxSecurityAuthKerberosAccessImpl, and the class loader (instance of <bootloader>) for interface sun/security/krb5/JavaxSecurityAuthKerberosAccess have different Class objects for the type javax/security/auth/kerberos/KeyTab used in the signature
at javax.security.auth.kerberos.KeyTab.<clinit>(KeyTab.java:100)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.hadoop.security.UserGroupInformation.<clinit>(UserGroupInformation.java:609)
我正在使用powermock-api-mockito的最新版本1.6.2。 – Vijay
也許檢查他們的bugtracker呢? – the8472