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 9068991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:18:58+00:00 2026-06-16T17:18:58+00:00

I am using Spring 3.2 with Java based configuration and have some problems with

  • 0

I am using Spring 3.2 with Java based configuration and have some problems with my unit tests (JUnit 4.8.1). So this is a test runner:

 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(classes={TestConfig.class})
 public class ManualTest
 {
     @Autowired
     ...

Howeever, I am receiving this error:

Caused by: java.lang.IllegalStateException: CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [testConfig]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:327)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:222)

As the Spring blog states, Spring 3.2 is inlining CGLIB 3. So why do I receive this error?

I am using Gradle 1.3 as build management tool and STS as IDE. When calling gradle eclipse gradle pulls in the dependencies twice: one time as plain jar and one time as library:

First as plain jar:
plain jar

and than as library:

library

In the plain jar section I had still Spring 3.1 configured, while in the library section there was Spring 3.2. So I removed the plain jars and everything was working.

This is my project build.gradle

configurations
{
    driver
}

dependencies
{
    driver 'com.oracle:ojdbc6:11.2.0'

    compile "org.springframework:spring-jdbc:$springVersion"

    testCompile 'com.oracle:ojdbc6:11.2.0'
    testCompile "org.springframework:spring-test:$springVersion"
    testCompile "commons-dbcp:commons-dbcp:$dbcpVersion"
    testCompile "junit:junit:$junitVersion"
    testCompile "org.slf4j:slf4j-log4j12:$slf4jVersion"
}

sourceSets 
{
    main
    {
        java
        {
            srcDirs 'src/main/java', "$buildDir/generated-sources/"
        }
    }
}

And the build.gradle from the master project

configure(allprojects)
{
    ext.dbcpVersion = '1.4'
    ext.springVersion  = '3.2.0.RELEASE'
    ext.junitVersion  = '4.8.1'
    ext.slf4jVersion = '1.7.2' 
}

subprojects
{
    // Artifact settings
    group = 'xxx'
    version = '1.0-SNAPSHOT'

    // Standard plugins
    apply plugin: 'java'
    apply plugin: 'eclipse'

    // Repositories
    repositories
    {
        mavenLocal()
        maven
        {
            url "http://repo.springsource.org/release"
        }
        mavenCentral()
    }

    // Standard dependencies
    dependencies
    {
    }
}
  • 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-16T17:18:59+00:00Added an answer on June 16, 2026 at 5:18 pm

    I deleted all Eclipse projects and settings and all Gradle temporary files. Then I tried to import the project in Eclipse (Import Gradle project..). This failed with an exception. Then I deleted the Gradle settings within the Eclipse project and after that the import worked.

    So I will not use gradle eclipse with version 1.3.

    Also the additional source set path did not make its way into the Eclipse project as source path.

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

Sidebar

Related Questions

I have been using the new feature of Spring 3.1.1 the java based configuration.
I am using Spring 3 ,java based configuration, with BootStrap. I have downloaded the
I'm using Spring's SchedulerFactoryBean to run some Quartz jobs within a Spring based java
I have a Java-based server side and a flex client side using Spring BlazeDS
If I want to declare a bean using Spring 3's Java-based configuration, I can
We have a Java Spring MVC based project using Eclipse (Juno - the latest
I am using java annotation based configuration for initializing ehcache based caching, with Spring
I had a Spring based java app that connected to PayPal using their Soap
I have a Java project connecting to an Ingres database and using the Spring
I have a client and server communicating via Spring remoting (using Java Serialization) over

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.