bean的实例化失败:嵌套异常是java.lang.VerifyError:StackMapTable错误:错误的偏移量

时间:2016-02-11 12:29:31

标签: java spring spring-integration java-7

当我在使用Java7的新服务器上运行我的应用程序时,我面临以下错误/警告。相同的代码在另一台服务器上运行,并且工作正常。

    WARN : 11/Feb/2016 10:54:47,685 [P=86614:O=0:CT] ctory.support.DefaultListableBeanFactory - [SYSTEM_ID=null] [MESSAGE_ID=null] Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: 
    Error creating bean with name 'transactionProxyFactoryBean' defined in class path resource [datasource-oracle-config.xml]: 
    Cannot resolve reference to bean 'databaseCounterPartyManager' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: 
    Error creating bean with name 'databaseCounterPartyManager' defined in class path resource [components-core.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: 
    StackMapTable error: bad offset
    Exception Details:
    Location:
com/xxx/counterparty/impl/DatabaseCounterPartyManagerImpl.getCounterParties()Ljava/util/List; @0: ldc_w
    Reason:
    Invalid stackmap specification.
    Current Frame:
bci: @72
flags: { }
locals: { 'com/xxx/counterparty/impl/DatabaseCounterPartyManagerImpl', 'java/util/List' }
stack: { 'java/lang/Exception' }
ytecode:
0000000: 1301 2013 011b 1301 1d13 011f 2a13 0122
0000010: b801 133a 0400 0000 b200 0112 03b6 0004
0000020: bb00 0559 b700 064c 2ab4 0007 1208 bb00
0000030: 0959 01b7 000a b600 0b4c b200 01bb 000c
0000040: 59b7 000d 120e b600 0f2b b900 1001 00b6
0000050: 0011 1212 b600 0fb6 0013 b600 04a7 0052

任何帮助将不胜感激。感谢。

1 个答案:

答案 0 :(得分:0)

我正在将我的应用程序从Java6迁移到Java7,我遇到了上述错误。我们在运行应用程序时添加了" -XX:-UseSplitVerifier" JVM参数,它就像魅力一样。

有关详细信息,请参阅此链接How safe is it to use -XX:-UseSplitVerifier?