brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-88) NoSuchMethodError: brooklyn.entity.basic.ConfigKeys.newStringSensorAndConfigKey
Date Mon, 17 Nov 2014 09:44:34 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214458#comment-14214458
] 

Aled Sage commented on BROOKLYN-88:
-----------------------------------

For Brooklyn, you need to use the groupId `org.apache.brooklyn` rather than `io.brooklyn`.
It is currently pulling in the old pre-apache artifacts, which are no longer in sync.

I recommend also doing `mvn dependency:tree` and searching for `io.brooklyn`. None of the
brooklyn artifacts should use that (but `clocker` and `advanced-networking` will).

> 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
>            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)

Mime
View raw message