Failed to resolve endpoint CXF on JBoss Fuse 6.3 - spring

Iam facing an issue while deploying a camel cxf webservice in Jboss Fuse 6.3.
The component is working fine in local instance but it is failing in other instance. It is going in a recursive loop and the logs are piling up with same exception.
Apache camel version - 2.17.0
Jboss EAP 6.4
Any help appreciated.
Endpoint configuration:
<cxf:cxfEndpoint id="ApiReadEndpoint" xmlns:nms="urn:company:esb:services:CoreInsuranceRead:v01"
address="{{esb.api.outread.contextpathurl}}"
wsdlURL="wsdl/aoiRead/CoreInsuranceReadInterface.wsdl"
endpointName="nms:SysTest"
serviceName="nms:CoreInsuranceReadService">
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD" />
<entry key="ws-security.validate.token" value="false" />
</cxf:properties>
<cxf:inInterceptors>
<ref bean="wss4jInInterceptor" />
<ref bean="authenticationInterceptor" />
<ref bean="authorizationInterceptor" />
</cxf:inInterceptors>
</cxf:cxfEndpoint>
Camel Route:
<route id="APIReadServiceRoute" streamCache="true">
<from id="ApiReadEndpoint" uri="cxf:bean:ApiReadEndpoint"/>
<doTry id="_doTry1">
<to id="_to1" uri="direct:ClaimRead"/>
<doCatch id="_doCatch1">
<exception>java.lang.Exception</exception>
<handled>
<constant>true</constant>
</handled>
</doCatch>
</doTry>
</route>
Error logs:
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://bean:ApiReadEndpoint due to: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'ApiReadEndpoint': FactoryBean threw exception on object creation; nested exception is org.apache.camel.ResolveEndpointFailedException:
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:589) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
at org.apache.camel.core.xml.AbstractCamelEndpointFactoryBean.getObject(AbstractCamelEndpointFactoryBean.java:55)
at org.apache.camel.spring.CamelEndpointFactoryBean.getObject(CamelEndpointFactoryBean.java:60) [camel-spring-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
at org.apache.camel.spring.CamelEndpointFactoryBean.getObject(CamelEndpointFactoryBean.java:38) [camel-spring-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:166) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1467) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1131) [spring-context-3.2.18.RELEASE.jar:3.2.18.RELEASE]
at org.apache.camel.spring.spi.ApplicationContextRegistry.lookupByNameAndType(ApplicationContextRegistry.java:47) [camel-spring-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:137) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:157) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]

This question was solved in comments. Issue was in identical assigned id ApiReadEndpoint for consumer and endpoint. This caused recursive endpoint initialization. After renaming or removing optional id attribute from consumer, the context started as expected.

Related

Issue with including BPMN file in RuntimeEnvironment

Im new to JBPM Im trying to configure Junit with spring and JBPM. The Problem Im facing is while running the test case when it loads application context xml. I get the below exception.
java.lang.IllegalStateException: Failed to load ApplicationContext
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runtimeEnvironment': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Cannot add asset: Process Compilation error Type mismatch: cannot convert from boolean to Object
Type mismatch: cannot convert from boolean to Object,
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:127)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1600)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
... 44 more
Caused by: java.lang.IllegalArgumentException: Cannot add asset: Process Compilation error Type mismatch: cannot convert from boolean to Object
Type mismatch: cannot convert from boolean to Object,
at org.jbpm.runtime.manager.impl.SimpleRuntimeEnvironment.addAsset(SimpleRuntimeEnvironment.java:171)
at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:341)
at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:74)
at com.citi.common.workflow.factory.RuntimeEnvironmentFactoryBean.getObject(RuntimeEnvironmentFactoryBean.java:135)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
... 49 more
find below the configuration it fails adding the assest
<bean id="xxx" factory-method="newClassPathResource"
class="org.kie.internal.io.ResourceFactory">
<constructor-arg>
<value>config/local/jbpm/processes/yyy.bpmn2</value>
</constructor-arg>
</bean>
<bean id="runtimeEnvironment"
class="com.citi.common.workflow.factory.RuntimeEnvironmentFactoryBean">
<property name="type" value="DEFAULT" />
<property name="assets">
<map>
<entry key-ref="xxx">
<util:constant static-field="org.kie.api.io.ResourceType.BPMN2" />
</entry>
</map>
</property>
<property name="userInfo" ref="jbpmUserInfo" />
<property name="taskService" ref="taskService" />
<property name="entityManagerFactory" ref="xxxEntityManagerFactoryBean" />
<property name="transactionManager" ref="xxxTransactionManager"/>
</bean>
I am using JBPM-6.5.0 I also tried compiling the class files to JAVA 1.7 but still getting same error any help will be appreciated.
Including the below dependency in my pom resolved the issue.
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-test</artifactId>
<version>${jbpm.version}</version>
<scope>test</scope>
</dependency>

Spring Social applicationURL setup exception

For Spring Social version 1.1.0.RELEASE, I need to set up the applicationUrl for the ProviderSignInController, as my application (a Tomcat app) is hosted behind a proxy (Apache web server). According the Spring Social document, I set it up as below:
<bean id="providerSignInController"
class="org.springframework.social.connect.web.ProviderSignInController">
<property name="signInUrl" value="/accounts/login" />
<property name="signUpUrl" value="/accounts/signup" />
<property name="postSignInUrl" value="/accounts/profile" />
<property name="applicationUrl" value="${applicationUrl}" />
</bean>
However, when deploying the application, I get an exception in Tomcat catalina.out saying:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property
'applicationUrl' threw exception; nested exception is
java.lang.NullPointerException>org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0'
defined in ServletContext resource [/WEB-INF/spring-servlet.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'providerSignInController' defined in ServletContext
resource [/WEB-INF/spring-servlet.xml]: Error setting property values;
nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property
'applicationUrl' threw exception; nested exception is
java.lang.NullPointerException
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
Any suggestions please? Thanks.
It should be a bug with class ProviderSignInController in Spring Social version 1.1.0.RELEASE. In class ProviderSignInController, connectSupport is created after properties being set:
public void afterPropertiesSet() throws Exception {
this.connectSupport = new ConnectSupport(sessionStrategy);
this.connectSupport.setUseAuthenticateUrl(true);
};
Therefore when method setApplicationUrl is invoked, connectSupport is still null.
Now when I configure it in the way shown below, it works. Or if I revert to version 1.0.3.RELEASE, it works fine too.
<bean id="providerSignInController"
class="org.springframework.social.connect.web.ProviderSignInController">
<property name="signInUrl" value="/accounts/login" />
<property name="signUpUrl" value="/accounts/signup" />
<property name="postSignInUrl" value="/accounts/profile" />
</bean>
<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="providerSignInController" />
<property name="targetMethod" value="setApplicationUrl" />
<property name="arguments">
<list>
<bean class="java.lang.String">
<constructor-arg value="${applicationUrl}" />
</bean>
</list>
</property>
</bean>
Follow-up
This problem has been resolved in Spring Social version 1.1.3.RELEASE. In class ProviderSignInController, method afterPropertiesSet has been updated to:
public void afterPropertiesSet() throws Exception {
this.connectSupport = new ConnectSupport(sessionStrategy);
this.connectSupport.setUseAuthenticateUrl(true);
if (this.applicationUrl != null) {
this.connectSupport.setApplicationUrl(applicationUrl);
}
};
As a result, the workaround of configuration given above (by the way, would not work with Spring Social version 1.1.3.RELEASE any more) can now be simplified to:
<bean id="providerSignInController"
class="org.springframework.social.connect.web.ProviderSignInController">
<property name="signInUrl" value="/accounts/login" />
<property name="signUpUrl" value="/accounts/signup" />
<property name="postSignInUrl" value="/accounts/profile" />
<property name="applicationUrl" value="${applicationUrl}" />
</bean>

Datasource issue on liberty in Spring hibernate Application

I have a spring and hibernate application that we are trying to port from Jboss to WAS Liberty profile. When the spring factory gets initialized I am getting below error
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myDatasource': Post-processing of the FactoryBean's object failed; nested exception is org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine superclass of missing type com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource [Xlint:cantFindType]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:165)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1441)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 87 more Caused by: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine superclass of missing type com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource [Xlint:cantFindType]
at org.aspectj.weaver.reflect.ReflectionWorld$ExceptionBasedMessageHandler.handleMessage(ReflectionWorld.java:129)
at org.aspectj.weaver.Lint$Kind.signal(Lint.java:325)
at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.raiseCantFindType(MissingResolvedTypeWithKnownSignature.java:232)
at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.getSuperclass(MissingResolvedTypeWithKnownSignature.java:98)
at org.aspectj.weaver.patterns.KindedPointcut.fastMatch(KindedPointcut.java:144)
at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:82)
at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:236)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:198)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:252)
at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:284)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1598)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:162) ... 92 more
My Server has following datasource config
<dataSource id="MyDS" jdbcDriverRef="Oracle" jndiName="jdbc/myDS">
The datasource bean on application context is defined as below
<bean id="myDatasource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/myDS" />
</bean>
I would appreciate help. It seems something to do with classloading but I am not able to figure out.
try to specify the following properties to your datasource bean definition:
<bean id="myDatasource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/myDS"/>
<property name="lookupOnStartup" value="false"/>
<property name="cache" value="true" />
<property name="proxyInterface" value="javax.sql.DataSource" />
</bean>
The proxyInterface solution worked for me on WAS 8.5.5 Liberty Profile.
On WAS 7, this also works as an alternate solution:
<jee:jndi-lookup id="WASdataSource" jndi-name="java:comp/env/jdbc/admt" />
<bean id="dataSource" class="org.springframework.jdbc.datasource.WebSphereDataSourceAdapter">
<property name="targetDataSource" ref="WASdataSource"/>
</bean>

Spring, Atomikos, Tibco EMS 5.1 integration issue

I am trying to configure Atomikos in my Spring application. I am using:
Atomikos 3.7.1 (TransactionsEssentials)
Spring 3.0.2
Tibco EMS 5.1
Can some one give me the configuration details for the connection factory using JNDI for JMS and also details regarding Tibco EMS configuration?
I had tried the following:
<bean id="jmsTemplate2" class="org.springframework.jms.core.JmsTemplate" >
<property name="connectionFactory" ref="amqConnectionFactory" />
<property name="defaultDestination" ref="queue" />
<property name="sessionTransacted" value="true"/>
<property name="messageConverter" ref="messageConverter"></property>
</bean>
<bean id="amqConnectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean" init-method="init">
<property name="uniqueResourceName" value="XAEMS" />
<property name="xaConnectionFactory" ref="connectionFactory" />
<property name="poolSize" value="10" />
</bean>
<jee:jndi-lookup id="connectionFactory" jndi-name="emsConnectionFactory">
<jee:environment>
java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
java.naming.provider.url=tibjmsnaming://localhost:7222
</jee:environment>
</jee:jndi-lookup>
<jee:jndi-lookup id="queue" jndi-name="emsQueue">
<jee:environment>
java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
java.naming.provider.url=tibjmsnaming://localhost:7222
</jee:environment>
</jee:jndi-lookup>
But get this error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'amqConnectionFactory' defined in file [C:\springsource\vfabric-tc-server-developer-2.6.4.RELEASE\spring-insight-instance\wtpwebapps\iRebal-Backend-Poc-Web-Integration-Final-xa\WEB-INF\classes\META-INF\spring\batch\jobs\priority-queue.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory' to required type 'javax.jms.XAConnectionFactory' for property 'xaConnectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory] to required type [javax.jms.XAConnectionFactory] for property 'xaConnectionFactory': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 39 more
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory' to required type 'javax.jms.XAConnectionFactory' for property 'xaConnectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory] to required type [javax.jms.XAConnectionFactory] for property 'xaConnectionFactory': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl
This answer is too late for the OP, but for the sake of posterity:
The class you want is com.tibco.tibjms.TibjmsXAConnectionFactory.
It seems that in class com.atomikos.jms.AtomikosConnectionFactoryBean you have a field named xaConnectionFactory that its type (or its getter return type) is javax.jms.XAConnectionFactory. However, in Spring configuration file, you configured that field to be set with an instance of which type is com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory.
Apparently com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory is not convertible to javax.jms.XAConnectionFactory.

Spring expression language not working with spring aop

<bean id="eddie" class="com.springinaction.Instrumentalist">
<property name="instrument" value="#{violin}"></property>
<property name="song" value="#{kenny.song}"></property>
</bean>
<bean id="violin" class="com.springinaction.Violin">
</bean>
<bean id="kenny" class="com.springinaction.Instrumentalist">
<property name="song" value="Kenny is a star,kenny is a star"></property>
<property name="instrument" ref="saxopone"></property>
</bean>
<aop:config>
<aop:aspect ref="audience">
<aop:before pointcut="execution(* com.springinaction.Performer.perform(..))" method="takeSeats()"/>
<aop:after-throwing method="demandRefund" pointcut="execution(* com.springinaction.Performer.perform(..))"/>
</aop:aspect>
</aop:config>
In the above code,I am injecting song , instrument property of eddie bean using spring expression language. But, song property not injected properly..and i am getting the below error:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'eddie'
defined in class path resource
[spring-config.xml]: Initialization of
bean failed; nested exception is
org.springframework.beans.factory.BeanExpressionException:
Expression parsing failed; nested
exception is
org.springframework.expression.spel.SpelEvaluationException:
EL1008E:(pos 6): Field or property
'song' cannot be found on object of
type '$Proxy4' 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:290)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
at
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
at
com.springinaction.Main.main(Main.java:10)
Instrument property is injected properly where as song property is not injected and this is happening because of aop only..
when i comment out <aop:config> it is working fine..
Anything wrong?
Did you try
<aop:config proxy-target-class="true">
...
</aop:config>
This way you get a dynamic subclass and the property should be available in the proxy created via Spring AOP.
The default behaviour of Spring AOP is to create a Java proxy for the interfaces, so the properties of any classes won't be accessible through the proxy.

Resources