felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Ottinger <mottin...@tacitknowledge.com>
Subject Re: getting npe from generate-scr-scrdescriptor
Date Sun, 17 Apr 2011 22:02:04 GMT
Hi All, bumping up to 1.7.0 of the SCR plugin, I did further digging and found: http://mail-archives.apache.org/mod_mbox/felix-dev/201103.mbox/%3C1643894286.4505.1299594299814.JavaMail.tomcat@hel.zones.apache.org%3E

Thanks!

On Apr 16, 2011, at 9:55 PM, Mike Ottinger wrote:

> Hi All,
> 
> 	So this is strange. In my service, if I actually declare the bindProductXMLImporter
in my class, when I attempt my maven build I get the below NPE:
> 
> 	java.lang.NullPointerException
> 	at org.apache.felix.scrplugin.tags.qdox.QDoxJavaTag.getSourceLocation(QDoxJavaTag.java:74)
> 	at org.apache.felix.scrplugin.om.AbstractObject.logWarn(AbstractObject.java:37)
> 	at org.apache.felix.scrplugin.om.Reference.validateMethod(Reference.java:259)
> 	at org.apache.felix.scrplugin.om.Reference.validate(Reference.java:215)
> 	at org.apache.felix.scrplugin.om.Component.validate(Component.java:345)
> 	at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:334)
> 	at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
> 	....
> 
> 	My service's class is annotated like the below:
> 
> 	@scr.component immediate="true" metatype="no" enabled="true"
> 	@scr.service interface="javax.servlet.Servlet" serviceFactory="no"
> 	@scr.property name="service.description" value="PCAT importer servlet"
> 	@scr.property name="service.vendor" value="Foo"
> 
> 	@scr.property name="sling.servlet.paths" values.0="/apps/pcat/import" 
> 
> 	And the field declaration looks like:
> 
> 	/**
>     	* @scr.reference
>     	*/
>    	private ProductXMLImporter productXMLImporter;
> 
> 	Everything seems to run fine, but if I declare a bind method for this by myself:
> 
> 	public void bindProductXMLImporter(ProductXMLImporter productXMLImporter) {
>        	this.productXMLImporter = productXMLImporter;
>    	}
> 
> 	I get the NPE in my maven build above. The generated serviceComponents.xml file looks
perfectly fine. Any ideas?
> 
> Thanks in advance
> 
> - Mike
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

___________________________
Mike Ottinger
Senior Consultant
Tacit Knowledge - San Francisco
925-330-9002


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message