Hi,

I think this is a consequence of trying to warn about the public bind
method. It is not technically wrong to use a public method and there may
be a good reason to do so -- but generally it is not.

Have you tried using the Annotations instead of JavaDoc tags ?

Regards
Felix

Am Sonntag, den 17.04.2011, 05:55 +0100 schrieb Mike Ottinger: 
> 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: [email protected]
> For additional commands, e-mail: [email protected]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to