question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PLUGIN_REGISTRY[language]()() KeyError: 'java'

See original GitHub issue
➜  aws-ec2-networkinsightspath git:(mainline) cfn test --endpoint https://ec2.us-east-1.amazon.com
=== Unhandled exception ===
Please report this issue to the team.
Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues
Please include the log file 'rpdk.log'
➜  aws-ec2-networkinsightspath git:(mainline) ls
README.md                        build.gradle                     inputs                           pom.xml                          rpdk.log                         src
aws-ec2-networkinsightspath.json canary-bundle                    lombok.config                    resource-role.yaml               settings.internal.json           template.yml
➜  aws-ec2-networkinsightspath git:(mainline) cat rpdk.log
[2021-06-03T17:47:39Z] DEBUG    - Logging set up successfully
[2021-06-03T17:47:39Z] DEBUG    - Running test: Namespace(version=False, subparser_name='test', command=<function test at 0x11f475a60>, verbose=0, endpoint='http://127.0.0.1:3001', function_name='TypeFunction', region='us-east-1', role_arn=None, cloudformation_endpoint_url=None, enforce_timeout='30', log_group_name=None, log_role_arn=None, passed_to_pytest=[], docker_image=None)
[2021-06-03T17:47:39Z] DEBUG    - Root directory: /Volumes/workspace/AWSCloudFormationResourceProvidersEC2NI/src/AWSCloudFormationResourceProvidersNetworkInsights/aws-ec2-networkinsightspath
[2021-06-03T17:47:39Z] DEBUG    - Loading project file '/Volumes/workspace/AWSCloudFormationResourceProvidersEC2NI/src/AWSCloudFormationResourceProvidersNetworkInsights/aws-ec2-networkinsightspath/.rpdk-config'
[2021-06-03T17:47:39Z] DEBUG    - Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/cli.py", line 100, in main
    args.command(args)
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/test.py", line 181, in test
    project.load()
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 413, in load
    self.load_settings()
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 202, in load_settings
    self.validate_and_load_resource_settings(raw_settings)
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 231, in validate_and_load_resource_settings
    self._plugin = load_plugin(raw_settings["language"])
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/plugin_registry.py", line 27, in load_plugin
    return PLUGIN_REGISTRY[language]()()
KeyError: 'java'
[2021-06-03T17:48:07Z] DEBUG    - Logging set up successfully
[2021-06-03T17:48:07Z] DEBUG    - Running test: Namespace(version=False, subparser_name='test', command=<function test at 0x11b105af0>, verbose=0, endpoint='http://127.0.0.1:3001', function_name='TypeFunction', region='us-east-1', role_arn=None, cloudformation_endpoint_url=None, enforce_timeout='30', log_group_name=None, log_role_arn=None, passed_to_pytest=[], docker_image=None)
[2021-06-03T17:48:07Z] DEBUG    - Root directory: /Volumes/workspace/AWSCloudFormationResourceProvidersEC2NI/src/AWSCloudFormationResourceProvidersNetworkInsights/aws-ec2-networkinsightspath
[2021-06-03T17:48:07Z] DEBUG    - Loading project file '/Volumes/workspace/AWSCloudFormationResourceProvidersEC2NI/src/AWSCloudFormationResourceProvidersNetworkInsights/aws-ec2-networkinsightspath/.rpdk-config'
[2021-06-03T17:48:07Z] DEBUG    - Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/cli.py", line 100, in main
    args.command(args)
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/test.py", line 181, in test
    project.load()
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 413, in load
    self.load_settings()
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 202, in load_settings
    self.validate_and_load_resource_settings(raw_settings)
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 231, in validate_and_load_resource_settings
    self._plugin = load_plugin(raw_settings["language"])
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/plugin_registry.py", line 27, in load_plugin
    return PLUGIN_REGISTRY[language]()()
KeyError: 'java'
[2021-06-03T17:48:14Z] DEBUG    - Logging set up successfully
[2021-06-03T17:48:14Z] DEBUG    - Running test: Namespace(version=False, subparser_name='test', command=<function test at 0x1171baaf0>, verbose=0, endpoint='https://ec2.us-east-1.amazon.com', function_name='TypeFunction', region='us-east-1', role_arn=None, cloudformation_endpoint_url=None, enforce_timeout='30', log_group_name=None, log_role_arn=None, passed_to_pytest=[], docker_image=None)
[2021-06-03T17:48:14Z] DEBUG    - Root directory: /Volumes/workspace/AWSCloudFormationResourceProvidersEC2NI/src/AWSCloudFormationResourceProvidersNetworkInsights/aws-ec2-networkinsightspath
[2021-06-03T17:48:14Z] DEBUG    - Loading project file '/Volumes/workspace/AWSCloudFormationResourceProvidersEC2NI/src/AWSCloudFormationResourceProvidersNetworkInsights/aws-ec2-networkinsightspath/.rpdk-config'
[2021-06-03T17:48:14Z] DEBUG    - Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/cli.py", line 100, in main
    args.command(args)
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/test.py", line 181, in test
    project.load()
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 413, in load
    self.load_settings()
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 202, in load_settings
    self.validate_and_load_resource_settings(raw_settings)
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/project.py", line 231, in validate_and_load_resource_settings
    self._plugin = load_plugin(raw_settings["language"])
  File "/usr/local/lib/python3.9/site-packages/rpdk/core/plugin_registry.py", line 27, in load_plugin
    return PLUGIN_REGISTRY[language]()()
KeyError: 'java'

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
PatMyroncommented, Jun 3, 2021

Try installing the language plugin as well: pip3 install cloudformation-cli-java-plugin --upgrade

0reactions
mgentry612commented, Jul 4, 2022

@kmjewell , I was able to reproduce following the tutorial here. I was able to fix the error by updating the Lombok version as suggested here.

Now I run into an error about an ambiguous method call injectCredentialsAndInvoke. After digging in, it looks like this this commit may have introduced the ambiguity: https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/pull/338.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running a python script from java produced KeyError
1 Answer 1 ... The second argument to Runtime.exec() is an array of stings containing the environment to pass to the child process....
Read more >
Deployed Versions Tile - "KeyError: 'environment_id' in" #42
When selecting an existing environment in the Deployed Versions Tile, an error is thrown which reads: 2017-01-25 09:27:23.384 ...
Read more >
[Solved] "KeyError:0" In Python With A Dictionary | Java Hungry
key error it's a type of runtime error that occurs when a key cannot be located in a dictionary. There are five primary...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found