Comments (14)
Still fails with Hibernate 3.6:
01:14:28,564 ERROR [org.hibernate.proxy.pojo.BasicLazyInitializer] (ServerService Thread Pool -- 60) Javassist Enhancement failed: com.carveras.candidats.model.CandidatIntern: java.lang.VerifyError: Bad invokespecial instruction: interface method reference is in an indirect superinterface.
Exception Details:
Location:
com/carveras/candidats/model/CandidatIntern_$$_jvstcc7_2._d1delete()V @1: invokespecial
Reason:
Error exists in the bytecode
Bytecode:
0x0000000: 2ab7 0037 b1
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getField0(Class.java:2975)
at java.lang.Class.getField(Class.java:1701)
at javassist.util.proxy.ProxyFactory.setField(ProxyFactory.java:524)
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:509)
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:493)
at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:429)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:400)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:162)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:65)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:185)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:167)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:77)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:485)
at org.hibernate.persister.entity.UnionSubclassEntityPersister.<init>(UnionSubclassEntityPersister.java:87)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:90)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:286)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:863)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:782)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:618)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoaderListener$Proxy$_$$_WeldSubclass.configureAndRefreshWebApplicationContext(Unknown Source)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener$Proxy$_$$_WeldSubclass.initWebApplicationContext(Unknown Source)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.springframework.web.context.ContextLoaderListener$Proxy$_$$_WeldSubclass.contextInitialized$$super(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:49)
at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:77)
at org.jboss.weld.probe.InvocationMonitor$InterceptorAction.proceed(InvocationMonitor.java:180)
at org.jboss.weld.probe.InvocationMonitor$InterceptorAction.proceed(InvocationMonitor.java:176)
at org.jboss.weld.probe.InvocationMonitor$Action.perform(InvocationMonitor.java:155)
at org.jboss.weld.probe.InvocationMonitor.monitor(InvocationMonitor.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)
at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
at org.springframework.web.context.ContextLoaderListener$Proxy$_$$_WeldSubclass.contextInitialized(Unknown Source)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
from javassist.
Version 3.21.0-GA solved this problem in my application (hibernate 3.6)
from javassist.
@brianlenz Did you figure out any work-around?
from javassist.
The only workaround I'm aware of is to not use default methods on enhanced classes :/
from javassist.
Running into same issue using io.dropwizard:dropwizard-hibernate:0.9.2
, which uses Javassist. I did override the default method, which works, but is ugly. Is Javassist going to support default methods from interfaces?
from javassist.
Also ran into this problem when attempting bytecode enhancement with Hibernate.
Any chance this will get addressed soon?
from javassist.
So what did you all do as byte code enhancement on a default method?
Can anyone write a standalone (= without hibernate) test case?
from javassist.
Sorry, I'm only using this via hibernate.
from javassist.
I need to know how hibernate uses Javassist when it causes this bug...
Since I'm not a developer of hibernate, it's difficult for me to guess what's going from the stack
dump above.
from javassist.
I've fixed a bug related to an default interface method.
Can anyone download javassist.jar from master:HEAD and test it with hibernate?
from javassist.
How can I set the -noverify JVM command line option? Is it by eclipse? Any jboss file?
Where can I set this?
Thanks in advanced
from javassist.
-XX:+FailOverToOldVerifier
from javassist.
@beleta I've fixed another bug of ProxyFactory. Can you try?
You can build a new jar file by:
$ ant jar
from javassist.
Thank @pivolo very mush!@pivolo provid very correct and useful information!Thank you very mush!
from javassist.
Related Issues (20)
- org.springframework.transaction.annotation.Transactional
- "NEW followed by no DUP was found" check is probably not necessary
- Exception: java.lang.reflect.InaccessibleObjectException: Unable to make protected
- java.lang.ClassFormatError: Truncated class file HOT 1
- Add contributing and other community docs to javassist
- HotSwapper Cannot be used multiple times
- Triple Licensing HOT 3
- feature request: support for adding Annotations to dynamic Proxies
- How want insert Runnable HOT 1
- Complete example.md
- In Java21, the ConstPool API throws NPE for MethodParameters attributes without parameter names
- NPE of javassist.bytecode.stackmap.TypeData HOT 1
- Can I restore a line bytecode after transformed?
- Bad OSGi metadata in https://repo1.maven.org/maven2/org/javassist/javassist/3.30.0-GA HOT 9
- License condition HOT 4
- Replacing a method call to a private static function of an outer class from within an inner class leads to NoSuchMethodError
- javassist creates invalid class files for Java records when injecting static fields and adding static initializer code
- Request for posting of Maven signing key(s) HOT 2
- Asking about licenses issue HOT 1
- javassist constantly changing ldc2_w into ldc + i2l
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javassist.