Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:46:54+00:00 2026-06-03T19:46:54+00:00

My application uses Spring Framework 3.0.5 on JBoss 5.1.0.GA. The framework is provided by

  • 0

My application uses Spring Framework 3.0.5 on JBoss 5.1.0.GA. The framework is provided by the server, that is, framework libraries are placed in server/<servername>/lib directory. The server is managed by third party, so I can’t add any library to environment provided by this server. There is a necessity to use cglib in my application. Spring uses it for proxying purposes. cglib isn’t in server/<servername>/lib, therefore I’ve included cglib-2.2.2.jar to my app .war with maven.

The problem is that the following error occures on deploy:

Cannot proxy target class because CGLIB2 is not available. Add CGLIB
to the class path or specify proxy interfaces.

I’ve checked my app .war for cglib and found it in WEB-INF/lib directory. AFAIK all classes in jars located in this directory are in class path as well as classes in jars in server/<servername>/lib. Why Spring can’t find cglib?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:46:56+00:00Added an answer on June 3, 2026 at 7:46 pm

    For the purposes of this question, the JBoss classloader hierarchy can only look “down”, i.e. classes loaded by the system classloader cannot see classes in an application’s lib directory. So the Spring libraries in the server’s lib directory cannot see cglib in your app’s lib directory.

    Possible solutions, in order of preference:

    1. Get rid of the Spring JARs from the server’s lib directory. They shouldn’t be there, it’s just a bad idea. But you say you can’t do this.
    2. Add cglib to the server’s lib directory. Not an option for the same reason as above.
    3. Add duplicates of the Spring JARs to your app’s lib directory. Make sure they’re exactly the same as the server’s, or you risk weird class versioning conflicts. This should allow cglib to be resolved.

    Option 3 is far from ideal, since duplicating classes between classloaders is a recipe for classloader issues, but it may be your only option.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that uses the Spring Framework (3.1) and persistence through
I want to use Spring framework to create application that uses Oracle 11g to
I have an application built on the Spring Framework that uses an external properties
I wrote an application which uses spring framework. now i wanted to write a
I have a JSP struts application that uses Spring to integrate with the services/dao/database.
I've deployed an Apache Wicket web-application that uses Spring and Hibernate to my Tomcat
I've got a spring-application (Spring Roo uses Spring MVC) on a Tomcat-server. There are
I have a spring application that uses an embedded Jetty instance. Since I am
I'm developing a spring application that uses large MySQL tables. When loading large tables,
I have a java web application which uses spring webflow as framework. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.