<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: spring dependency injection issue : NullPointerException in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37591#M19887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First try putting the loading of the app context into a static member, rather than in the method ….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;public static ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;… now the calling code should look something like this …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;inittest obj = inittest.applicationContext.getBean("initTest");&lt;BR /&gt;obj.login();&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Roy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2006 11:53:00 GMT</pubDate>
    <dc:creator>rwetherall</dc:creator>
    <dc:date>2006-01-18T11:53:00Z</dc:date>
    <item>
      <title>spring dependency injection issue : NullPointerException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37590#M19886</link>
      <description>hi, we are exploring alfreco for a while, its a great product, we are considering to provide content services which would have been very difficult with out alfresco. i have some issues in trying to use spring dependency injection, it would be great if somebody can figure out the solution. &amp;lt;bean i</description>
      <pubDate>Tue, 17 Jan 2006 13:13:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37590#M19886</guid>
      <dc:creator>pmarreddy</dc:creator>
      <dc:date>2006-01-17T13:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: spring dependency injection issue : NullPointerException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37591#M19887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First try putting the loading of the app context into a static member, rather than in the method ….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;public static ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;… now the calling code should look something like this …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;inittest obj = inittest.applicationContext.getBean("initTest");&lt;BR /&gt;obj.login();&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Roy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2006 11:53:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37591#M19887</guid>
      <dc:creator>rwetherall</dc:creator>
      <dc:date>2006-01-18T11:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: spring dependency injection issue : NullPointerException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37592#M19888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yup it works, thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i just want to conform, does it&amp;nbsp; work for all situations, i&amp;nbsp; looked at alfresco code and no where application context is defined in a static way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ad thanks prasanth.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2006 07:10:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37592#M19888</guid>
      <dc:creator>pmarreddy</dc:creator>
      <dc:date>2006-01-19T07:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: spring dependency injection issue : NullPointerException</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37593#M19889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The initialisation of the Application context depends on the environment you're executing in.&amp;nbsp; For example, the Web Client uses web.xml to initialise a WebApplicationContext.&amp;nbsp; Take a look in web.xml (within the source bundle at /projects/web-client/source/web/web-inf) and search for ContextLoaderListener and contextConfigLocation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2006 11:10:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-dependency-injection-issue-nullpointerexception/m-p/37593#M19889</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2006-01-19T11:10:57Z</dc:date>
    </item>
  </channel>
</rss>

