[
https://issues.jboss.org/browse/JASSIST-207?page=com.atlassian.jira.plugi...
]
Aftab Khan commented on JASSIST-207:
------------------------------------
Hi Shigeru,
I am facing the same issue in javassist-3.18.1-GA .
I have attached the class file for reference
The error message i am getting is:
Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 416 in
method
com.emeter.activitygwy.transport.AGDelegateImpl.processWorkResponseMessage$Impl(Lcom/emeter/activitygwy/xsd/activitygwy/gen/WorkResponseMessageDocument;)V
at offset 379
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getDeclaredConstructors(Class.java:1853)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:229)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:962)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:935)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
... 25 more
Please help regarding the same.
Regards,
Aftab
Inconsistent Stack Map when inserting throw Expression with Java 7
------------------------------------------------------------------
Key: JASSIST-207
URL:
https://issues.jboss.org/browse/JASSIST-207
Project: Javassist
Issue Type: Bug
Affects Versions: 3.18.0-GA
Reporter: Ben Romberg
Assignee: Shigeru Chiba
Priority: Critical
Fix For: 3.18.1-GA, 3.19.0-GA
Attachments: afterInsertThrowExpression.txt, AGDelegateImpl.class,
beforeInsertThrowExpression.txt, conditionalThrowExceptionInserted.txt
I wrote a unit-test for javassist, reproducing the issue:
{code}
public class ThrowExpressionCorruptsStackMapTableTest extends JvstTestRoot {
public ThrowExpressionCorruptsStackMapTableTest(String name) {
super(name);
}
public void testInsertLocalVars() throws Exception {
CtClass cc = sloader.get("test4.LocalVars");
CtMethod m1 = cc.getDeclaredMethod("run");
m1.insertBefore("throw new AssertionError((Object) \"assertion
error\");");
cc.writeFile();
Object obj = make(cc.getName());
assertEquals(10, invoke(obj, "run"));
}
}
{code}
Throws:
java.lang.VerifyError: Expecting a stack map frame in method test4.LocalVars.run()I at
offset 45
My use-case is almost the same, inserting a "throw AssertionError(...)"
expression with insertBefore. However, I get a slightly different error message:
Stack map does not match the one at exception handler 37 in method
timeofday.TimeOfDay.getSecond()I at offset 27
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira