Announcement Announcement Module
Collapse
No announcement yet.
Ant compiling Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ant compiling

    Hi,

    In my applicationContext I have

    Code:
       
    <aop:aspectj-autoproxy proxy-target-class="true" />
        
    <context:annotation-config/>
    and I have classes containing:

    Code:
    @Aspect
    @Component
    public class WSAuthenticateInterceptor
    If I export the war in eclipse it works perfectly but if I'm building my project with ant and then I put my war in tomcat:

    Code:
    Finished creating instance of bean 'org.springframework.aop.config.internalAutoProxyCreator'
    2013-05-27 17:26:19,202 DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean '_filterChainProxyPostProcessor'
    2013-05-27 17:26:19,202 DEBUG DefaultListableBeanFactory - Creating instance of bean '_filterChainProxyPostProcessor'
    2013-05-27 17:26:19,264 DEBUG ReflectiveAspectJAdvisorFactory - Found AspectJ method: public void ro.cs.dmc.aspectj.AuditInterceptor.audit(org.aspectj.lang.JoinPoint,ro.cs.dmc.annotation.Auditable,java.lang.Object)
    2013-05-27 17:26:19,264 INFO  DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@fe5d98: defining beans [_authenticationManager,_filterChainProxy,_httpSessionContextIntegrationFilter,_filterChainProxyPostProcessor,_filterChainList,_securityContextHolderAwareRequestFilter,_portMapper,_exceptionTranslationFilter,_filterSecurityInterceptor,_sessionRegistry,_concurrentSessionController,_concurrentSessionFilter,_sessionFixationProtectionFilter,_rememberMeServices,_rememberMeAuthenticationProvider,_rememberMeFilter,_rememberMeServicesInjectionBeanPostProcessor,_logoutFilter,_entryPointInjectionBeanPostProcessor,_userServiceInjectionPostProcessor,basicProcessingFilter,basicAuthenticationEntryPoint,userDetailsService,roleVoter,isAuthenticatedAnonimouslyVoter,domainAccessDecisionManager,wsSecurityInterceptor,dmcWsSecurityInterceptor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,auditInterceptor,WSAuthenticateInterceptor,blAudit,blCategory,blCategoryStructure,blCollectionZone,blComment,blDocument,blGroup,blHistory,blMonitor,blNotification,blProces,blReport,blSecurity,blTask,blUser,blWorkPackage,controllerPrivilegeManager,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,multipartResolver,applicationContextProvider,messageSource,themeSource,messageFactory,omWsClientMarshaller,omWebServiceClient,omWsDmcClientObjectFactory,dmeWsClientMarshaller,dmeWebServiceClient,dmeWsClientObjectFactory,soapEnvelopeLoggingInterceptor,auditWsClientMarshaller,auditWebServiceClient,auditWsClientObjectFactory,dmfWsClientMarshaller,dmfWebServiceClient,dmfWsDmcClientObjectFactory]; root of factory hierarchy
    2013-05-27 17:26:19,264 ERROR ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainProxyPostProcessor': BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NullPointerException
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:400)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
    	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
    Any ideeas about how the aspectj stuff must be handled in ant?

  • #2
    Ant compiling

    The jar target lists the compile target as a dependency . ANT a popular Java-based build system comes with a lot of built-in support for the general and for the Java side of the build process .


    Lån Penge

    Comment

    Working...
    X