You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Andrew Kennedy (JIRA)" <ji...@apache.org> on 2014/11/18 16:00:52 UTC
[jira] [Closed] (BROOKLYN-88) NoSuchMethodError:
brooklyn.entity.basic.ConfigKeys.newStringSensorAndConfigKey
[ https://issues.apache.org/jira/browse/BROOKLYN-88?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Kennedy closed BROOKLYN-88.
----------------------------------
> NoSuchMethodError: brooklyn.entity.basic.ConfigKeys.newStringSensorAndConfigKey
> -------------------------------------------------------------------------------
>
> Key: BROOKLYN-88
> URL: https://issues.apache.org/jira/browse/BROOKLYN-88
> Project: Brooklyn
> Issue Type: Story
> Reporter: David Medinets
> Assignee: Andrew Kennedy
> Priority: Minor
> Fix For: 0.7.0-M1
>
>
> I'm not sure if my question belongs here, but if you help I'd be grateful. I am trying to work with Clocker but running into the following exception:
> {noformat}
> Exception in thread "main" java.lang.NoSuchMethodError: brooklyn.entity.basic.ConfigKeys.newStringSensorAndConfigKey(Ljava/lang/String;Ljava/lang/String;)Lbrooklyn/event/basic/AttributeSensorAndConfigKey;
> at brooklyn.entity.container.DockerAttributes.<clinit>(DockerAttributes.java:48)
> at brooklyn.entity.container.docker.application.DockerfileApplication.<clinit>(DockerfileApplication.java:41)
> at com.affy.clockerplayground.MyPlayground$1.doBuild(MyPlayground.java:58)
> at brooklyn.entity.basic.ApplicationBuilder.manage(ApplicationBuilder.java:192)
> at brooklyn.entity.basic.ApplicationBuilder.manage(ApplicationBuilder.java:175)
> at com.affy.clockerplayground.MyPlayground.main(MyPlayground.java:62)
> {noformat}
> My Java code is this:
> {noformat}
> ManagementContext managementContext = Entities.newManagementContext();
> BrooklynLauncher launcher = BrooklynLauncher.newInstance()
> .managementContext(managementContext)
> .start();
> SshMachineLocation machine = managementContext.getLocationManager().createLocation(LocationSpec.create(SshMachineLocation.class)
> .configure("user", "david")
> .configure("address", "localhost"));
>
> FixedListMachineProvisioningLocation machinePool = managementContext
> .getLocationManager()
> .createLocation(LocationSpec
> .create(FixedListMachineProvisioningLocation.class)
> .configure("machines", ImmutableList.of(machine)));
>
> final EntitySpec dockerEntitySpec = EntitySpec.create(DockerfileApplication.class);
>
> final ConfigKey<String> DOCKERFILE_URL =
> ConfigKeys.newStringConfigKey("docker.dockerfile.url", "URL of a Dockerfile to use");
>
> StartableApplication app = new ApplicationBuilder() {
> //@Override
> public void doBuild() {
> addChild(EntitySpec.create(DynamicCluster.class)
> .displayName("Docker Application Cluster")
> .configure(DynamicCluster.INITIAL_SIZE, 2)
> .configure(DynamicCluster.MEMBER_SPEC, dockerEntitySpec)
> .configure(DockerfileApplication.DOCKERFILE_URL, "https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/UsesJavaDockerfile"));
> System.out.println("ASA");
> }
> }.manage();
> {noformat}
> And my pom.xml file is:
> {noformat}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.affy</groupId>
> <artifactId>ClockerPlayground</artifactId>
> <version>1.0-SNAPSHOT</version>
> <packaging>jar</packaging>
>
> <repositories>
> <repository>
> <id>cloudsoft-cloudfront-releases-repo</id>
> <url>http://developers.cloudsoftcorp.com/maven/releases/</url>
> </repository>
> <!-- optional for snapshot versions -->
> <repository>
> <id>sonatype-nexus-snapshots</id>
> <name>Sonatype Nexus Snapshots</name>
> <url>https://oss.sonatype.org/content/repositories/snapshots</url>
> <releases> <enabled>false</enabled> </releases>
> <snapshots> <enabled>true</enabled> </snapshots>
> </repository>
> <repository>
> <id>cloudsoft-cloudfront-snapshots-repo</id>
> <url>http://developers.cloudsoftcorp.com/maven/snapshots/</url>
> <snapshots>
> <enabled>true</enabled>
> <updatePolicy>never</updatePolicy>
> <checksumPolicy>fail</checksumPolicy>
> </snapshots>
> </repository>
> </repositories>
> <dependencies>
> <dependency>
> <groupId>io.brooklyn</groupId>
> <artifactId>brooklyn-core</artifactId>
> <version>${brooklyn.version}</version>
> <exclusions>
> <exclusion>
> <groupId>io.brooklyn.camp</groupId>
> <artifactId>camp-base</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>io.brooklyn</groupId>
> <artifactId>brooklyn-camp</artifactId>
> <version>${brooklyn.version}</version>
> </dependency>
> <dependency>
> <groupId>io.brooklyn</groupId>
> <artifactId>brooklyn-launcher</artifactId>
> <version>${brooklyn.version}</version>
> </dependency>
> <dependency>
> <groupId>io.brooklyn</groupId>
> <artifactId>brooklyn-test-support</artifactId>
> <version>${brooklyn.version}</version>
> </dependency>
> <dependency>
> <groupId>io.brooklyn.clocker</groupId>
> <artifactId>brooklyn-clocker-docker</artifactId>
> <version>0.7.0-20141116.231051-1</version>
> </dependency>
> </dependencies>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <maven.compiler.source>1.7</maven.compiler.source>
> <maven.compiler.target>1.7</maven.compiler.target>
> <brooklyn.version>0.7.0-M1</brooklyn.version>
> </properties>
> </project>
> {noformat}
> Any suggestions?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)