You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sherene <ro...@yahoo.co.in> on 2008/01/28 10:43:33 UTC

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.


Re: Error creating bean with name propertyPlaceholder

Posted by sachin2008 <es...@gmail.com>.
In the above shrene code,

I have set the configuration properities correctly i.e.. external/config in
jboss-service.xml which indeed to be configured in xbean.xml of
lw-container.

gnodet wrote:
> 
> What did you do ?
> 
> On Feb 1, 2008 1:45 PM, sachin2008 <es...@gmail.com> wrote:
>>
>> Now it is working fine.
>>
>> Thanks,
>> Praveen.
>>
>>
>> gnodet wrote:
>> >
>> > I think some of the problem comes from the fact that some threads may
>> > not be correctly
>> > associated with the JNDI context (because they are not started by
>> > jboss itself).  In such
>> > cases, JNDI lookups would fail.
>> >
>> > I don't think the problem comes from the location of your properties
>> > file because another
>> > kind of exception would be thrown saying that the file can not be
>> found.
>> >
>> > The only workaround I know currently is to do the lookup when the
>> > application is started
>> > and store it in a singleton so that you can retrieve it at a later
>> > time.  I'm sure there are
>> > clean solutions to this problem though....
>> >
>> > On Jan 28, 2008 10:43 AM, Sherene <ro...@yahoo.co.in> wrote:
>> >>
>> >> 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.
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Blog: http://gnodet.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15225945.html
>>
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15261817.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error creating bean with name propertyPlaceholder

Posted by Guillaume Nodet <gn...@gmail.com>.
What did you do ?

On Feb 1, 2008 1:45 PM, sachin2008 <es...@gmail.com> wrote:
>
> Now it is working fine.
>
> Thanks,
> Praveen.
>
>
> gnodet wrote:
> >
> > I think some of the problem comes from the fact that some threads may
> > not be correctly
> > associated with the JNDI context (because they are not started by
> > jboss itself).  In such
> > cases, JNDI lookups would fail.
> >
> > I don't think the problem comes from the location of your properties
> > file because another
> > kind of exception would be thrown saying that the file can not be found.
> >
> > The only workaround I know currently is to do the lookup when the
> > application is started
> > and store it in a singleton so that you can retrieve it at a later
> > time.  I'm sure there are
> > clean solutions to this problem though....
> >
> > On Jan 28, 2008 10:43 AM, Sherene <ro...@yahoo.co.in> wrote:
> >>
> >> 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.
> >>
> >>
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15225945.html
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Error creating bean with name propertyPlaceholder

Posted by sachin2008 <es...@gmail.com>.
Now it is working fine.

Thanks,
Praveen.

gnodet wrote:
> 
> I think some of the problem comes from the fact that some threads may
> not be correctly
> associated with the JNDI context (because they are not started by
> jboss itself).  In such
> cases, JNDI lookups would fail.
> 
> I don't think the problem comes from the location of your properties
> file because another
> kind of exception would be thrown saying that the file can not be found.
> 
> The only workaround I know currently is to do the lookup when the
> application is started
> and store it in a singleton so that you can retrieve it at a later
> time.  I'm sure there are
> clean solutions to this problem though....
> 
> On Jan 28, 2008 10:43 AM, Sherene <ro...@yahoo.co.in> wrote:
>>
>> 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.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15225945.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error creating bean with name propertyPlaceholder

Posted by Guillaume Nodet <gn...@gmail.com>.
I think some of the problem comes from the fact that some threads may
not be correctly
associated with the JNDI context (because they are not started by
jboss itself).  In such
cases, JNDI lookups would fail.

I don't think the problem comes from the location of your properties
file because another
kind of exception would be thrown saying that the file can not be found.

The only workaround I know currently is to do the lookup when the
application is started
and store it in a singleton so that you can retrieve it at a later
time.  I'm sure there are
clean solutions to this problem though....

On Jan 28, 2008 10:43 AM, Sherene <ro...@yahoo.co.in> wrote:
>
> 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.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Error creating bean with name propertyPlaceholder

Posted by sachin2008 <es...@gmail.com>.
Can anyone plese put some light on this issue.



marco.mistroni wrote:
> 
> 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
> roshan_sithara@yahoo.co.in
> 
> 28/01/2008 11:42
> Please respond to
> users@servicemix.apache.org
> 
> 
> 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
>> roshan_sithara@yahoo.co.in
>> 
>> 28/01/2008 09:43
>> Please respond to
>> users@servicemix.apache.org
>> 
>> 
>> 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.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15220883.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error creating bean with name propertyPlaceholder

Posted by Sherene <ro...@yahoo.co.in>.
i have hard coded the location of file in jboss-service.xml (which is under
server/default/conf folder)
i have added the following entry
	<!-- **********ExternalProperties*************** -->
	<mbean code="org.jboss.naming.ExternalContext"
name="jboss.jndi:service=ExternalContext,jndiName=external/config">
		<attribute name="JndiName">external/config</attribute>
		<attribute name="Properties">
        java.naming.factory.initial=com.sun.jndi.fscontext.FSContextFactory
        java.naming.provider.url=file:///D:/POC/conf
        </attribute>
		<attribute name="InitialContext">javax.naming.InitialContext</attribute>
	</mbean>
but still i am getting the same error




marco.mistroni wrote:
> 
> 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
> roshan_sithara@yahoo.co.in
> 
> 28/01/2008 11:42
> Please respond to
> users@servicemix.apache.org
> 
> 
> 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
>> roshan_sithara@yahoo.co.in
>> 
>> 28/01/2008 09:43
>> Please respond to
>> users@servicemix.apache.org
>> 
>> 
>> 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.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-creating-bean-with-name-propertyPlaceholder-tp15131610s12049p15176563.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Error creating bean with name propertyPlaceholder

Posted by ma...@uk.bnpparibas.com.
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
roshan_sithara@yahoo.co.in

28/01/2008 11:42
Please respond to
users@servicemix.apache.org


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
> roshan_sithara@yahoo.co.in
> 
> 28/01/2008 09:43
> Please respond to
> users@servicemix.apache.org
> 
> 
> 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.


Re: Error creating bean with name propertyPlaceholder

Posted by Sherene <ro...@yahoo.co.in>.
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
> roshan_sithara@yahoo.co.in
> 
> 28/01/2008 09:43
> Please respond to
> users@servicemix.apache.org
> 
> 
> 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.


Re: Error creating bean with name propertyPlaceholder

Posted by ma...@uk.bnpparibas.com.
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
roshan_sithara@yahoo.co.in

28/01/2008 09:43
Please respond to
users@servicemix.apache.org


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.