icfnext / cq-component-maven-plugin

Other
22 stars 35 forks source link

@TagInputField fails when using namespaces #10

Closed johnvasquez closed 9 years ago

johnvasquez commented 10 years ago

I'm using the TagInputField like this:

@DialogField(
    tab = 1, 
    name = "./tags", 
    fieldLabel="Product tags"
)
@TagInputField(
    displayTitles = true,
    namespaces = @TagNameSpace(value = "default", maximum = 10)
)
private final String[] tags;

And when building, the following error is being thrown:

java.lang.NullPointerException
at com.citytechinc.cq.component.xml.XmlWriter.sanatize(XmlWriter.java:155)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:75)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.createElement(XmlWriter.java:133)
at com.citytechinc.cq.component.xml.XmlWriter.makeDocument(XmlWriter.java:147)
at com.citytechinc.cq.component.xml.XmlWriter.writeXml(XmlWriter.java:54)
at com.citytechinc.cq.component.maven.util.ComponentMojoUtil.writeElementToFile(ComponentMojoUtil.java:626)
at com.citytechinc.cq.component.dialog.util.DialogUtil.writeDialogToFile(DialogUtil.java:78)
at com.citytechinc.cq.component.dialog.util.DialogUtil.buildDialogsFromClassList(DialogUtil.java:178)
at com.citytechinc.cq.component.maven.util.ComponentMojoUtil.buildArchiveFileForProjectAndClassList(ComponentMojoUtil.java:239)
at com.citytechinc.cq.component.maven.ComponentMojo.execute(ComponentMojo.java:100)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Failed to notify spy org.netbeans.modules.maven.event.NbEventSpy: null
pmichelotti commented 9 years ago

Thank you for the submission. This issue has been corrected in version 2.7.0.

sharadkap commented 7 years ago

Hi,

This seems be a problem in 4.1.0 as well. Any fixes or missing dependencies? I have got component-addon in the maven as well.

Thanks, Sharad