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

path-configuration fails to load configs from inside jars [DATAES-237] #811

Closed
spring-projects-issues opened this issue Feb 24, 2016 · 3 comments
Labels
in: core type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Feb 24, 2016

Joseph Moore opened DATAES-237 and commented

The new "path-configuration" field will resolve to a URI inside a jar when building multi-level maven projects where the first level contains the spring-data-es configuration xml and the elasticsearch yml. However, it will fail to load this jar with the current code. The PR #136, has the one-line fix that fixes this issue with reading the configs


Affects: 2.0 RC1 (Hopper)

Reference URL: #136

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Feb 26, 2016

Joseph Moore commented

adding the relevant stacktrace that occurs without this fix:

Caused by: java.nio.file.FileSystemNotFoundException: null
at com.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171)
at com.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157)
at java.nio.file.Paths.get(Paths.java:143)
at org.springframework.data.elasticsearch.client.NodeClientFactoryBean.loadConfig(NodeClientFactoryBean.java:87)
at org.springframework.data.elasticsearch.client.NodeClientFactoryBean.afterPropertiesSet(NodeClientFactoryBean.java:76)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Feb 26, 2016

Joseph Moore commented

adding updated PR against master now that changes are merged:
#137

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 20, 2016

Thiago Locatelli commented

My pom.xml configuration
Spring Boot version: 1.3.5.RELEASE
Spring Data Elasticsearch: 2.0.1.RELEASE (overriding manually since version 1.3.4-RELEASE does not use elasticsearch 2.0+)
Elasticsearch version 2.2.0 (overriding manually since spring-data-elasticsearch brings elasticsearc 1.5.2 to my maven dependencies.
Getting the same issue.

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.3.5.RELEASE</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>

		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-elasticsearch</artifactId>
			<version>2.0.1.RELEASE</version>
			<exclusions>
				<exclusion>
					<groupId>org.elasticsearch</groupId>
					<artifactId>elasticsearch</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		 	
		<dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>2.2.0</version>
        </dependency> 

Error message:

Caused by: java.lang.IllegalArgumentException: @ConditionalOnMissingBean annotations must specify at least one bean (type, name or annotation)
at org.springframework.util.Assert.isTrue(Assert.java:68)

@spring-projects-issues spring-projects-issues added type: bug in: core labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: bug
Projects
None yet
Development

No branches or pull requests

1 participant