on-internet
← Community

SolrException: An invalid XML character (Unicode: 0xffffffff) was found

Stack Overflow ·

I am passing a text file into Apache Solr and am getting the exception: SolrException: An invalid XML character (Unicode: 0xffffffff) was found I want to skip indexing the full content of this text file as a result. How do I find if a text file has this character in Java? To find Unicode 0xffff to fix a similar issue, I am currently using: File file = [somefile]; String contents = getContentsAsString(file); if (contents.contains("\uFFFF")) { [skip it] } I need to determine if a text file contains Unicode: 0xffffffff.

Comments

Sign in or sign up to comment and upvote.

No comments yet.