Resolving @ContextConfiguration(classes={AppConfig.class}) error (Spring JavaConfig)

@ContextConfiguration(classes={AppConfig.class})

has given a lot of cryptic error messages

in the end solution was very simple to upgrade the Spring to the latest version; in my case it was: 3.0.7.RELEASE -> 3.2.3.RELEASE

Some people suggested to include the following; but it works fine for me without these dependencies.

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>3.0</version>
        </dependency>

        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm-commons</artifactId>
            <version>3.3.1</version>
        </dependency>

 

 

Here are some of the error messages:

Cannot resolve method ‘classes’

There is the following compilation error:
error: cannot find symbol @interface ContextConfiguration

 

search crumbs keywords:

Searched for spring maven 11:48am
 
  Maven Repository: spring – mvnrepository.com – Viewed 2 times 11:48am
 
Searched for asm maven 11:43am
 
  Maven Repository: asm » asm-commons – mvnrepository.com 11:43am
 
Searched for spring java.lang.IllegalStateException: Cannot load configuration class 11:41am
 
  Spring 3.1 Java based configuration –… – stackoverflow.com 11:42am
 
  Spring 3 JavaConfig example – Mkyong.com – mkyong.com – Viewed 3 times 11:42am
 
Searched for maven cglib 11:00am
 
  Maven Repository: cglib » cglib – mvnrepository.com
Searched for Can not load an ApplicationContext with a NULL ‘contextLoader’. Consider annotating your test class with @ContextConfiguration 10:37am
 
  JUnit custom runner with Spring application… – stackoverflow.com 10:37am
 
  Testing with Spring and Maven: applicationCon… – stackoverflow.com 10:37am
 
Searched for spring 3 AnnotationConfigApplicationContext 10:10am
 
  AnnotationConfigApplicationContext – springsource.org 10:10am
 
  Spring 3 JavaConfig example – Mkyong.com – mkyong.com – Viewed 3 times 10:12am
 
Searched for spring 3 ApplicationContext 10:09am
 
  ApplicationContext – Spring Web Services… – springsource.org 10:09am
 
Searched for spring ApplicationContext 10:09am
 
  Spring ApplicationContext – Java Tutorial Blog – javapapers.com
Searched for cannot resolve symbol ApplicationContext 10:07am
 
  spring – Intellij ApplicationContext… – stackoverflow.com 10:07am
 
  xml – How to create TestContext for Spring… – stackoverflow.com – Viewed 2 times 10:08am
 
  Spring 2.5: Eclipse reports “JUnit4ClassRunne… – springsource.org 10:08am
 
  5. The IoC container – Spring Web Services… – springsource.org 10:09am
 
Searched for spring use ContextConfiguration class 10:04am
 
Searched for ContextConfiguration 10:04am
 
  java – Spring @ContextConfiguration how… – stackoverflow.com 10:04am
 
Searched for IDEA-96954 9:36am
 
  IntelliJ IDEA 12.1 129.17 Release Notes… – jetbrains.com 9:36am
 
Searched for cannot find symbol @interface ContextConfiguration 9:35am
 
  AWS Developer Forums: AWS Flow Framework… – amazon.com 9:34am
 
  ContextConfiguration (Spring Framework API 2.5) – springsource.org 9:35am
 
  xml – How to create TestContext for Spring… – stackoverflow.com – Viewed 2 times 9:35am
 
  Buildfile: c:\EspacePro\aws-java-sdk-1.3.9\sa… – amazon.com 9:35am
 
  IntelliJ IDEA 12.1.4 Build 129.713 /… – softpedia.com 9:35am
 
Searched for spring jboss 9:23am
 
  java ee – Spring vs Jboss – Stack Overflow – stackoverflow.com 9:23am
 
Searched for cannot resolve method classes ContextConfiguration 9:13am
 
  Spring jUnit Testing – either can not… – stackoverflow.com 9:14am
 
  java – Failed to load ApplicationContext… – stackoverflow.com
Searched for ContextConfiguration appconfig 9:12am
 
Searched for spring @ContextConfiguration classes appconfig 9:02am
 
  Configuration – Spring Web Services – Parent – springsource.org 9:02am
 
Searched for spring @ContextConfiguration classes 9:01am
 
  Spring 3.1 M2: Testing with @Configuration… – springsource.org 9:02am
 
  java – Spring test – @ContextConfiguration… – stackoverflow.com 9:02am
 
Searched for FlowSpringJUnit4ClassRunner 8:54am
 
  FlowSpringJUnit4ClassRunner (AWS SDK… – amazon.com 8:54am
 
Searched for aws WorkflowScope 8:30am
 
  AWS Developer Forums: Safely using singleton-… – amazon.com 8:30am
 
  IntelliJ: AWS Flow Framework (SWF) |… – activeintelligence.org – Viewed 2 times
Searched for spring 3 javaconfig @bean 10:47am
 
  Apache Camel: Spring Java Config Example – apache.org 10:47am
 
  Configuration Enhancements in Spring 3.1 – github.io 10:47am
 
  Spring 3.1 Java Configuration of a Spring… – blogspot.com 10:47am
 
  Configure beans in spring 3.x using @Configur… – howtodoinjava.com 10:47am
 
Searched for spring javaconfig @bean 10:46am
 
  Apache Camel: Spring Java Config – apache.org 10:46am
 
Searched for spring javaconfig bean 10:45am
 
Searched for spring javaconfig 10:45am
 
Searched for spring-javaconfig/docs/ 9:26am
 
  Spring Java Configuration | SpringSource.org – springsource.org – Viewed 2 times 9:26am
 
Searched for java spring bean annotation 9:23am
 
  Chapter 4. Creating and using bean definitions – springsource.org 9:23am
 
  java – Spring, working with @Configuration… – stackoverflow.com 9:23am
 
  Spring Java Based Configuration – Tutorials… – tutorialspoint.com – Viewed 2 times 9:23am
 
Searched for spring bean java autowire 9:20am
 
  Spring Auto-Wiring Beans with @Autowired… – mkyong.com – Viewed 2 times 9:20am
 
  Spring @Autowired Annotation – Tutorials Point – tutorialspoint.com 9:20am
 
  java – How does autowiring work in spring?… – stackoverflow.com 9:20am
 
  Spring beans autowiring concepts | How… – howtodoinjava.com

 

About Neil Rubens

see http://ActiveIntelligence.org
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*