Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding <document-api> to basic-search-java causes error when running mvn package #3479

Closed
trygve opened this issue Sep 21, 2017 · 8 comments
Closed
Assignees
Milestone

Comments

@trygve
Copy link
Contributor

trygve commented Sep 21, 2017

<jdisc version="1.0"> <document-api/> <processing> <chain id="default"> <processor id="com.mydomain.example.ExampleProcessor" bundle="basic-search-java"> <config name="com.mydomain.example.example-processor"> <message>Hello, services!</message> </config> </processor> </chain> </processing> <nodes> <node hostalias="node1"/> </nodes> </jdisc>

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.27 sec <<< FAILURE! - in com.mydomain.example.ApplicationTest
requireThatResultContainsHelloWorld(com.mydomain.example.ApplicationTest) Time elapsed: 1.27 sec <<< ERROR!
java.lang.IllegalArgumentException: Could not create a component with id 'com.yahoo.document.restapi.resource.RestApi'. Tried to load class directly, since no bundle was found for spec: vespaclient-container-plugin. If a bundle with the same name is installed, there is a either a version mismatch or the installed bundle's version contains a qualifier string.
at com.mydomain.example.ApplicationTest.requireThatResultContainsHelloWorld(ApplicationTest.java:21)

@trygve trygve changed the title Adding <document-api> to basic-search-java causes error Adding <document-api> to basic-search-java causes error when running mvn package Sep 21, 2017
@bratseth
Copy link
Member

Welcome back Trygve :-)
@gjoranv this is why we should do the "container-dev" -> "container" thing I mentioned.

I guess it won't happen that soon - should we just add vespaclient-container-plugin dep to basic-search to avoid this, or add it to the documentation, or ...?

@gjoranv
Copy link
Member

gjoranv commented Sep 22, 2017

@bratseth This is the test classpath, not provided/runtime. I'll add vespaclient-container-plugin as a dependency in application for now, and move it to container-test when that is ready.

@geirst geirst added this to the soon milestone Sep 27, 2017
@huihuang01
Copy link

Has this issue been fixed or not? I encountered the same problem and fixed it by manually adding the dependency. Not sure if other people know how to do or not ...

@gjoranv
Copy link
Member

gjoranv commented Oct 13, 2017

This is work in progress. New maven artifacts for 3rd party developers will be available soon.

@Shastick
Copy link

Shastick commented Oct 16, 2017

One of the sample applications fails with a similar exception (see SO question at https://stackoverflow.com/q/46772244/1997056). Could it be related to this problem?

@gjoranv
Copy link
Member

gjoranv commented Oct 16, 2017

@Shastick, your problem is not related to this issue. I'll test the sample app and get back to you on SO.

@gjoranv
Copy link
Member

gjoranv commented Oct 18, 2017

From version 6.158.42, you can remove all dependencies with groupId com.yahoo.vespa from your project's pom.xml file, and instead insert the following:

        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>container</artifactId>
            <version>${vespa_version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.yahoo.vespa</groupId>
            <artifactId>container-test</artifactId>
            <version>${vespa_version}</version>
            <scope>test</scope>
        </dependency>

Please make sure that you have the vespa_versionor similar property defined in your pom.xml and update it to 6.158.42 or newer.

@trygve or @huihuang01 , could you please try to apply the proposed changes to your pom.xml?Thanks!

@gjoranv
Copy link
Member

gjoranv commented Nov 24, 2017

All sample apps have been updated to use 'container' and 'container-test' since vespa-engine/sample-apps#28

@gjoranv gjoranv closed this as completed Nov 24, 2017
arnej27959 pushed a commit that referenced this issue Jan 18, 2018
arnej27959 pushed a commit that referenced this issue Jan 18, 2018
arnej27959 pushed a commit that referenced this issue Jan 18, 2018
arnej27959 pushed a commit that referenced this issue Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Container and config
Awaiting triage
Development

No branches or pull requests

6 participants