You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Zahra Aminolroaya <z....@gmail.com> on 2018/07/03 12:49:36 UTC

Errors when using Blob API

I want to transfer my jar files to my ".system" collection in "Solrcloud".
One of my solr port is 1111

My jar file name is "norm", and the following is my command for this
transfer:
/
curl -X POST -H 'Content-Type:application/octet-stream' --data-binary
@norm.jar http://localhost:1111/solr/.system/blob/norm/

*However, I get the following error:*

/<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="error"><lst name="metadata"><str
name="error-class">org.apache.solr.common.SolrException</str><str
name="root-error-class">org.apache.solr.common.SolrException</str></lst><str
name="msg">URLDecoder: Invalid character encoding detected after position 0
of query string / form data (while parsing as UTF-8)</str><int
name="code">400</int></lst>
</response>/

It is surprising that when I try to transfer the lucene jar files I also get
different errors as follows:

*for example, when I write the command:*

/curl -X POST -H 'Content-Type:application/octet-stream' --data-binary
@lucene-core-6.6.1.jar http://localhost:1111/solr/.system/blob/lucence/

*I get the following error:*

/<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="error"><lst name="metadata"><str
name="error-class">org.apache.solr.common.SolrException</str><str
name="root-error-class">org.apache.solr.common.SolrException</str></lst><str
name="msg">application/x-www-form-urlencoded content length (2783509 bytes)
exceeds upload limit of 2048 KB</str><int name="code">400</int></lst>
</response>/
*
or when I use the following command:*

/curl -X POST -H 'Content-Type:application/octet-stream' --data-binary
@slf4j-api-1.7.7.jar http://localhost:1111/solr/.system/blob/slf
<?xml version="1.0" encoding="UTF-8"?>
<response>
/
*I get the following error:*

/<lst name="error"><lst name="metadata"><str
name="error-class">org.apache.solr.common.SolrException</str><str
name="root-error-class">org.apache.solr.common.SolrException</str></lst><str
name="msg">URLDecoder: Invalid digit (#19;) in escape (%) pattern</str><int
name="code">400</int></lst>
</response>/

What are these errors for even when I use the lucene default jar files?!!!

Is there any other way to insert jar files to .system collection?








--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Errors when using Blob API

Posted by Zahra Aminolroaya <z....@gmail.com>.
Thanks shawn. I removed the space from header because I got another error. I
finally used "Content-Type: application/octet-stream" instead of
'Content-Type: application/octet-stream' and all of errors even the space
limit error solved.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Errors when using Blob API

Posted by Shawn Heisey <ap...@elyograg.org>.
On 7/3/2018 6:49 AM, Zahra Aminolroaya wrote:
> I want to transfer my jar files to my ".system" collection in "Solrcloud".
> One of my solr port is 1111
>
> My jar file name is "norm", and the following is my command for this
> transfer:
> /
> curl -X POST -H 'Content-Type:application/octet-stream' --data-binary
> @norm.jar http://localhost:1111/solr/.system/blob/norm/
>
> *However, I get the following error:*

Comparing your command with what's in the documentation, I see two
differences.

Try adding a space to the header, so you have this option:

-H 'Content-Type: application/octet-stream'

Without the space, Solr may not be interpreting the input as the correct
type.

Also, you probably should remove the trailing slash from the URL:

http://localhost:1111/solr/.system/blob/norm

The error you get with the Lucene jar happens because the file is larger
than 2MB, which is Solr's default limit on the size of a POST request
entity.

I think the error with the slf4j jar may be essentially the same as the
error with your custom jar -- the Content-Type header might be badly
formed, so when it tries to interpret the data according to whatever
type it defaults to, it fails.  The contents of the slf4j jar are
different than the contents of your custom jar, so it has a slightly
different complaint.

If fixing the header and the URL don't help, then please share any
errors found in solr.log after that change is made.  There may be better
information there than you receive in the response.

Thanks,
Shawn