[ https://issues.apache.org/jira/browse/SOLR-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Askia updated SOLR-12119: ------------------------- Description: Hi. I am trying to index some data with Solr by using SolrJ. But I have this error that I can't solve. ------------------------------------------------------------------------------------------------------------- Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at [http://localhost:8983/solr/#/corename:] Expected mime type application/octet-stream but got text/html. <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 405 HTTP POST method is not supported by this URL</title> </head> <body><h2>HTTP ERROR 405</h2> <p>Problem accessing /solr/index.html. Reason: <pre> Error 405 HTTP POST method is not supported by this URL</pre></p> </body> </html> at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:558) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:259) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248) at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:71) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:85) at indexsolr.index(indexsolr.java:33) at LoadData.toIndex(LoadData.java:102) at LoadData.loadDocuments(LoadData.java:72) at IndexLaunch.main(IndexLaunch.java:12) ---------------------------------------------------------------------------------------------------------- This is how I connect (I am in local): -------------------------------------------------------------------- SolrClient client = new HttpSolrClient.Builder("http://localhost:8983/solr/#/corename").build(); When I remove the "#" It throws a NullPointerException I have been struggling for a week with this indexing... was: Hi. I am trying to index some data with Solr by using SolrJ. But I have this error that I can't solve. ------------------------------------------------------------------------------------------------------------- Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/#/corename: Expected mime type application/octet-stream but got text/html. <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 405 HTTP POST method is not supported by this URL</title> </head> <body><h2>HTTP ERROR 405</h2> <p>Problem accessing /solr/index.html. Reason: <pre> Error 405 HTTP POST method is not supported by this URL</pre></p> </body> </html> at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:558) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:259) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248) at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:71) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:85) at indexsolr.index(indexsolr.java:33) at LoadData.toIndex(LoadData.java:102) at LoadData.loadDocuments(LoadData.java:72) at IndexLaunch.main(IndexLaunch.java:12) ---------------------------------------------------------------------------------------------------------- This is how I connect (I am in local): -------------------------------------------------------------------- SolrClient client = new HttpSolrClient.Builder("http://localhost:8983/solr/#/corename").build(); <!-- end snippet --> When I remove the "#" It throws a NullPointerException I have been struggling for a week with this indexing... > Error when indexing with SolrJ HTTP ERROR 405 > --------------------------------------------- > > Key: SOLR-12119 > URL: https://issues.apache.org/jira/browse/SOLR-12119 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: SolrJ > Reporter: Askia > Priority: Major > > Hi. I am trying to index some data with Solr by using SolrJ. But I have this > error that I can't solve. > ------------------------------------------------------------------------------------------------------------- > Exception in thread "main" > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error > from server at [http://localhost:8983/solr/#/corename:] Expected mime type > application/octet-stream but got text/html. <html> > <head> > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> > <title>Error 405 HTTP POST method is not supported by this URL</title> > </head> > <body><h2>HTTP ERROR 405</h2> > <p>Problem accessing /solr/index.html. Reason: > <pre> Error 405 HTTP POST method is not supported by this > URL</pre></p> > </body> > </html> > at > org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:558) > at > org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:259) > at > org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248) > at > org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149) > at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106) > at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:71) > at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:85) > at indexsolr.index(indexsolr.java:33) > at LoadData.toIndex(LoadData.java:102) > at LoadData.loadDocuments(LoadData.java:72) > at IndexLaunch.main(IndexLaunch.java:12) > ---------------------------------------------------------------------------------------------------------- > This is how I connect (I am in local): > -------------------------------------------------------------------- > SolrClient client = new > HttpSolrClient.Builder("http://localhost:8983/solr/#/corename").build(); > When I remove the "#" It throws a NullPointerException > I have been struggling for a week with this indexing... -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org