Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJohn Clune
Courses Plus Student 4,951 Pointsapache.commons.csv does not exist.
D:\IntelliJ\ImportProjects\lcc-java-fp-highscores-1.0.3-FILTER\src\main\java\com\teamtreehouse\challenges\highscores\service\ScoreService.java
Error:(5, 30) java: package org.apache.commons.csv does not exist
Error:(6, 30) java: package org.apache.commons.csv does not exist
Error:(7, 30) java: package org.apache.commons.csv does not exist
Error:(8, 30) java: package org.apache.commons.csv does not exist
Error:(22, 37) java: package org.apache.commons.csv does not exist
Error:(22, 1) java: static import only from classes and interfaces
Error:(26, 11) java: cannot find symbol
symbol: class CSVParser
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(31, 18) java: cannot find symbol
symbol: class CSVRecord
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(35, 31) java: cannot find symbol
symbol: class CSVRecord
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(39, 27) java: cannot find symbol
symbol: class CSVRecord
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(43, 53) java: cannot find symbol
symbol: class CSVRecord
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(28, 67) java: cannot find symbol
symbol: variable RFC4180
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(28, 12) java: cannot find symbol
symbol: variable CSVParser
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(45, 7) java: cannot find symbol
symbol: class CSVPrinter
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(45, 32) java: cannot find symbol
symbol: class CSVPrinter
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
Error:(45, 48) java: cannot find symbol
symbol: variable CSVFormat
location: class com.teamtreehouse.challenges.highscores.service.ScoreService
I see this same question has been asked before and left unanswered. These are the errors I get after importing the file and running it.
Solved it without really any idea as to how or why. After half a dozen attempts of importing the folder I chose import via gradle instead. Clicked the prompt to update gradle wrapper. Went to build.gradle and accepted some other prompt about gradle dependencies. In project structure marked src as source folder. I have done this sequence of events (besides importing with gradle) a bunch of times before, this time it worked. Good luck to anyone else having this problem.
2 Answers
Oshedhe Munasinghe
8,108 PointsI had that horrible pain that too. Ok try this again if you have energy left 💪🏽 😤 Follow my steps and let me know if it is working. (Some had problem with Gradle because he was using the file from Download.)
Download fresh new file from treehouse Extract the file and copy to the folder: C -> Users -> (Your Username Foler) -> IdeaProjects
Then start IntelliJ click Import Project click Gradle chose right folder please look carefully my picture This is why some people get problem...!!!
When IntelliJ has loaded the file you will get this error, just click Upgrade Gradle Wrapper ...
Go to terminal and call gradlew then gradlew.bat and gradlew.dependencies ( I dunno why but just in case)
if you have got an error from Gradle something with JAVA_HOME path, check this post : JAVA_HOME for Windows
if you have got a funny icon like this
just put mark as source root
Go to Main.java and accept sdk ( I choose 13 )
Go build.gradle and accept their chose (check also gradlew.bat file sometimes if also suggesting something just accept that too)
Go to the right bar and find prepareSubmission and if you have got Execution failed that means you are ready to code your challenge!! :)
Good Luck!! 🚀 and let me know if it works!
John Clune
Courses Plus Student 4,951 Points@Oshedhe Munasinghe Thanks for taking the time to help out! It was definitely a major pain. I got it working yesterday though with a slightly different process.
"Download fresh new file from treehouse Extract the file and copy to the folder: C -> Users -> (Your Username Foler) -> IdeaProjects" <- Did this
"Then start IntelliJ click Import Project click Gradle" <- Did this but just chose the main folder and not the sub folder you chose
"When IntelliJ has loaded the file you will get this error, just click Upgrade Gradle Wrapper" <- Did this
"Go to terminal and call gradlew then gradlew.bat and gradlew.dependencies" <- I never tried this
"Go to Main.java and accept sdk" - <- Did this
"Go build.gradle and accept their chose (check also gradlew.bat file sometimes if also suggesting something just accept that too)" <- Did this for build.gradle but not gradlew.bat
"if you have got a funny icon like this just put mark as source root" <- I found that if you do the previous step first (going to build.gradle and hitting accept on that popup) it fixes the src root icon by itself
I did those steps for every project in the function course after that and never had an issue again. If I have trouble in the future I'll be sure to try the other steps you used.