Note that there are some explanatory texts on larger screens.

plurals
  1. POCGLIB is required to process @Configuration classes
    primarykey
    data
    text
    <p>Am using Spring 3.1. War is not built using Maven. Its just a normal build. I have below jars in my class path.</p> <pre><code>antlr-runtime-3.0.1.jar commons-logging-1.1.1.jar org.apache.commons.logging.jar org.springframework.aop-3.1.0.M2.jar org.springframework.asm-3.1.0.M2.jar org.springframework.aspects-3.1.0.M2.jar org.springframework.beans-3.1.0.M2.jar org.springframework.context-3.1.0.M2.jar org.springframework.context.support-3.1.0.M2.jar org.springframework.core-3.1.0.M2.jar org.springframework.core-3.1.0.RELEASE.jar org.springframework.core.jar org.springframework.expression-3.1.0.M2.jar spring-beans-3.0.5.RELEASE.jar spring-context-3.0.5.RELEASE.jar </code></pre> <p>I have below code,</p> <pre><code>@Configuration public class AppConfig { @Bean(name="helloBean") public HelloWorld helloWorld() { return new HelloWorldImpl(); } } </code></pre> <p>When I run <code>main</code> method, am getting below exception</p> <pre><code>Exception in thread "main" java.lang.IllegalStateException: CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [appConfig] at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:297) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigurationClasses(ConfigurationClassPostProcessor.java:200) </code></pre> <p>To overcome this, if I add <code>cglib-2.1.jar</code>, am getting below exception..</p> <pre><code>java.lang.ClassNotFoundException: org.objectweb.asm.Type </code></pre> <p>To overcome this, if I add <code>asm3.1.jar</code>, am getting below exception.</p> <pre><code>java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter. </code></pre> <p>How can I overcome my initial exception - <code>CGLIB is required to process @Configuration classes ?</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload