Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java spring数据解决方案创建了错误的url。添加两次核心名称_Java_Spring_Solr_Solrj_Spring Data Solr - Fatal编程技术网

Java spring数据解决方案创建了错误的url。添加两次核心名称

Java spring数据解决方案创建了错误的url。添加两次核心名称,java,spring,solr,solrj,spring-data-solr,Java,Spring,Solr,Solrj,Spring Data Solr,在我的spring data solr项目中, 我越来越 org.springframework.data.solr.未分类SolreException:来自 服务器:应为mime类型 应用程序/octet流,但得到text/html 任何操作出错时生成的URL。它包含两次核心名称 堆栈跟踪: <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Er

在我的spring data solr项目中, 我越来越

org.springframework.data.solr.未分类SolreException:来自 服务器:应为mime类型 应用程序/octet流,但得到text/html

任何操作出错时生成的URL。它包含两次核心名称

堆栈跟踪:

<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/preauth/preauth/select. Reason:
<pre>    Not Found</pre></p>
</body>
</html>
我的文档bean:

public interface SolrPreauthRepository extends SolrCrudRepository<Preauth, Integer> {

}
我的存储库:

buildscript {
    ext {
        springBootVersion = '1.4.3.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}
公共接口SolrLeauthRepository扩展了SolrCrudRepository{
}

这是由于当前版本的Spring Data Solr中存在错误造成的

一个潜在的解决方法是将构建脚本中的Spring启动版本更新到以前的版本,而不是v1.4.3.0版本

格拉德尔的例子:

repositories {
    maven { 
        url "https://repo.spring.io/libs-snapshot" 
    }
}


dependencies {
    compile('org.springframework.data:spring-data-solr:2.2.0.DATASOLR-364-SNAPSHOT')
}
更多错误信息:

这是一个已知的错误。 他们已经修复了它,但还没有发布。 您可以使用快照版本:


这是当前使用多核支持的实现中的一个缺陷。请尝试禁用多核支持。有关更新,请参阅
public interface SolrPreauthRepository extends SolrCrudRepository<Preauth, Integer> {

}
buildscript {
    ext {
        springBootVersion = '1.4.3.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}
repositories {
    maven { 
        url "https://repo.spring.io/libs-snapshot" 
    }
}


dependencies {
    compile('org.springframework.data:spring-data-solr:2.2.0.DATASOLR-364-SNAPSHOT')
}