HI, well, my guess is that as you are using a org.springframework.jndi.JndiObjectFactoryBean, you must have a jndi entry somewhere. Now don't remember exactly, but if you r using jboss, there's a place where you configure all your environment entries... might be under \server\default\conf, don't remember I hope you have done that. otherwise, how will jboss figure out where's this jndi entry external/config/configpoc/general.properties? i
so looks like this is not a servicemix problem . so, to get it work quickly, try to somehow hardcode the location of that file , so that ur svcmix app work fine. Afterwards, refine it to use jndi hth marco Internet [EMAIL PROTECTED] 28/01/2008 11:42 Please respond to [email protected] To users cc Subject Re: Error creating bean with name propertyPlaceholder hi Please find the below jsr xbean.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0" xmlns:test="http://servicemix.apache.org/config"> <classpath> <location>.</location> </classpath> <jsr181:endpoint service="test:jsrservice" endpoint="endpoint"> <jsr181:pojo> <bean class="com.cts.poc.ConfigExample.ExampleService"> <property name="inputFilePath" value="${inputFilePath}"/> <property name="countFileName" value="${countFileName}"/> </bean> </jsr181:pojo> </jsr181:endpoint> <bean id="propertyPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"> <bean class="org.springframework.core.io.FileSystemResource"> <constructor-arg> <bean class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>external/config/configpoc/general.properties</value> </property> </bean> </constructor-arg> </bean> </property> </bean> </beans> here "general.properties" is the properties file in which i have 2 parameters inputFilePath and countFileName please below my sample java ie jsr component package com.cts.poc.ConfigExample; public class ExampleService { private String inputFilePath; private String countFileName; public String getCountFileName() { return countFileName; } public void setCountFileName(String countFileName) { this.countFileName = countFileName; } public String getInputFilePath() { return inputFilePath; } public void setInputFilePath(String inputFilePath) { this.inputFilePath = inputFilePath; } public String sayHello(String name) { System.out.println(getCountFileName()); System.out.println(getInputFilePath()); return "Hello "+name; } } marco.mistroni wrote: > > hi, > there's no attachment. > looking at exception, concentrate on this > > Cannot create inner bean > 'org.springframework.jndi.JndiObjectFactoryBean#538b31' while setting > constructor argument; nested exception is > org.springframework.beans.factory.BeanCreationException: Error creating > bean > with name 'org.springframework.jndi.JndiObjectFactoryBean#538b31' defined > in > file [D:\Program > Files\jboss-4.0.5.GA\server\default\data\ServiceMix\service-assemblies\Config-SA\version_1\sus\servicemix-jsr181\Config-JSR-SU\xbean.xml]: > Invocation of init method failed; nested exception is > javax.naming.NameNotFoundException: external not bound > at > > do you have a jndi bean configured in your xbean.xml>? > > what is referring to? a datasource? > > copy yoru xbean.xml in your nxt mail > > regards > marco > > > > > Internet > [EMAIL PROTECTED] > > 28/01/2008 09:43 > Please respond to > [email protected] > > > To > users > cc > > Subject > Error creating bean with name propertyPlaceholder > > > > > > > > hi > > i am using a jsr component in which i am reading a parameter which is from > a > properties file. > I have attached the jsr xbean.xml and the properties files > > Note: i have placed the fscontext and providerutil jar in jboss/server/lib > folder. > > when i deploy the jar in jboss 4.0.5 GA, i am getting the following error. > > > > Caused by: org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'propertyPlaceholder' defined in file [D:\Program > Files\jboss-4.0.5.GA\server\default\data\ServiceMix\service-assemblies\Config-SA\version_1\sus\servicemix-jsr181\Config-JSR-SU\xbean.xml]: > Cannot create inner bean > 'org.springframework.core.io.FileSystemResource#129b073' while setting > bean > property 'location'; nested exception is > org.springframework.beans.factory.BeanCreationException: Error creating > bean > with name 'org.springframework.core.io.FileSystemResource#129b073' defined > in file [D:\Program > Files\jboss-4.0.5.GA\server\default\data\ServiceMix\service-assemblies\Config-SA\version_1\sus\servicemix-jsr181\Config-JSR-SU\xbean.xml]: > Cannot create inner bean > 'org.springframework.jndi.JndiObjectFactoryBean#538b31' while setting > constructor argument; nested exception is > org.springframework.beans.factory.BeanCreationException: Error creating > bean > with name 'org.springframework.jndi.JndiObjectFactoryBean#538b31' defined > in > file [D:\Program > Files\jboss-4.0.5.GA\server\default\data\ServiceMix\service-assemblies\Config-SA\version_1\sus\servicemix-jsr181\Config-JSR-SU\xbean.xml]: > Invocation of init method failed; nested exception is > javax.naming.NameNotFoundException: external not bound > at > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:207) > at > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:111) > http://www.nabble.com/file/p15131610/xbean.xml xbean.xml > http://www.nabble.com/file/p15131610/general.properties general.properties > > http://www.nabble.com/file/p15131610/ExampleService.java > ExampleService.java > http://www.nabble.com/file/p15131610/jboss-service.xml jboss-service.xml > -- > View this message in context: > http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15131610.html > > Sent from the ServiceMix - User mailing list archive at Nabble.com. > > > > This communication is confidential, may be privileged and is meant only > for the intended recipient. If you are > not the intended recipient, please notify the sender by reply and delete > this message from your system. Any > unauthorised dissemination, distribution or copying hereof is prohibited. > > BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK > Limited, BNP Paribas UK Limited, > BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are > authorised and regulated by > the Financial Services Authority. > > BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank > are authorised by the CECEI > and AMF. BNP Paribas London Branch, BNP Paribas Securities Services > London Branch and BNP Paribas > Private Bank London Branch are regulated by the Financial Services > Authority for the conduct of their UK > business. BNP Paribas Securities Services London Branch is also a member > of the London Stock Exchange. > > > -- View this message in context: http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15133541.html Sent from the ServiceMix - User mailing list archive at Nabble.com. This communication is confidential, may be privileged and is meant only for the intended recipient. If you are not the intended recipient, please notify the sender by reply and delete this message from your system. Any unauthorised dissemination, distribution or copying hereof is prohibited. BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited, BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by the Financial Services Authority. BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
