Fuseki failed with message “Parse error: [line:1, col: 1] Content is not allowed in prolog.“

Fuseki failed with message “Parse error: [line:1, col: 1 ] Content is not allowed in prolog.“

Recently, when uploading an rdf file with fuseki, the following error code occurred:

 failed  with message "Parse error: [line:1, col: 1 ] Content is not allowed in prolog."

I went to Google and found a pdf. Here is the link. It means that the problem can be avoided by changing the file suffix to .ttl. But the reason is not clear yet.
Attached is the original content of test.rdf.

@prefix ns1: <http://test.com/> .

ns1:node1 ns1:born ns1:1964 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Keanu-Reeves .

ns1:node101 ns1:born ns1:1947 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Takeshi-Kitano .

ns1:node102 ns1:born ns1:1968 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Dina-Meyer .

ns1:node103 ns1:born ns1:1958 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Ice-T .

ns1:node104 ns1:born ns1:1953 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Robert-Longo .

ns1:node106 ns1:born ns1:1966 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Halle-Berry .

ns1:node107 ns1:born ns1:1949 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Jim-Broadbent .

ns1:node108 ns1:born ns1:1965 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Tom-Tykwer .

The reason may be that file format may be confused.

Read More: