2017-02-04 3 views
0

私は、hereからRavenDB Javaクライアント3.2.1 jarファイルをダウンロードしEcpliseの新しいJavaプロジェクトを作成し、これらの三行RavenDB Javaクライアント行方不明のStringUtils

IDocumentStore store = new DocumentStore(ravenDbUrl, "todo-db"); 
store.initialize(); 
store.executeIndex(new TodoByTitleIndex()); 

を取った後、参照のリストにjarファイルを追加しましたhereから、その値をmy db固有の名前に置き換え、dbからの生命の徴候が予想されました。代わりに、私は "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils"を得ています。 私はJavaをやってからしばらくしてきましたが、確かにこれは明らかに明白なものが欠けているわけではありません。 私はcommons-lang3-3.5.jarファイルも含めましたが、それはそれを取っていません。あなたは正しい方向に私を指差してくれますか?

ありがとうございます!

+3

これらのすべての依存関係がRavenDB Javaクライアントによってrequredれhttp://i.imgur.com/SmjxBNr.png 3.2.1。かなり。 Maven(または同様の依存関係マネージャー)を使用してそれを処理させる必要があります。そうしないと、狂ってしまうでしょう。 –

+0

Slanec、ありがとう。私はそれが速い運動であることを望んでいましたが、私はMavenに戻って自分自身を知る必要があるようです。あるいは、MavenとEcpliseのデュエット。 –

答えて

0

Eclipseプロジェクトに「公式」ポームを追加すると、コンパイルされて実行されました。レコードの は、ここで誰かが調査するからベースを必要とする場合にポンポン、です:

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

    <parent> 
    <groupId>net.ravendb</groupId> 
    <artifactId>ravendb-parent</artifactId> 
    <version>3.2.1</version> 
    </parent> 

    <artifactId>ravendb-client</artifactId> 
    <name>RavenDB Java Client</name> 

    <properties> 
    <queryDsl.version>3.1.1</queryDsl.version> 
    </properties> 

    <dependencies> 
    <dependency> 
     <groupId>com.mysema.querydsl</groupId> 
     <artifactId>querydsl-apt</artifactId> 
     <version>${queryDsl.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-codec</groupId> 
     <artifactId>commons-codec</artifactId> 
     <version>1.7</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-lang</groupId> 
     <artifactId>commons-lang</artifactId> 
     <version>2.6</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-io</groupId> 
     <artifactId>commons-io</artifactId> 
     <version>1.3.2</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-beanutils</groupId> 
     <artifactId>commons-beanutils</artifactId> 
     <version>1.8.3</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.httpcomponents</groupId> 
     <artifactId>httpclient</artifactId> 
     <version>4.3</version> 
    </dependency> 
    <dependency> 
     <groupId>org.codehaus.jackson</groupId> 
     <artifactId>jackson-mapper-asl</artifactId> 
     <version>1.9.12</version> 
    </dependency> 
    <dependency> 
     <groupId>de.undercouch</groupId> 
     <artifactId>bson4jackson</artifactId> 
     <version>1.3.0</version> 
    </dependency> 

    <!-- test deps --> 
    <dependency> 
     <groupId>com.mysema.querydsl</groupId> 
     <artifactId>querydsl-collections</artifactId> 
     <version>${queryDsl.version}</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.11</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.reflections</groupId> 
     <artifactId>reflections</artifactId> 
     <version>0.9.9-RC1</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.mockito</groupId> 
     <artifactId>mockito-all</artifactId> 
     <version>1.8.4</version> 
     <scope>test</scope> 
    </dependency> 
    </dependencies> 

    <build> 
    <plugins> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>2.5</version> 
     <configuration> 
      <source>1.7</source> 
      <target>1.7</target> 
      <encoding>UTF-8</encoding> 
     </configuration> 
     </plugin> 
     <plugin> 
     <groupId>com.mysema.maven</groupId> 
     <artifactId>apt-maven-plugin</artifactId> 
     <version>1.1.1</version> 
     <executions> 
      <execution> 
      <id>querydsl-test</id> 
      <goals> 
       <goal>test-process</goal> 
      </goals> 
      <configuration> 
       <outputDirectory>target/generated-test-sources/java</outputDirectory> 
       <processor>net.ravendb.querydsl.RavenDBAnnotationProcessor</processor> 
       <options> 
       <querydsl.entityAccessors>true</querydsl.entityAccessors> 
       </options> 
      </configuration> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-jar-plugin</artifactId> 
     <version>2.4</version> 
     <configuration> 
      <archive> 
      <manifestEntries> 
       <Source-Hash>${sourceHash}</Source-Hash> 
      </manifestEntries> 
      </archive> 
     </configuration> 
     </plugin> 
     <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>versions-maven-plugin</artifactId> 
     <!-- version 2.2 has bug: https://github.com/mojohaus/versions-maven-plugin/issues/51 --> 
     <version>2.1</version> 
     </plugin> 
    </plugins> 
    </build> 
    <profiles> 

    <profile> 
     <id>pack</id> 
     <build> 
     <plugins> 
     <plugin> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <version>2.4</version> 
      <configuration> 
       <descriptors> 
       <descriptor>src/main/assembly/dist.xml</descriptor> 
       </descriptors> 
       <attach>false</attach> 
      </configuration> 
      <executions> 
       <execution> 
       <id>make-assembly</id> 
       <phase>package</phase> 
       <goals> 
        <goal>single</goal> 
       </goals> 
       </execution> 
      </executions> 
      </plugin> 
     </plugins> 
     </build> 
    </profile> 

    <profile> 
     <id>coverage</id> 
     <build> 
     <plugins> 
      <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>2.15</version> 
      </plugin> 
      <plugin> 
      <groupId>org.jacoco</groupId> 
      <artifactId>jacoco-maven-plugin</artifactId> 
      <version>0.6.2.201302030002</version> 
      <executions> 
       <execution> 
       <id>jacoco-initialize</id> 
       <goals> 
        <goal>prepare-agent</goal> 
       </goals> 
       </execution> 
       <execution> 
       <id>jacoco-site</id> 
       <phase>package</phase> 
       <goals> 
        <goal>report</goal> 
       </goals> 
       </execution> 
      </executions> 
      </plugin> 
     </plugins> 
     </build> 
    </profile> 
    </profiles> 
</project> 
関連する問題