Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 views
in Technique[技术] by (71.8m points)

netbeans - java.lang.NoClassDefFoundError from every class every day

I have tried reinstalling netbeans, I have tried reinstalling java. I'm not sure what's going on but I get this exception at random from every class until I restart netbeans. Anyone with similar problems?

run:

Exception in thread "main" java.lang.NoClassDefFoundError: com/company/utilities/formatters/DateFinder
    at com.protocase.db.DatabaseAdapter.<init>(DatabaseAdapter.java:44)
    at packagingqueries.PackagingQueries.getBatchIDsForOperation(PackagingQueries.java:42)
    at packagingqueries.PackagingQueries.main(PackagingQueries.java:20)
Caused by: java.lang.ClassNotFoundException: com.protocase.utilities.formatters.DateFinder
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Sometimes, the NetBeans local cache directory becomes corrupted (either because the application crashed earlier or because something else/undefined happened). NetBeans starts to behave strangely. Re-installing does not help, because the local cache directory is not always deleted.

If you are 100% sure your application does not have a path problem:

  1. Close NetBeans
  2. If you are on Windows go to c:Usersyouruserid.netbeans7.0 (else find the corresponding directory on your system)
  3. Delete the content completely
  4. Restart NetBeans

NetBeans will recreate the content of this directory. This may solve your issue. If it does not, then your issue is in the configuration of your application or in a corrupted library for sure.

If the location where these files are stored runs out of space for writing, this problem can arise. As usual, one needs to make space...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...