{"action":"opened","issue":{"url":"https://api.github.com/repos/ingenieux/beanstalker/issues/109","repository_url":"https://api.github.com/repos/ingenieux/beanstalker","labels_url":"https://api.github.com/repos/ingenieux/beanstalker/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/ingenieux/beanstalker/issues/109/comments","events_url":"https://api.github.com/repos/ingenieux/beanstalker/issues/109/events","html_url":"https://github.com/ingenieux/beanstalker/issues/109","id":198921429,"number":109,"title":"NPE when updating a worker environment","user":{"login":"szantopeter","id":69414,"avatar_url":"https://avatars.githubusercontent.com/u/69414?v=3","gravatar_id":"","url":"https://api.github.com/users/szantopeter","html_url":"https://github.com/szantopeter","followers_url":"https://api.github.com/users/szantopeter/followers","following_url":"https://api.github.com/users/szantopeter/following{/other_user}","gists_url":"https://api.github.com/users/szantopeter/gists{/gist_id}","starred_url":"https://api.github.com/users/szantopeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szantopeter/subscriptions","organizations_url":"https://api.github.com/users/szantopeter/orgs","repos_url":"https://api.github.com/users/szantopeter/repos","events_url":"https://api.github.com/users/szantopeter/events{/privacy}","received_events_url":"https://api.github.com/users/szantopeter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-05T10:22:26Z","updated_at":"2017-01-05T10:22:26Z","closed_at":null,"body":"I got the following NPE\r\n\r\n    [WARNING] FAILURE\r\n    java.lang.NullPointerException\r\n            at java.lang.String$CaseInsensitiveComparator.compare(String.java:1192)\r\n            at java.lang.String$CaseInsensitiveComparator.compare(String.java:1186)\r\n            at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:376)\r\n            at java.util.TreeMap.getEntry(TreeMap.java:345)\r\n            at java.util.TreeMap.containsKey(TreeMap.java:232)\r\n            at java.util.TreeSet.contains(TreeSet.java:234)\r\n            at br.com.ingenieux.mojo.beanstalk.util.EnvironmentHostnameUtil$1.apply(EnvironmentHostnameUtil.java:45)\r\n            at br.com.ingenieux.mojo.beanstalk.util.EnvironmentHostnameUtil$1.apply(EnvironmentHostnameUtil.java:42)\r\n            at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:338)\r\n            at com.google.common.collect.Iterators$7.computeNext(Iterators.java:645)\r\n            at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)\r\n            at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)\r\n            at com.google.common.collect.Iterators.size(Iterators.java:147)\r\n            at com.google.common.collect.Collections2$FilteredCollection.size(Collections2.java:221)\r\n            at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleResults(AbstractBeanstalkMojo.java:102)\r\n            at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:97)\r\n            at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:395)\r\n            at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:373)\r\n            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)\r\n            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)\r\n            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\n            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\n            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)\r\n            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)\r\n            at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)\r\n            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)\r\n            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)\r\n            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)\r\n            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)\r\n            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)\r\n            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)\r\n            at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)\r\n            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n            at java.lang.reflect.Method.invoke(Method.java:497)\r\n            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)\r\n            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)\r\n            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)\r\n            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)\r\n\r\nwhen calling \r\n\r\n    mvn beanstalk:upload-source-bundle beanstalk:create-application-version beanstalk:update-environment -X\r\n\r\nThe response from AWS is below\r\n\r\n    <Environments>\r\n      <member>\r\n        <SolutionStackName>64bit Amazon Linux 2016.09 v2.4.0 running Java 8</SolutionStackName>\r\n        <Description>spring-boot-aws-example</Description>\r\n        <Health>Green</Health>\r\n        <MinCapacityEnabled>false</MinCapacityEnabled>\r\n        <DateUpdated>2017-01-05T09:32:35.006Z</DateUpdated>\r\n        <AbortableOperationInProgress>false</AbortableOperationInProgress>\r\n        <Alerts/>\r\n        <DateCreated>2017-01-05T09:29:05.030Z</DateCreated>\r\n        <EnvironmentId>e-ayxggxizwy</EnvironmentId>\r\n        <VersionLabel>20170105092850</VersionLabel>\r\n        <Tier>\r\n          <Name>WebServer</Name>\r\n          <Type>Standard</Type>\r\n          <Version> </Version>\r\n        </Tier>\r\n        <EnvironmentName>szp-spring-boot-aws-example-dev-mvn</EnvironmentName>\r\n        <EndpointURL>awseb-e-a-AWSEBLoa-1T1PAORAB55PB-1682414751.us-east-1.elb.amazonaws.com</EndpointURL>\r\n        <CNAME>szp-spring-boot-aws-example-dev-mvn.us-east-1.elasticbeanstalk.com</CNAME>\r\n        <EnvironmentLinks/>\r\n        <ApplicationName>spring-boot-aws-example</ApplicationName>\r\n        <Status>Ready</Status>\r\n      </member>\r\n      <member>\r\n        <SolutionStackName>64bit Amazon Linux 2016.09 v2.4.0 running Java 8</SolutionStackName>\r\n        <Health>Grey</Health>\r\n        <MinCapacityEnabled>false</MinCapacityEnabled>\r\n        <DateUpdated>2017-01-05T09:31:37.667Z</DateUpdated>\r\n        <AbortableOperationInProgress>false</AbortableOperationInProgress>\r\n        <Alerts/>\r\n        <DateCreated>2017-01-05T09:13:07.851Z</DateCreated>\r\n        <EnvironmentId>e-mfpzrpbe2q</EnvironmentId>\r\n        <VersionLabel>20170103180325</VersionLabel>\r\n        <Tier>\r\n          <Name>Worker</Name>\r\n          <Type>SQS/HTTP</Type>\r\n          <Version> </Version>\r\n        </Tier>\r\n        <HealthStatus>Unknown</HealthStatus>\r\n        <EnvironmentName>Sample-env</EnvironmentName>\r\n        <EnvironmentLinks/>\r\n        <ApplicationName>spring-boot-aws-example</ApplicationName>\r\n        <Status>Terminated</Status>\r\n      </member>\r\n    </Environments>\r\n\r\nThe worker environment doesn't have a CName hence causing the NPE. By the way this environment is terminated so the code should ignore it anyway"}}
{"actor":{"display_login":"szantopeter"}}