• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

External Spring bean not being found

 
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear JavaRanch,

Thanks all for any help.

I  think / hope this is easy to solve.  I'm not that great with Spring.  

I have a BeanFactoryPostProcessor class:



In the context xml of this application (app-A) I have no bean definition.

However in the application that uses this application (i.e. app-B, has its jar in it's /lib) directory... there is a context i.e



The problem I'm having is that when building my application (app-B) that uses app-A, I get



So I have, if you like "external" bean definition, not being picked up by the application that has the BeanFactoryPostProcessor in.

Regards, Sam
 
Ranch Hand
Posts: 100
2
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There should be a Bean Class which will instantiate and provide bean object.

In app-A you have not used context not have you implemented Bean Post Processor if you are trying to use Bean postProcessor.

What are you trying to achieve here? can you explain that in brief
 
sam wootton
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

I have implemented BeanFactoryPostProcessor (i copied the code snippet above).  

I have app-a (a library) which is loaded in to app-B. In app-A I have the BeanFactoryPostProcessor, but no context. I want it to use the context defined in app-B.  In app-A i do have the context (xml bean definition for myProperties)

Im only repeating what I said above - I thought it was clear?

Regards, Sam
 
sam wootton
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry that last bit should have read

In app-B i do have the context (xml bean definition for myProperties).

So:

app-A (BeanFactoryPostProcessor) with reference to myProperties bean.
app-B (the xml application conext that has myProperties). - also loads in app-A jar.

Regards, Sam
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic