Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Problem with CGLIB2?
PostPosted: Mon Dec 01, 2003 11:12 am 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
Java1.4.2-b28
Hibernate2.1RC1

I switched from 2.1b6 to 2.1RC1 and an expectable error happens with this code :

List l = s.createCriteria(Utilisateur.class).add(Expression.eq("login",login)).add(Expression.eq("password",password)).list();



01-12-2003 16:12:05 ERROR com.opensymphony.webwork.dispatcher.ServletDispatcher:187 - Could not execute action
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:309)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:175)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:182)
at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at com.uniclick.hibernate.HibernateFilter.doFilter(HibernateFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.sf.cglib.proxy.EnhancerEmitter.setThreadCallbacks(EnhancerEmitter.java:194)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:345)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:326)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:195)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:305)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:221)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:380)
at org.logicalcobwebs.proxool.ProxyFactory.createProxyStatement(ProxyFactory.java:106)
at org.logicalcobwebs.proxool.ProxyConnection.intercept(ProxyConnection.java:81)
at java.sql.Connection$$EnhancerByCGLIB$$315afea7.prepareStatement(<generated>)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:233)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:699)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:180)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128)
at net.sf.hibernate.loader.Loader.list(Loader.java:918)
at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:109)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3435)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:177)
at com.uniclick.afbah.ui.LoginAction.login(LoginAction.java:41)
... 52 more
Caused by: java.lang.NoSuchMethodException: java.sql.Statement.execute(java.lang.String, [B)
at java.lang.Class.getDeclaredMethod(Class.java:1256)
at java.sql.PreparedStatement$$EnhancerByCGLIB$$3c240523.<clinit>(<generated>)
... 76 more


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 11:19 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7179
Location: Atlanta, USA
Did you try the FAQs tip ?
http://www.hibernate.org/74.html#A2

_________________
Emmanuel
Check Hibernate Search in Action out


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 11:37 am 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
Yes, I did ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 12:26 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
I do have some problems as well with RC1.
Proxool doesn't seem to like the new CGLIB2...

I'll post the stack trace once I get my system up and running again.
Any one with the same problem ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 1:28 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
I use also proxool, could it be the cause ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 1:34 pm 
Regular
Regular

Joined: Sat Oct 18, 2003 11:53 am
Posts: 55
We are also having a problem, here is the stack trace:

Code:
        at weblogic.servlet.internal.WebAppServletContext$FireContextListenerAction.run(WebAppServletContext.java:6357)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
        at weblogic.servlet.internal.WebAppServletContext.notifyCreated(WebAppServletContext.java:1648)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3115)
        at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5559)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:853)
        at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2012)
        at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2053)
        at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2558)
        at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2483)
        at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2308)
        at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2390)
        at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2302)
        at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2455)
        at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:829)
        at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:538)
        at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:496)
        at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.visitMethod(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Lorg/objectw
eb/asm/CodeVisitor;
        at net.sf.cglib.ASMBackend.begin_constructor(ASMBackend.java:297)
        at net.sf.cglib.CodeGenerator.begin_constructor(CodeGenerator.java:281)
        at net.sf.cglib.CodeGenerator.begin_constructor(CodeGenerator.java:274)
        at net.sf.cglib.CodeGenerator.generateNullConstructor(CodeGenerator.java:970)
        at net.sf.cglib.KeyFactoryGenerator.generate(KeyFactoryGenerator.java:105)
        at net.sf.cglib.CodeGenerator.define(CodeGenerator.java:163)
        at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)
        at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:229)
        at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:718)
        at com.notiva.util.context.HibernateContext.<clinit>(HibernateContext.java:99)


I have verified that all the manifests are OK, and the CGLIB2.jar and cglib-asm.jar's are in the ear... Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 1:36 pm 
Regular
Regular

Joined: Sat Oct 18, 2003 11:53 am
Posts: 55
BTW: We are not using Proxool, but we are using swarmcache


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 1:57 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
Humm... I come back to beta6.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 2:25 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Looks like it is a bug in cglib. I will test it, It is SUN's JDK 1.4.x is not it ?

Caused by: java.lang.NoSuchMethodException: java.sql.Statement.execute(java.lang.String, [B)
at java.lang.Class.getDeclaredMethod(Class.java:1256)
at java.sql.PreparedStatement$$EnhancerByCGLIB$$3c240523.<clinit>(<generated>)



This can be a problem in JVM, try to rebuild both ASM and CGLIB with JRocket friendly compiler.

java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.visitMethod(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Lorg/objectw
eb/asm/CodeVisitor;


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 2:25 pm 
Beginner
Beginner

Joined: Fri Aug 29, 2003 10:01 am
Posts: 34
Location: florence, italy
I too found that Proxool doesn't seem to like the new CGLIB2. I also tried the proxool-0.8.2 version with no better results.

With another connection pooling, say dbcp, rc1 works fine.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 2:28 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
BTW Are you sure, you do not have two GLIB versions in classpath ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 4:43 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
baliukas wrote:
BTW Are you sure, you do not have two GLIB versions in classpath ?


Nope - only cglib2.jar in the classpath...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 7:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
I too found that Proxool doesn't seem to like the new CGLIB2. I also tried the proxool-0.8.2 version with no better results.


You must use the special build of proxool that ships with Hibernate 2.1!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2003 2:42 am 
Beginner
Beginner

Joined: Fri Aug 29, 2003 3:39 pm
Posts: 33
Location: San Francisco, CA
matt_dowell wrote:
We are also having a problem, here is the stack trace:

Code:
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.visitMethod(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Lorg/objectw
eb/asm/CodeVisitor;
        at net.sf.cglib.ASMBackend.begin_constructor(ASMBackend.java:297)
        at net.sf.cglib.CodeGenerator.begin_constructor(CodeGenerator.java:281)


I have verified that all the manifests are OK, and the CGLIB2.jar and cglib-asm.jar's are in the ear... Any ideas?


That stack trace is from an old version of CGLIB--please remove cglib-asm.jar, you only need cglib2.jar!

Chris


Top
 Profile  
 
 Post subject: Re: Problem with CGLIB2?
PostPosted: Tue Dec 02, 2003 3:39 am 
Beginner
Beginner

Joined: Fri Aug 29, 2003 3:39 pm
Posts: 33
Location: San Francisco, CA
dharma wrote:
Code:
Caused by: java.lang.NoSuchMethodException: java.sql.Statement.execute(java.lang.String, [B)
   at java.lang.Class.getDeclaredMethod(Class.java:1256)
   at java.sql.PreparedStatement$$EnhancerByCGLIB$$3c240523.<clinit>(<generated>)
   ... 76 more

I've confirmed this is a bug in CGLIB2, a fix will be in the next version distributed with Hibernate.

Chris


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.