Eclipse: Activator class is invalid


well, during my resurgent interest in my Esftp plugin, I found I couldn’t compile it, I solved the original problem in my last post on eclipse, you can find it here

Eclipse and Plug-in Dependency Fun

Well, after getting past that, I was onto victory, or so I thought, I could build the plugin fine now that I knew the problem with the Filesystem and FAT32 filesystems, however when I tried to run the plugin in a debug environment, I couldnt get anything to run, I could see the basic elements, but I could not see the workspace or project preferences panels, when I tried to open them I got a dialog saying it could not create them.

I was advised on #eclipse channel to use the -consoleLog option which will output any errors that I have when I am running my plugin, upon using this option, I got a whole bunch of errors, some of them nothing to do, but this one in particular was a problem.

!ENTRY org.eclipse.osgi 2 0 2007-07-16 22:54:27.236
!MESSAGE The activator com.antimatter_studios.esftp.Activator for bundle
com.antimatter_studios.esftp is invalid
org.osgi.framework.BundleException: The activator
com.antimatter_studios.esftp.Activator for bundle
com.antimatter_studios.esftp is invalid

Caused by: java.lang.ClassNotFoundException:
Root exception:
java.lang.ClassNotFoundException: com.antimatter_studios.esftp.Activator

So, basically, Eclipse was telling me that the Activator class for my plugin, was invalid, but I couldn’t see anything wrong with it, it was ok to me and it followed the rules of the Hello World test plugin I created, but still, it wouldnt load properly.

Here is the solution that I found and used, now my plugin exports properly, debugs properly, etc, etc. Good work team !

ok, after talking to paul webster on IRC, I found the solution, which was that on the build tab, at the top, you have two sections under “runtime configuration”, on the left, you have add library, it usually contains “.” as the only item, or more, but “.” is usually there. On the other side, you have add Folder, there was the problem, it was empty, upon adding “src”, which is the folder containing the plugin source code, I was able to finally get the plugin to work.

so I hope that helps some people and saves them from the problem I had.

See you next time!

Eclipse and Plug-in Dependency Fun


I have just had a load of fun, you see, I wanted to update my plugin ESftp with a new version, with FTP capabilities for example and I fired up eclipse and tried to open the original project. What I found was really weird.

import org.eclipse.ui;

This line in particular, said to me that it cannot import org.eclipse because it cannot be resolved!?!?!?! What???

Then, my whole source code tree lit up like a red christmas tree, red lights everything, NOTHING works, I cannot figure out what has happened, this is a disaster.

So, I created a new plugin project and started to look for differences, I found that in the new project, I had a “Plug-in Dependency” group which has like 30 jar files inside it, these are apparently the libraries which eclipse links against when it compiles my programs. So I think the reason why my project doesnt work is because the original DOES NOT HAVE THIS PLUGIN GROUP/CONTAINER.

So, I go looking for ways to reset my project, mayeb to trigger eclipse into working again, I try going through the file, the eclipse preferences, I run eclipse -clean, I try deleteing the workspace and adding the project to a blank workspace. In the end, I grabbed eclipse 3.3 europa (brand new release) and installed that, thinking that my distribution was just SO BROKEN that it could not be saved and I needed a new one.

So, now I create a new plugin project, aha, I have the Plug-in Dependency container and YES!!!! it’s full of the correct jar files I expect, so, I do what I thought was best and copied the files from the original project to the new project. I closed the eclipse editor to see if I could save the project in this state and then reopened it.


WHAT?!?!?! Where??? I just saved it and closed eclipse and it was RIGHT THERE. But now, it’s gone and there is nothing that can bring it back again, so I think I found a bug in eclipse. I took a copy of the project which works, just in case I thought eclipse would corrupt it and maybe if I had a copy, I would be able to test it and see the differences. I found eclipse made lots of changes to lots of files, but opening the original in eclipse gave me the same result, I had no plug-in dependency container again.

I have no idea what is going on here.

Then, I had a stupid idea, what if it was case sensitivity causing the problems? You see, I run the projects from my VFAT (FAT32, win98) formatted portable USB harddisk. Which of course, the filesystem cannot handle case sensitive names, so I thought, what if I tried to change the case of the names for the manifest, cause I remember that they are USUALLY IN CAPTIALS AND NOT SMALL LETTERS

That last sentence is the key, you see, once I changed the following items

  • meta-inf
  • meta-inf/

From lower case into


All of a sudden, my Plugin dependency container is back again and it’s full of jar files, ready to link.

THAT WAS THE REASON, so if you have a similar reason in the future, check the case for the filenames and change them back to upper case and see if that fixes your problem, cause it fixed mine, only 2, 3, hours of my working day wasted. But nevermind

Pinging Windows Network Machines from linux


ok, I have just found an excellant piece of info, what I found was that I was setting up a SAMBA server to run as a file server for all the other machines, but I couldn’t ping the Windows Machine name from linux, so I have a machine called “Albert” and I want to ping it, I don’t know it’s IP yet, so what do I do? Thats right, you guessed it, this:

ping albert

Now,the problem with that is that sometimes you’ll find it doesnt work, it’ll say it cannot find it and cannot ping it as a result, so what to do in order to fix it? Well, This is the page and information I came across just ten minutes ago, which resolves the problem

URL: Here

the part of interest would be
“…and the “wins” parameter needs to be added to the “hosts:” line in the /etc/nsswitch.conf file”

so then…
grab you favorite editor
edit your /etc/nsswitch.conf file
search for the line starting with hosts (my line was like this “hosts: files dns”)
add “wins” to the line (”hosts: files dns wins”)

Da daaaa!!! now trying….

[root@server home]# ping albert
PING albert ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=128 time=0.240 ms
64 bytes from icmp_seq=2 ttl=128 time=0.237 ms
64 bytes from icmp_seq=3 ttl=128 time=0.236 ms
64 bytes from icmp_seq=4 ttl=128 time=0.236 ms

These little gems you find on the net! Good luck with your SAMBA setup!

Why does Nautilus take so long to show large directories?

Well. I am sitting here wondering why Nautilus takes about 8 seconds to show the contents of my Home Directory, I know there are a lof of files in there, but it’s worse with my Downloads directory, which takes even longer, but Windows doesnt have a problem here, showing the contents within 2 seconds, it takes Nautilus about 10-12 to show my Downloads directory.

Now, some of you people might think, what, 10 seconds? Jees, are you THAT impatient?!?!?

Well, my reply would be that being impatient for a bus to arrive and take you to work is something that most people have done before and they agree that well, time takes time and buses are bound by the laws of the universe, but what if you had TWO bus companies, one which arrived as soon as you got to the station and the other, on their own timetable. What would you say about the two bus companies then?

See, thats my problem, it’s not that it takes 10 seconds to open the view, it’s that it takes windows 2, max, so I am waiting 5x more for Nautilus to open the same window. Even with thumbnails it produces turned off it takes the same amount of time

It’s a contrast issue, windows browsing my files is just _FASTER_ and when you are looking for a file, do you like 10 second pauses in your search for that file?? what if you had to open the directory say 5 times, looking into subdirectories? well, you know how file navigation can be a bit of hit and miss sometimes, so it’s possible that you could end up waiting a lot longer than the 10 seconds…

Improvements here would make my life a lot better.

Cannot start Eclipse

Weird thing this morning, started Eclipse, like usual, using my PortableProgram frontloader and I got an error from the past, an error, I happen to know made me reinstall eclipse from a backup cause I couldnt find the real cause. The error was that eclipse cannot be started and I had a log of the error in the file:


Looking at this file, I found LOOOOOOOOADS of errors, all relating to not being able to find the plugin information it needs to start, which was blocking Eclipse from functioning properly. Here is a snippet if you recognise something similar, maybe this solution will help you as well as it helped me.

[chris@chris eclipse]$ cat /media/Shadows/projects/work/bluemedia/workspace/.metadata/.log
!SESSION 2007-06-21 01:00:48.101 ———————————————–
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=es_ES
Command-line arguments: -os linux -ws gtk -arch x86

This is a continuation of log file /media/Shadows/projects/work/bluemedia/workspace/.metadata/.bak_0.log
Created Time: 2007-06-21 01:01:21.205

!ENTRY org.eclipse.osgi 4 0 2007-06-21 01:01:21.206
!MESSAGE Application error
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer
at org.eclipse.core.internal.runtime.PlatformActivator$
ETC, ETC, ETC, ETC, ETC……………..

!ENTRY org.eclipse.osgi 2 0 2007-06-21 01:01:22.332
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2007-06-21 01:01:22.332
!MESSAGE Bundle update@plugins/ was not resolved.
!SUBENTRY 2 2 0 2007-06-21 01:01:22.332
!MESSAGE Missing required bundle org.eclipse.datatools.connectivity.oda_[3.1.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2007-06-21 01:01:22.333
!MESSAGE Bundle update@plugins/ was not resolved.
!SUBENTRY 2 2 0 2007-06-21 01:01:22.333
!MESSAGE Missing required bundle[3.0.4,4.0.0).

So, you can imagine what I am thinking, this worked perfectly 5 hours ago, I closed Eclipse, now it doesnt work.

Well, the solution in the end was quite simple, what I did was I deleted the directory


and Re-ran eclipse, I was confronted with the choose a workspace dialog, I selected a workspace and it opened without any of those problems.

I am not entirely sure of why this is caused, but at least I know a way to stop and prevent it!!!


Even though now you can run Eclipse, you still cannot open the affected workspace. I have found that there is actually a relationship between this crash and a file called a .snap file that is contained inside the workspace directory you are trying to open. If you delete the file


(if it exists)and attempt to open the workspace again, it’ll work, UNFORTUNATELY, all your projects are now missing and I am sure deleting that file will erase ALL your project settings (it has to me in this instance). But if you cannot even open the workspace, it might be easier for you to recreate them than to create a brand new workspace, it’s up to you which solution you use, I’ll have to investigate this further the next time it happens.
Ciao for now!

SSH + Java + GCJ = Mac Corrupt on Input

Well, I had another GCJ problem today, here is what happened

I was running eclipse, which is my main development platform and I was trying to use the plugin I wrote, eSFTP when I was never being able to verify the connection, always getting “Connection Failed”.

On opening the OSGi console, I found that I was getting the

“Mac Corrupt on Input”

Whenever I tried to connect, I looked this up on the net and found that people described it as the network link is correct, but then the mac information gets corrupted whilst being transported from the network link level, to the operating system level.† I was a little dumbfounded, not having a clue what could be causing this problem.

I ran eclipse again and then opened the configuration information for eclipse, which is the in the

Help -> About

screen and I found that it was running GCJ as the java VM, which is not really what I wanted, because I always run with the Sun VM now, because of the problems I had with open office.† Which you can read about here.

So, ok, now I forced Eclipse to use the Sun VM and tried again, magically, everything worked and I am able to use eSFTP again without any problems.

I cannot explain _WHY_ this is the case, but it’s just something I came across recently and thought I would share with you, see if it helps you out.

The great spain Mobile Robbery


I have some excellant advice for those who are thinking to purchase a mobile phone in Spain. Now, for all of you who have lived here a while you might have noticed a pattern, it’s quite unfortunate, but it’s a big reason why most people get ripped off whilst living here. I shall try to explain what it is.

You see, in Spain, people like to be generous, very generous. They are a great people and my girlfriend, who is Catalan (a region of spain which contains Barcelona, it’s near the french border for all those who are geographically challenged), is a great example of how generous, her parents, show again, just how generous and great these people are.

But they mostly have a curse, something which plagues them and makes them pay more than they should for things which don’t normally cost that much. It’s because they are used to paying high prices, they don’t demand the price be lower. A quick headline would be something like this

If you want a brand new Nokia N95 for about 200? and 25? a month with about 500 minutes of free calls and 500 free SMS messages, STOP PAYING 700? FOR THE BLOODY THING!!!

Now, the cleverer of you might realise what that statement is trying to say, without being insulted, you see, in Spain, paying more for less is something they do all the time. I quote a recent inquiry from Movistar, a mobile opeator in Spain

Operator: We would like you to sign up for a contract with us

Me: Ok! Tell me what I can get

Operator: We can offer you some great handsets, such as <This crappy handset>, <Just as crappy handset> or <Another crappy handset>

Me: Erm, are you serious? they are all awful handsets

Operator: No no, they are the latest handsets you can get, they have bluetooth, GPRS (LOL) and a camera

Me: I shall try to explain you something, what kind of camera?

Operator: usually 1 mega pixel or something, they are very good

Me: My Current phone has a 2 Mega pixel camera, you see my point? they are awful and worse than my current phone

Operator: Well, I guess if you are more technically minded, we can offer you another

Me: Ok! Great! I want the Nokia 6288, or the Nokia N73, cause they are great handsets


we don’t have the N73, but we can offer you the 6288 for 129?Me: 129? !!! for a 6288??? WITH A CONTRACT??? Ok, it had better be a great contract

Operator: Well, we can offer you this for 15? a month

Me: Hmm, ok, sounds cheap, how many free minutes or SMS text messages

Operator: None

Me: <stunned silence>pardon?

Operator: They don’t come with any free minutes or text messages

Me: So what am I paying you 15? a month for? Fun?

Operator: Because the calls are cheap

Me: HAAAHHAHAHAHA (seriously, I laughed like that) Are you Serious??

Operator: It’s a really good deal, it’s cheap

Me: No, it’s not cheap, it’s expensive cause I am paying for all my own calls, look, I think you need something explained here,

I am not interested in what YOU think is a good deal, I am only interested in what *I* think is a good deal and what you think doesn’t matter at all.

I couldn’t care less, I want the following, I Want the Nokia 6288 WITH 500 minutes of calls, WITH 500 SMS text messages, PER month and I will pay you around 30? a month, plus I am only going to pay about 50 euros for the phone.

Operator: I can’t offer you that

Me: You have your priorities wrong, if you don’t offer me it, someone else will and you’ll lose a customer, forever, cause I won’t forget your attempt to enslave me(seriously)

Operator: Maybe a customer store can better help you, but I cannot offer you that phone on those terms over the phone

Me: Ok, I will goto the shop

Which pretty much concludes our trip through memory lane, I was astonished, that someone in spain would consider that a good deal, that someone might actually think, wow, it sounds great!!! Sign me up for 18 months!!! How about NO! it doesnt sound good, it sounds really awful and I am sick of it, Vodafone aint no different, although they are a huge margin ahead of Movistar, who act like the BT of old where you pay what they offer cause you don’t have a choice.

That is, my friends, where the problem comes, in Spain, there is barely any choice, therefore, companies steal your money, cause you have no choice but to either accept their terms, or to go without a phone service.

Spain needs to wake up, start DEMANDING better service and USE YOUR FEET to tell them what you think, don’t just accept the contract cause it’s “ok” accept it because you KNOW it’s a good contract and if it’s not, DEMAND BETTER!