8

When spring creates a proxy, it uses cglib with default naming policy. Is there any way to change the naming policy? Generated class names clash with another framework I use.

4
  • How is that possible? You have other framework which is using CGLib to enhance the same classes? Sounds like very strange setup. Commented Nov 2, 2013 at 12:34
  • it's not strange. i do integration tests when spring creates proxy for my session scoped bean. and also i have unit tests where i check business functionality of the same object Commented Nov 2, 2013 at 12:56
  • And what kind of errors are you getting? Seems that CGLib should be able to handle that. cglib.cvs.sourceforge.net/viewvc/cglib/cglib/src/proxy/net/sf/… Commented Nov 2, 2013 at 13:21
  • 1
    it's described here: blog.piotrturski.net/2013/06/… Commented Nov 2, 2013 at 13:23

1 Answer 1

2

It seems cglib claims it can detect name clashes but for some reason it does not in this case.

Because of that problem (and your report?) the other framework you are using (catch-exception) patched their code to avoid it.

Sign up to request clarification or add additional context in comments.

1 Comment

It can detect name clashes as long as one cglib is used. Since Spring 3.2+ repackages cglib, there easily can be two cglibs, each taking care of its own name collisions.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.