Reputation: 21
I'm trying to run Sonar 2.12 with Ant runner. Not using maven,But sonar target fails with an exception
Unable to read and import the source file : 'D:\JUnitDocletPoC\iLog_Client\src\
ava\com\junitTest\NameFinder.java' with the charset : 'UTF-8'.
at
at org.sonar.plugins.squid.JavaSourceImporter.importSource(JavaSourceImporter,java.)
at at org.sonar.plugins.squid.JavaSourceImporter.parseDirs(JavaSourceImporter,java)
at org.sonar.plugins.squid.JavaSourceImporter.analyse(JavaSourceImporter.java)
at org.sonar.plugins.squid.JavaSourceImporter.analyse(JavaSourceImporter.java)
This fails at all the java source files and charsets and not specific to any file/charset.
Can someone help ?
Upvotes: 2
Views: 4865
Reputation: 1
I faced same issue while running sonar-runner.By looking logs i found root cause of the issue as "Caused by: java.sql.BatchUpdateException: ORA-01691: unable to extend lob segmen t ITBASONAR.SYS_LOB0000289347C00003$$ by 128 in tablespace USERS". Well i simply increased size of tablespace USERS bu 1024 and everything worked fine.
Upvotes: 0
Reputation: 77961
Have you set the sonar.sourceEncoding parameter to UTF-8? If not, try setting it to Cp1252.
Cp1252 is the default encoding on windows machines. Unfortunately it's not completely compatible with UTF-8 (the default for most Java installations). Some windows based editors will write incompatible characters that trigger this kind of Java read error.
One common offender is the "£" symbol, which is part of the extended ascii character set. It therefore should be written as a two byte character under UTF-8 :-(
Upvotes: 3