- This topic has 3 replies, 2 voices, and was last updated 21 years ago by
Riyad Kalla.
-
AuthorPosts
-
etornickMemberI was making excellent progress on my web project. Writing an debugging servlets and java code. Everything was working well.
Then I tried something new. In one of my java beans I decided to put a main method so I could do sort of a unit test on the class without having to deploy and run on the server. I just did this to save time.
I selected the debug icon on the toolbar to just run the particular bean as a java application instead of selecting ‘start server’
It worked great for a few runs and then all of a sudden I started getting this error in file URLClassLoader.class
===============================================
protected Class findClass(final String name)
throws ClassNotFoundException
{
try {
return (Class)
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws ClassNotFoundException {
String path = name.replace(‘.’, ‘/’).concat(“.class”);
Resource res = ucp.getResource(path, false);
if (res != null) {
try {
return defineClass(name, res);
} catch (IOException e) {
throw new ClassNotFoundException(name, e);============================================
Now nothing runs anymore, I can’t run my code on the server, I cant debug my java bean.
It is as if the IDE is corrupted.
Problem is I am dead in the water now. I restarted eclispse, rebooted my machine….
This is not good…….
Any advise or help would be greatly appreciated.
– System Setup ——————————-
Operating System and version: Windows 2000
Eclipse version: 2.1.2
Eclipse build id: 200311030802
Fresh Eclipse install (y/n): y
If not, was it upgraded to its current version using the update manager?
Other installed external plugins:
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*:
MyEclipse version: 2.6.200
Eclipse JDK version: 2.1.1
Application Server JDK version:
Are there any exceptions in the Eclipse log file? NO– Message Body ——————————-
Riyad KallaMemberetornick,
This definately sounds strange. Just to let you know I develop like this all the time (adding a main method to test a class in a webapp) and it works fine, so you didn’t do anything wrong. What JDK version are you using? (drop to console and type ‘java -version’, above you wrote “2.1.1” which I would interpret to be your Eclipse version, but that you said was 2.1.2, so I’m not sure what 2.1.1 means above).Also two *suggestions* that can’t hurt:
1) Upgrade to Eclipse 2.1.3, there were around 54 bug fixes in that release over 2.1.2, one of these might be effecting you (although I doubt it).
2) Upgrade MyEclipse to 2.7.1 (You are running the RC2 release, and we fixed around 75 bugs between RC2 and 2.7.1 release)Lets try this:
0) Shutdown Eclipse if its running
1) Open up your Eclipse log file (<eclipse install>\workspace\.metadata\.log) in a text editor like TextPad (or Notepad).
2) Now start Eclipse (don’t do anything just yet)
3) Refresh (or reload if necessary) the log file, see if any new exceptions or messages were appended to the file. What were they?
4) Now in Eclipse, try and run your Java class
5) Check the log file again (reload if necessary) to see if a new exception was logged that might help us track down why the running of that class is dying.Did you try closing your project, restarting Eclipse, reopening your project, refreshing your project, then selecting “Project > Rebuild Project” to see if that helped? (incase the class file got corrupt?).
etornickMemberThanks for you advice. I shut down everything, rebooted my machine, reloaded MyEclipse and it started working again.
It’s been a few days and it has been working fine. No problems have come up since.
Riyad KallaMemberHey I’m glad to hear that, thank you for following up.
-
AuthorPosts