Announcement Announcement Module
Collapse
No announcement yet.
Problem with Spring AOP on Solaris system Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Spring AOP on Solaris system

    Hi at all,

    someone of you has notice about problem with AOP on jdk 1.4.2._13 on solaris system?

    I have developed an application (a batch) on my pc (windows 2000) using the same jdk. In this developing environemnt I have no problem and all run correctly.

    When I move my project on integration environment (Solaris system), I receive this error, in starting up of the application:

    Wrong configuration....org.springframework.beans.factory .BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAd visor': Cannot create inner bean '(inner bean)' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Throwing argument name 'exception' was not bound in advice arguments
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAd visor': Cannot create inner bean '(inner bean)' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Throwing argument name 'exception' was not bound in advice arguments
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Throwing argument name 'exception' was not bound in advice arguments
    Caused by: java.lang.IllegalStateException: Throwing argument name 'exception' was not bound in advice arguments
    at org.springframework.aop.aspectj.AbstractAspectJAdv ice.bindExplicitArguments(AbstractAspectJAdvice.ja va:407)
    at org.springframework.aop.aspectj.AbstractAspectJAdv ice.bindArgumentsByName(AbstractAspectJAdvice.java :349)
    at org.springframework.aop.aspectj.AbstractAspectJAdv ice.calculateArgumentBindings(AbstractAspectJAdvic e.java:318)
    at org.springframework.aop.aspectj.AbstractAspectJAdv ice.afterPropertiesSet(AbstractAspectJAdvice.java: 284)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1118)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1085)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:429)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBeanDefinition(Bea nDefinitionValueResolver.java:197)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:112)
    at org.springframework.beans.factory.support.Construc torResolver.resolveConstructorArguments(Constructo rResolver.java:324)
    at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:91)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:745)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:683)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:388)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 50)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:141)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:247)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:161)
    at org.springframework.aop.framework.autoproxy.BeanFa ctoryAdvisorRetrievalHelper.findAdvisorBeans(BeanF actoryAdvisorRetrievalHelper.java:73)
    at org.springframework.aop.framework.autoproxy.Abstra ctAdvisorAutoProxyCreator.findCandidateAdvisors(Ab stractAdvisorAutoProxyCreator.java:98)
    at org.springframework.aop.framework.autoproxy.Abstra ctAdvisorAutoProxyCreator.findEligibleAdvisors(Abs tractAdvisorAutoProxyCreator.java:85)
    at org.springframework.aop.framework.autoproxy.Abstra ctAdvisorAutoProxyCreator.getAdvicesAndAdvisorsFor Bean(AbstractAdvisorAutoProxyCreator.java:69)
    at org.springframework.aop.framework.autoproxy.Abstra ctAutoProxyCreator.postProcessAfterInitialization( AbstractAutoProxyCreator.java:265)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyBeanPostProcessors AfterInitialization(AbstractAutowireCapableBeanFac tory.java:316)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1094)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:429)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 50)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:141)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:247)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:161)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:273)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:346)
    at com.ericsson.sm.recurrent.macro.charging.engine.Ch argingEngine.settingUpChargingEngine(ChargingEngin e.java:40)
    at com.ericsson.sm.recurrent.macro.charging.engine.Ch argingEngine.main(ChargingEngine.java:191)
    Exception message: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAd visor': Cannot create inner bean '(inner bean)' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Throwing argument name 'exception' was not bound in advice arguments

    -----------------------------------------

    I have to disable the AOP functions on integration and (unfortunately) on production.

    Can I have some information from someone of you?

    I still present for any information or clarification?

    Thanks a lot.

    Samuele

  • #2
    It doesn't look like a Solaris-specific problem. How does your aspect look?

    -Ramnivas

    Comment


    • #3
      Originally posted by ramnivas View Post
      It doesn't look like a Solaris-specific problem. How does your aspect look?

      -Ramnivas
      Hi Ramnivas,

      I can paste a snap of my bean definition xml file, so you can tell me (please) if I make some mistake,

      ----------------------

      <bean id="recoveryAccessException" class="com.ericsson.sm.recurrent.macro.charging.ex ception.PersistenceAccessExceptionManaging">
      </bean>
      <bean id="recoveryStateMachineException" class="com.ericsson.sm.recurrent.macro.charging.ex ception.StateMachineExceptionManaging">
      </bean>

      <aop:config proxy-target-class="true">
      <aop:aspect id="accessExceptionAspect" ref="recoveryAccessException">
      <aopointcut id="persistenceAccessPointcut" expression="execution(* com.ericsson.sm.recurrent.macro.charging.dao..*(.. ))"/>
      <aop:after-throwing pointcut-ref="persistenceAccessPointcut" throwing="exception" method="recoveryDataAccessException" />
      </aop:aspect>
      </aop:config>
      <aop:config proxy-target-class="true">
      <aop:aspect id="stateMachineExceptionAspect" ref="recoveryStateMachineException">
      <aopointcut id="stateMachinePointcut" expression="execution(* com.ericsson.sm.recurrent.macro.charging.statemach ine..*(..))"/>
      <aopointcut id="externalSysytemCallerPointcut" expression="execution(* com.ericsson.sm.recurrent.macro.charging.connector callers..*(..))"/>
      <aop:after-throwing pointcut-ref="stateMachinePointcut" throwing="exception" method="recoveryStateMachineException" />
      <aop:after-throwing pointcut-ref="externalSysytemCallerPointcut" throwing="exception" method="recoveryConnectorCallerException" />
      </aop:aspect>
      </aop:config>


      ----------------------

      This configuration run corretly in my development pc, based on Windows system. I use Eclipse (Ganymede) as IDE, but for this project I have set to use the JDK 1.4.2_13, that is the same installed on solaris system.

      The error is raise in startup phase, in witch Spring make up all the bean in the factory.

      If you want more information, don't esitate to ask me.

      Thanks in advance for you interesting.

      Best regards

      Samuele

      Comment


      • #4
        It seems that you may not be compiling your aspects (PersistenceAccessExceptionManaging and StateMachineExceptionManaging) with debug information i.e. with the -g flag, when you build it for Solaris deployment.

        -Ramnivas

        Comment


        • #5
          Not use AspectJ but AOP alliance

          Originally posted by ramnivas View Post
          It seems that you may not be compiling your aspects (PersistenceAccessExceptionManaging and StateMachineExceptionManaging) with debug information i.e. with the -g flag, when you build it for Solaris deployment.

          -Ramnivas
          Hi Ramnivas,

          thanks a lot for your interesting.

          but I'm using AOP Alliance I have not to compile my advice, because it is used the Java Dynamic Proxy to implement the advice logic. So I not use a double step compiling (first to compile the aspect, second to compile my code with aspect), I compile all at the same time. Then I move all file of my application on solaris machine and use it.

          The option that you indicate is for AspectJ compiler, and so I can't use it.

          Can you give me any other suggestion, for my problem?

          Best regards.

          Samuele

          Comment


          • #6
            I realize that you are using proxy-based AOP and I don't mean AspectJ compilation. Please see section "6.2.4.6.3. Determining argument names" for more details.

            -Ramnivas

            Comment


            • #7
              After a lot of time.....

              Hi Ramnivas,

              a lot of time is lapse....only today I have restarted my activity for find the solution of my problem.

              I have checked the compiling option, and I use this ant task:

              <target name="source_compile" depends="cleanup_compile" >
              <mkdir dir="${classes.dir}"/>
              <javac destdir="${classes.dir}"
              debug="on"
              deprecation="on"
              optimize="on" debuglevel="vars">
              <src path="${source.dir}"/>
              <classpath refid="class.path" />
              </javac>
              </target>

              with or without the "debuglevel" option.

              The result is always the same.

              I think, that there are some differences between JVM for WIndows and for Solaris. Sorry, but I cann't think to other reason.

              You have some suggestions?

              Thanks in advance

              Samuele


              Originally posted by ramnivas View Post
              I realize that you are using proxy-based AOP and I don't mean AspectJ compilation. Please see section "6.2.4.6.3. Determining argument names" for more details.

              -Ramnivas

              Comment

              Working...
              X