【问题标题】:Guice creation errors: CloudifyGuice 创建错误:Cloudify
【发布时间】:2013-03-16 20:41:40
【问题描述】:

我是 Guice 的新手,确实是 cloudify,我希望得到一个指针或区域来查看可能导致此问题的原因:

  1. 首先:

    No implementation for com.google.common.cache.LoadingCache<org.jclouds.ec2.domain.RunningInstance, org.jclouds.domain.LoginCredentials> was bound.
      while locating com.google.common.cache.LoadingCache<org.jclouds.ec2.domain.RunningInstance, org.jclouds.domain.LoginCredentials>
        for parameter 9 at org.jclouds.aws.ec2.compute.strategy.AWSEC2CreateNodesInGroupThenAddToSet.<init>(AWSEC2CreateNodesInGroupThenAddToSet.java:94)
      at org.jclouds.aws.ec2.compute.config.AWSEC2ComputeServiceContextModule.configure(AWSEC2ComputeServiceContextModule.java:96)
    
  2. 还有:

    No implementation for com.google.common.cache.CacheLoader<org.jclouds.ec2.domain.RunningInstance, org.jclouds.domain.Credentials> was bound.
      at org.jclouds.ec2.compute.config.EC2ComputeServiceDependenciesModule.credentialsMap(EC2ComputeServiceDependenciesModule.java:169)
    2 errors
    

1 的代码是:-

public class AWSEC2ComputeServiceContextModule extends BaseComputeServiceContextModule {
@Override
protected void configure() {
super.configure();
    installDependencies();
    install(new EC2BindComputeStrategiesByClass());
    install(new AWSEC2BindComputeSuppliersByClass());
    bind(ReviseParsedImage.class).to(AWSEC2ReviseParsedImage.class);
    bind(CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.class).to(
           CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.class);
    bind(EC2HardwareSupplier.class).to(AWSEC2HardwareSupplier.class);
    bind(EC2TemplateBuilderImpl.class).to(AWSEC2TemplateBuilderImpl.class);
    bind(EC2GetNodeMetadataStrategy.class).to(AWSEC2GetNodeMetadataStrategy.class);
    bind(EC2ListNodesStrategy.class).to(AWSEC2ListNodesStrategy.class);
    bind(EC2DestroyNodeStrategy.class).to(AWSEC2DestroyNodeStrategy.class);
    bind(InstancePresent.class).to(AWSEC2InstancePresent.class);
    bind(EC2CreateNodesInGroupThenAddToSet.class).to(AWSEC2CreateNodesInGroupThenAddToSet.class);
    bind(RunningInstanceToNodeMetadata.class).to(AWSRunningInstanceToNodeMetadata.class);
}

2 的代码是:-

@Provides
@Singleton
@Named("SECURITY")
protected LoadingCache<RegionAndName, String> securityGroupMap(
        @Named("SECURITY") CacheLoader<RegionAndName, String> in) {
    return CacheBuilder.newBuilder().build(in);
}

我最初的想法是它可能是路径中缺少或缺少项目的 jar 文件?任何指针和指导表示赞赏。这是在 Bootcamped IMAC 上的 Netbeans 7.3 betaJava 1.7GlassFishCloudify 2.5.0-SNAPSHOT、Windows 7 Professional 64 位上。

【问题讨论】:

  • 什么时候出现这些错误?运行 Cloudify CLI?哪些命令?您提到 Netbeans,您是否尝试在调试器中运行 Cloudify?

标签: glassfish guice netbeans-7 jclouds cloudify


【解决方案1】:

您的类路径中缺少一些 jar 文件。至少,您的类路径中的以下目录中应该有 jar 文件:

  • CLOUDIFY_HOME/lib/required/*
  • CLOUDIFY_HOME/lib/platform/esm/*
  • CLOUDIFY_HOME/lib/platform/cloudify/*

【讨论】:

    【解决方案2】:

    还要检查您使用的 Java 版本。如果它是 1.7u51 或更高版本,则它不适用于 cloudify 使用的 jclouds 版本,特别是 Guice(问题描述为 here)。

    恢复到较早的 JDK(1.7u45 或更低版本)应该可以解决它。

    【讨论】:

      猜你喜欢
      • 2013-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多