Reputation:
The project shows zero errors at compile time but when it starts to execute during build it crashes and says:
Module project_name production java.lang.NullPointerException: null elements are not allowed in THashSet
But the same project start working properly when I change its directory from D to C drive. Why this happen I'm unable to solve. Please help!
After comment this code it starts working and after disabling comment with no change in code it also works fine.
// if main db not loaded
if (!Get_db_path.Main_not_found && Db_Connect.conn == null) {
Sel_db.connect(); // selected database
Sel_db_error();
} // display error
Main_db_error(Get_db_path.Main_not_found);
GetToggleStatus();
Upvotes: 0
Views: 2919
Reputation: 1672
This happened suddenly to me at compile time when running the main
method.
I solved it in Intellj by just rebuilding the project.
--> Go to the Build menu and click on Rebuild Project.
Next time you run the main
method it should just work again.
Btw: I had this problem in another context: writing to ByteArrayOutputStream
with PrintWriter
.
Upvotes: 6