Announcement Announcement Module
Collapse
No announcement yet.
IllegalArgumentException: class is not an enhanced class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • IllegalArgumentException: class is not an enhanced class

    I`m trying to test Spring 3.0RC1 with jsf 1.2.

    I`m testing Glassfish v3 with OSGI and Equinox.

    When i deploing my webapp, Spring tries to create scoped proxy
    of one of my session beans.

    Bean is detected by context scanning.
    It have
    Code:
    @Component
    @Scope("session")
    @Qualifier("UploadController")
    Class does`n have any final declarations, and it visible to classloader.

    this is part from applocationcontext.xml
    Code:
    <context:component-scan base-package="ndx.web" annotation-config="true" scoped-proxy="targetClass"/>
    <context:annotation-config  />
    This code is working ok with Spring DM server.

    Thank you for your help.

  • #2
    Servrer thorws this exception:
    Code:
    [#|2009-10-22T15:30:08.753+0400|SEVERE|glassfish|org.springframework.web.context.ContextLoader|_ThreadID=34;_ThreadName=Thread-2;|Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uploadController' defined in BeanDefinition defined in URL [bundleresource://277.fwk32550604/ndx/web/bill/payments/UploadController.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class ndx.web.bill.payments.UploadController]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: class ndx.web.bill.payments.UploadController$$EnhancerByCGLIB$$9cfb1ed is not an enhanced class                                                               
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)                                   
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)                                     
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:289)                                                                  
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)                                               
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)                                                                    
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:188)                                                                      
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:526)                                       
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:730)                                      
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:387)                                                              
            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$301(AbstractDelegatedExecutionApplicationContext.java:62)                   
            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$1.run(AbstractDelegatedExecutionApplicationContext.java:170)                       
            at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:87)                                                                    
            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalRefresh(AbstractDelegatedExecutionApplicationContext.java:166)               
            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$NoDependenciesWaitRefreshExecutor.refresh(AbstractDelegatedExecutionApplicationContext.java:80)                                                                                                                                                                        
            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:159)                     
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:270)                                                                        
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)                                                                          
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)                                                                  
            at ndx.web.cp.MyContextLoadListener.contextInitialized(MyContextLoadListener.java:21)                                                                                       
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4664)                                                                                        
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:5289)                                                                                                
            at com.sun.enterprise.web.WebModule.start(WebModule.java:499)                                                                                                               
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)                                                                                          
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)                                                                                                  
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)                                                                                                    
            at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1831)                                                                                                
            at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1515)                                                                                                
            at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)                                                                                                      
            at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)                                                                                                          
            at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:219)                                                                                                        
            at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:240)                                                                                              
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:308)                                                                                  
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169)                                                                                  
            at org.glassfish.web.osgi.JavaEEDeploymentRequest.deploy(JavaEEDeploymentRequest.java:167)                                                                                  
            at org.glassfish.web.osgi.JavaEEDeploymentRequest.execute(JavaEEDeploymentRequest.java:119)                                                                                 
            at org.glassfish.web.osgi.OSGiWebContainer.deployJavaEEArtifacts(OSGiWebContainer.java:141)                                                                                 
            at org.glassfish.web.osgi.OSGiWebContainer.deploy(OSGiWebContainer.java:106)                                                                                                
            at org.glassfish.web.osgi.WebExtender.deploy(WebExtender.java:158)                                                                                                          
            at org.glassfish.web.osgi.WebExtender.bundleChanged(WebExtender.java:110)                                                                                                   
            at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)                                                                     
            at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)                                                                                    
            at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)

    Comment


    • #3
      Code:
              at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)                                                                     
              at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)                                                                               
              at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:338)                                                                                     
              at org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(AbstractBundle.java:625)                                                                            
              at org.eclipse.osgi.framework.internal.core.AbstractBundle.update(AbstractBundle.java:572)                                                                                  
              at org.apache.felix.fileinstall.DirectoryWatcher.update(DirectoryWatcher.java:786)                                                                                          
              at org.apache.felix.fileinstall.DirectoryWatcher.update(DirectoryWatcher.java:679)                                                                                          
              at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:380)                                                                                     
              at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:123)                                                                                             
      Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class ndx.web.bill.payments.UploadController]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: class ndx.web.bill.payments.UploadController$$EnhancerByCGLIB$$9cfb1ed is not an enhanced class                                                                                                                                                       
              at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:212)                                                                                       
              at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)                                                                                           
              at org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:109)                                                                     
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1416)                            
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1383)                                
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)                                   
              ... 50 more                                                                                                                                                                 
      Caused by: java.lang.IllegalArgumentException: class ndx.web.bill.payments.UploadController$$EnhancerByCGLIB$$9cfb1ed is not an enhanced class                                      
              at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:618)                                                                                                        
              at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609)                                                                                                        
              at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:631)                                                                                                     
              at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)                                                                                                             
              at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)                                                                                         
              at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)                                                                                                              
              at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)                                                                                                                    
              at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:200)                                                                                       
              ... 55 more                                                                                                                                                                 
      |#]

      Comment

      Working...
      X