Home Forums Controller platforms ADSAL-OF-Plugins OpendayLight Controller – Neo4j

This topic contains 1 reply, has 2 voices, and was last updated by  Srini 3 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #836

    I want to link Opendaylight Controller and Neo4j, I have the classic example of LearningSwitch and I’m adding the logic to access the database Neo4j. When you test it independently, there were no problems. Now that I’m adding to “LearningSwitch”, the data access logic have problems when you start the controller (“run.bat”), my bundle “org.sdnhub.odl.learningswitch_0.1.0.SNAPSHOT” only installs(“INSTALLED”) but does not start and when I do it manually “start” the following message appears:

    id State Bundle
    126 INSTALLED org.sdnhub.odl.learningswitch_0.1.0.SNAPSHOT
    osgi> start 126
    gogo: BundleException: The bundle “org.sdnhub.odl.learningswitch_0.1.0.SNAPSHOT
    [126]” could not be resolved. Reason: Missing Constraint: Import-Package: org.co
    dehaus.jackson.map; version=”[1.9.0,2.0.0)”

    to My file POX.xml adicione:

    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>${bundle.plugin.version}</version>
    <extensions>true</extensions>
    <configuration>
    <instructions>
    <Import-Package>
    .
    .
    .
    **org.codehaus.jackson.map,
    org.neo4j.helpers.collection,
    org.neo4j.rest.graphdb,
    org.neo4j.rest.graphdb.util
    </Import-Package>**
    <Export-Package></Export-Package>
    <Web-ContextPath>/learningswitch</Web-ContextPath>
    <Jaxrs-Resources>,${classes;ANNOTATION;javax.ws.rs.Path}</Jaxrs-Resources>
    <Bundle-Activator>
    org.sdnhub.odl.learningswitch.internal.Activator
    </Bundle-Activator>
    </instructions>
    <manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
    <buildDirectory>../main/target/main-osgipackage/opendaylight/plugins/</buildDirectory> <!– TODO use pom var –>
    </configuration>
    </plugin>
    </plugins>
    </build>

    those 4 dependencies in my POX file, are required to access my Neo4j:

    org.codehaus.jackson.map,
    org.neo4j.helpers.collection,
    org.neo4j.rest.graphdb,
    org.neo4j.rest.graphdb.util

    Dependences on file POX are:

    <dependencies>
    <dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j</artifactId>
    <version>2.1.1</version>
    </dependency>
    <dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-rest-graphdb</artifactId>
    <version>2.0.0-M06</version>
    <exclusions>
    <exclusion>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.neo4j</groupId>
    <artifactId>server-api</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-kernel</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-lucene-index</artifactId>
    </exclusion>
    </exclusions>
    </dependency>
    <dependency>
    <groupId>org.opendaylight.toolkit</groupId>
    <artifactId>web</artifactId>
    </dependency>
    <dependency>
    <groupId>org.opendaylight.controller</groupId>
    <artifactId>sal</artifactId>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    </dependency>
    <dependency>
    <groupId>org.codehaus.enunciate</groupId>
    <artifactId>enunciate-core-annotations</artifactId>
    </dependency>
    <dependency>
    <groupId>org.opendaylight.controller</groupId>
    <artifactId>commons.northbound</artifactId>
    </dependency>
    <dependency>
    <groupId>org.opendaylight.controller</groupId>
    <artifactId>switchmanager</artifactId>
    </dependency>
    <dependency>
    <groupId>org.opendaylight.controller</groupId>
    <artifactId>forwardingrulesmanager</artifactId>
    </dependency>

    </dependencies>

    Can anyone tell me that has configuration I need?

    Thank you so much.

    Danny

    #850

    Srini
    Keymaster

    Hi Danny
    Sorry about the delay. The pom looks fine to me. It looks like the org.codehaus.jackson.map jar file is not installed in the plugins/ directory at the end of the compilation. Can you send me the pom that you use when neo4j is used independently?

    Srini.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Login with: