cancel
Showing results for 
Search instead for 
Did you mean: 

createMissingPeople override NullPointerException

danniemstanley
Champ in-the-making
Champ in-the-making
Running Alfresco Community 2.1.  If I place the following config information in my custom-authentication-services-context.xml ,  I get a Java error:

<bean id="personService" class="org.alfresco.repo.security.person.PersonServiceImpl">
    <property name="createMissingPeople">
       <value>${server.transaction.allow-writes}</value>
    </property>
</bean>

In the above case I am simply trying to set it to the same value as in the default configuration.  My end goal is to set this value to false but I found it odd that even when I am not trying to change the config with the override it still gets a Java error.  It happens when I set the value to false as well.  Here is the error:

15:57:22,588 INFO  [service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
15:57:24,237 ERROR [web.context.ContextLoader] Context initialization failed
java.lang.NullPointerException
    at org.alfresco.repo.security.person.PersonServiceImpl.getPersonOrNull(PersonServiceImpl.java:221)
    at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)

–snip–

15:57:24,245 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NullPointerException
    at org.alfresco.repo.security.person.PersonServiceImpl.getPersonOrNull(PersonServiceImpl.java:221)
    at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)

–snip–

15:57:24,251 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
java.lang.NullPointerException
    at org.alfresco.repo.security.person.PersonServiceImpl.getPersonOrNull(PersonServiceImpl.java:221)
    at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)

–snip–

Jul 25, 2007 3:57:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 25, 2007 3:57:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
–snip–


Thanks for your assistance.

– Dannie
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

You are redefining the bean - you need to provide all properties - not just the ones you want to change.

Andy

danniemstanley
Champ in-the-making
Champ in-the-making
Thanks Andy, that worked great!