Hi,
I am learning a whole bunch of things at once due to a new API I am learning. In the past, I've always jared my POJO's and distributed them as
sockets or on a web server by exploding my dir and dropping in my files. In the past week, aside from the new API I'm learning, I've been
introduced to Spring,
Ant and Log4j. As a result of this, I'm not really sure where to look to solve my NPE problem.
I really appreciate any help that can be given me (and as late I have to apologize if I'm not in the right forum). I've been stuck on this for days and
while I'm learning the new API well, I can't move on until I fix this NPE problem. If I had any hair, I'd be pulling it out now.
Here's what happens. I build the following file with ant in Eclipse (I am used to using NetBeans but this API only has a tie into Eclipse so I'm using
Eclipse until I get through learning the API):
Everything compiles fine and my directories get created on
Tomcat. I provide the build file as edification in case it is needed for you to help me.
Once I compile, I start Tomcat. It begins starting up until it gets to my module-context.xml file.
This file is "module-context.xml" and it is located in the WAR directory: {$WAR.dir}\classes\alfresco\module\com.someco.module.extension.Core\
module-context.xml
Once I start Tomcat and it hits the bean id="somecoModuleCore.bootstrapAuthorityCreator" line, I get a NullPointerException. The error is:
Here is the class and the line where the NPE occurs...
I have a null AuthorityService. Yet, my somecoModuleCore.bootstrapAuthorityCreator bean does have the dependencies set. Again, from
the module-context.xml file:
Can anyone help me understand why I'm getting a NPE?
Thanks so much for you help. This seems like the last hurdle to having my development environment set. If I can understand what I'm doing wrong here,
I can move on and fix this if it ever comes up in the future. I sincerely appreciate any help and please let me know if I've provided enough/relevant
information. Incidentally, I've also moved a lot of stuff around (like the order loading in the module-context.xml file). I have also tried putting declarations
in my init() method such as if(authorityService == null) {this.authorityService = new AuthorityServiceImpl();}. Nothing I have tried has worked.
Best,
Al