Questions tagged [cglib]

CGLib (Code Generation Library) is a run time code generation library for the Java platform licensed under the Apache 2.0 license.

CGLib (Code Generation Library) is mainly used the generation of class proxies. This is achieved by creating subclasses at run time where method invocations are intercepted by user defined methods. Additionally, cglib offers different extension such as for example bean utilities. cglib is built on top of ASM.

Alternative code generation libraries for the JVM that are still under active development are:

401 questions
0
votes
1 answer

Spring BeanPostProcessor can not create proxy when beanPostProcessor is depend on target?

I am stuck in this problem for a while and can not sleep:C when I use beanPostProcessor to create proxy for a beanA(beanPostProcessor not depend on beanA), proxy works well.But if beanPostProcessor depend on beanA,it not work.And I found beanA is…
fendar
  • 21
  • 8
0
votes
0 answers

Spring - Combination of JDK interfaces and CGLIB proxies

We recently migrated from a pretty old Spring version (3.2.16.RELEASE) to one of the latest (4.2.5.RELEASE). Because of this change we were able to remove in some .xml files more than 1k lines of code and replace them with just about 50-100…
Kevin Cruijssen
  • 9,153
  • 9
  • 61
  • 135
0
votes
1 answer

AbstractEndpointExceptionResolver, cglib proxy, empty fields

I have WebService. I have written my own exception resolver, by extending SoapFaultMappingExceptionResolver. Whenever I'm trying to throw exceptions, I'm getting NPE: java.lang.NullPointerException at …
Aleksei
  • 11
  • 2
0
votes
1 answer

Is there a way we can put the decorator /interceptor on all the objects that are being declared as field of a class?

I have a class Teacher which have two variables one is a collection of Student class and another is a Student class Object. I intercept the Teacher class as per my understanding all the objects under the Teacher class should have the interceptor…
0
votes
1 answer

spring bean created by cglib throw no such method exception

I have a few tens of class which looks like: @Repository("jobProcessingDao") @Transactional(readOnly = true) public class JobProcessingDaoImpl extends BaseDaoImpl implements JobProcessingDao { /*implementation interface methods*/ } exception…
Behemoth
  • 125
  • 1
  • 10
0
votes
1 answer

Spring changing application behavior : from Java proxies to CGLIB proxies

The application is on the basis of JHipster. This one integrate spring 4.2 (spring boot, spring security, spring mvc/rest, spring data jpa). I must turn the Jhipster "framework" application from java based proxies to CGLIB proxies. It is easy to…
François F.
  • 229
  • 2
  • 17
0
votes
1 answer

Do its have Spring AOP repackaged CGLIB version

I have spring bean with session scope and AOP CGLIB proxy.
sytolk
  • 7,223
  • 3
  • 25
  • 38
0
votes
0 answers

spring context is not being garbage-collected by vaadin application

Hi have a vaadin 7 / spring 3 application which leaks memory massively. The application is used by <500 users and needs about 30GB memory over the day. I collected multiple heap dumps and histogramms. I had some very strange observations. Since I…
Leon
  • 1,141
  • 1
  • 10
  • 25
0
votes
1 answer

create an enhancer on a proxy generated by another Enhancer or an CglibAopProxy

We have to build some Proxy via Cglib, sometimes the "superclass" of the proxy can be another proxy generated by Cglib or CglibAopProxy. But things become strange after we changing spring from 3.0.6 to 4.2.4. If we use proxy and aop together,…
Meilun Sheng
  • 129
  • 1
  • 1
  • 7
0
votes
2 answers

How to track the state of a POJO using code generation

We looking for a solution to track the state of a client POJO instance in a performant manner. What we expect is: every time a change is made on a POJO this state is made by using setters. We created an OGNL-based watching / event-bus and when…
Elad Hirsch
  • 294
  • 1
  • 16
0
votes
1 answer

Spring Cloud Data Flow @EnableBinding annotation breaks constructor injection

I am trying to create a bean using constructor injection and annotate it with Spring Cloud @EnableBinding annotation. I am using Spring Boot 1.3.3 and Spring Cloud Brixton.M5. I receive the following exception during app…
Max Romanovsky
  • 2,824
  • 5
  • 30
  • 37
0
votes
1 answer

Error: java.lang.NoSuchMethodError: org/springframework/asm/ClassVisitor.(I)V

I have these two dependencies in my POM which are i think creating this issue but i have tried many different ways and updated versions but nothing worked for me. Can someone please help. POM.XML
user3548196
  • 355
  • 1
  • 9
  • 32
0
votes
0 answers

still invoked toString in invoke methode

I have problem with use of CGLib. I have defined a MethodInterceptor, but when I call method.getName() in the intercept method I get only the result from the toString() method ... Why? I don't understand that, because I never call the toString()…
bajky
  • 332
  • 6
  • 17
0
votes
2 answers

net.sf.cglib.beans.BulkBeanException using iBatis and Spring

A BulkBeanException is being thrown when iBatis is attempting to apply a result map, but is not consistent across deployments via the same jar (local is fine, server deployment is not). I figured out how to stop the problem (see my answer below),…
eebbesen
  • 5,070
  • 8
  • 48
  • 70
0
votes
1 answer

when add @Transactional cannot initialize dao bean

In a dao of a legacy project I add a new method, then I wrote a unit test to test the new method FooDAO dao = new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml"}).getBean("FooDAO"); @Test public void…
zhuguowei
  • 8,401
  • 16
  • 70
  • 106