ingenieux/beanstalker

NPE when doing create-environment

mejmo opened this issue · 2 comments

mejmo commented

When no environmentName is specified I get always:

Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'environmentName' for goal br.com.ingenieux:beanstalk-maven-plugin:1.5.1-SNAPSHOT:create-environment are missing or invalid

If I specify the environmentName in properties, I get NPE

    <beanstalk.environmentName>defaultEnvironmentName</beanstalk.environmentName>
    <beanstalk.environmentId>environmentId</beanstalk.environmentId>
Caused by: java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
    at java.util.regex.Matcher.reset(Matcher.java:309)
    at java.util.regex.Matcher.<init>(Matcher.java:229)
    at java.util.regex.Pattern.matcher(Pattern.java:1093)
    at br.com.ingenieux.mojo.beanstalk.util.EnvironmentHostnameUtil.ensureSuffixStripped(EnvironmentHostnameUtil.java:65)
    at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.ensureSuffixStripped(AbstractBeanstalkMojo.java:221)
    at br.com.ingenieux.mojo.beanstalk.cmd.env.create.CreateEnvironmentCommand.executeInternal(CreateEnvironmentCommand.java:49)
    at br.com.ingenieux.mojo.beanstalk.cmd.env.create.CreateEnvironmentCommand.executeInternal(CreateEnvironmentCommand.java:33)
    at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.execute(BaseCommand.java:75)
    ... 25 more

Where is actually specified the environmentName value in AWS? Thanks.

See the archetype output and previous closed cases.

You don't need to set environmentId. Only environmentName and environmentRef

Thank you

I had the same problem; the root cause was that I didn't define a cnamePrefix property. The error message wasn't clear on that.