Sunday, June 29, 2008

Eclipse 3.4 Ganymede and Subclipse 1.4

Well, quite some traffic is coming into my site from Google regarding Eclipse 3.4/ Ganymede and Subclipse. These people land on my Ganymede first impression article, but are more likely running into problems with the new version of Subclipse. For those people, I hope this page can provide you with a little guidance on how to get Subclipse to work with Ganymede. Bear with me, as the version numbers 1.4.x and 1.5.x of Subversion and Subclipse can become very confusing!

As of June 19th 2008, a new 1.4.x version of the Subclipse plugin has been published as the update site to use on the Subclipse web site. The link to the update site of the old version 1.2.x Subclipse plugin has disappeared. Now, for this new 1.4.x Subclipse plugin, the Subversion 1.5.0 client libraries and bindings are required!

I for one run Ubuntu 8.04 Hardy Heron, and that ships with Subversion 1.4.6. This means that if I were to install the new 1.4.x Subclipse plugin and opt to install the JavaHL adapter only (because that is the recommended adapter), it will not work:



The "Unable to load default SVN Client" message when running the 1.4.x Subclipse plugin with the JavaHL adapter only

There are various ways around this problem. The first option is to manually install the Subversion 1.5.x client libraries and add them to you library path. For Windows users, it is a simple matter of installing the new Subversion 1.5 client and making sure JavaHL is on the path. For Unix users, this workaround obviously defeats the purpose of having a distro with package management and requires manual installation of the libraries in the correct locations. So this solution might not be the recommended way to go for all.

The second alternative is to also install the SVNKit adapter. This immediately causes Subclipse to work, there is no need to uninstall the JavaHL adapter. Downside of this of course is that you are using a beta version of the adapter. Hopefully there will be a final version of this adapter and an update to Subclipse 1.4.x to include a stable SVNKit soon.

The third alternative is to stick to the old 1.2.x version of Subclipse. This version will work just fine with Ganymede and integrates with the new Mylyn version that ships with it. I was using this old version of Subclipse before in my reviews and daily work with the Ganymede release candidates, and it seemed to run without any problems whatsoever. The link on the Subclipse web site to version 1.2.x has however disappeared, but it is just a matter of replacing the 4 with a 2 in the update site's URL:


http://subclipse.tigris.org/update_1.2.x


I hope this explains things a bit more and solves any problems you may run into in getting Subclipse to work with Ganymede.

Update regarding Subversive (June 29th): An anonymous commenter pointed out one can use Subversive as well. Although it has little to do with getting Subclipse to work, it is indeed another option one could consider. For us Unix users whose package manager has given us a Subversion version other than 1.4.5, you may want to opt for Subversive's SVNKit connector. If you, like me, want Mylyn integration, you also need a second update site besides the one provided by Polarion. The update sites are:


http://download.eclipse.org/technology/subversive/0.7/update-site/ and
http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/


Subversive's goal is to eventually become the standard SVN team provider bundled with Eclipse. Although it is currently an incubator project, expect it to work well as it has been provided for a while now by the Polarion community!


Saturday, June 28, 2008

Eclipse Ganymede w00t DTP review!

This post is one of a number of reviews of the Eclipse Ganymede release. It has been added to the Ganymede Around the World map. Donate and become a Friend of Eclipse!

First an update and apologies for not posting more Ganymede stuff. I've been very, very, very busy lately, which is too bad as I don't get a chance to dive some more into Ganymede. As for the update: I have downloaded the Ganymede release train now, so no more release candidates, no more mister nice guy! This is where the rubber meets the road and the metal meets the meat ;-)

This time I'm posting about something that really rocks! I haven't had a chance to do much with DTP before. I always used external tools such as pgAdmin III, TORa and TOAD or the plain old SQL clients such as psql, sqlplus and gqlplus. I also tend to ask a database developer to do stuff for me instead of doing it myself. That is much safer, considering the fact that any queries I try to produce are amongst the worst the DB guys have seen! I can vividly recall the grimaces on some of their faces when confronted with my queries, full of devilish distincts, sneaky subselects, arduous aggregations and unwieldy unions!

But as I had just posted bugzilla 238890 on the use of the "Run" menu and toolbar for SQL queries, I decided to dig some more into DTP. I had seen some references to a query builder, something I have never seen in Eclipse before. As googling did not yield any immediate results as to how to use this thing or what it looks like, I decided I would take the plunge and try to get this thing to work.

The way to get the visual SQL query builder working in Eclipse is straightforward: create a SQL file and select a database, right click in the SQL editor, select "Edit in SQL Query Builder..." and lo and behold:



Visual SQL query builder in Eclipse Ganymede

This thing works remarkably well! Resizing the tables is a bit quirky, but a graphic display of the selected tables, joining them using drag and drop from FK to PK, selecting the fields, applying order, etc.!? I was astonished! I knew DTP had gotten better, more stable and more mature, but I did not realize that DTP had gotten to the level of visually building SQL queries already!


Conclusion

I really appreciate the things the DTP developers have achieved. I am no longer using external tools such as pgAdmin to do my database work. I can work on most of the things from within Eclipse without having to switch to external programs. I can create my SQL scripts in Eclipse, check them in to version control from within Eclipse and I can run them in Eclipse as well. All of this in one integrated package. This makes me very happy!

Sure, it's not the most polished database tool out there and there is lots more that can be done better. But the matter of the fact is that I can live with quirks if the component works good enough and empowers me to do more stuff in Eclipse itself rather than having to rely on external programs. The more I work with DTP, the more I feel this is the case. And that, my Friends of Eclipse, is a really good thing!


Friend of Eclipse benefits

Ganymede arrived and I wanted to download the release. I use a proxy server in Chicago, didn't feel like logging in as a friend, so I selected a U.S. mirror from the list. I can say that the download speed was terrible, probably due to the large amount of people downloading as it was just released.

I decided it was too slow to my liking and canceled my download. I logged into Friends of Eclipse and started the download from the Friends of Eclipse mirror. This time the speed was way better! I am currently downloading the modeling package, and decided to download from the Friends of Eclipse mirror straight away. And again, excellent download speed!

As a friend I also got a Friends of Eclipse email notifying me that I could download Ganymede the day before Ganymede became available to the general public. So as a friend I had early access as well.

So here's the benefits: faster download during busy times, early access to releases, notifications to let you know the release is there and the ability to carry the Friends of Eclipse logo. As an Eclipse fan, that logo of course is the best of 'em all ;-)



But besides that, I am able to give something back to the community, the foundation will be able to better their services, and who knows what other benefits friends may get in the future. If it is not for the benefits, you should still consider becoming a friend, just to give something back for the tremendous effort we have seen (Eclipse Zone)! So donate and become a Friend of Eclipse!

Aha, my download just finished! Off to doing more reviews of Ganymede!


Saturday, June 14, 2008

Eclipse Ganymede RC3 and the JBoss WTP Plugin

This post is one of a number of reviews of the upcoming Eclipse Ganymede release. It has been added to the Ganymede Around the World map. Donate and become a Friend of Eclipse!

First a little update on my Eclipse environment and Geronimo. I am running Eclipse Ganymede RC3 now, downloaded from the Friends of Eclipse mirror. I have also tried to install and run WebSphere Community Edition (based on Geronimo) in Eclipse, and that failed miserably as well...



Starting to get used to servers failing to start, this time WebSphere CE

But let's discuss running JBoss in Eclipse WTP. Adding a JBoss server is pretty straightforward and involves creating a JBoss runtime and selecting a location where JBoss is preinstalled. I still had JBoss 4.2 lying around somewhere, so that's the one I used. Once JBoss is installed, it runs out of the box.

Problems start when you change the port number in the server configuration from within Eclipse. Sometimes I have multiple servers (sometimes running at the same time), and port 8080 is already in use. So what does one do in such a case? One configures JBoss to run on a different port. Just open the server and change the HTTP port 8080 into 8090 and the RMI port 1099 into e.g. 1109, just like when configuring a Tomcat server to run on a different port. Unfortunately this does not work. You can start the server, it will start allright, but then the plugin somehow fails to see the server and kills it.



Error when the port number of the JBoss server is changed in Eclipse

This same problem appeared in the Europa release and I decided to dig into the problem some more. It seems that changing the port number in the server configuration page in Eclipse does not actually change the port number of the JBoss at all. It just tell the plugin that it should look at that port number to see if there's a JBoss running there. If I connect to localhost 8090 the connection is indeed refused, and instead JBoss is still running on port 8080. The server configuration inside the JBoss install directory still reflects port 8080 as well, so that explains a lot.

The JBoss plugin does not support having the server configuration in the Eclipse workspace (as far as I can tell). That means hacking or going about the old fashioned way of adding servers in the jboss/server directory and then selecting that configuration. I was hoping this could be done from within Eclipse without having to touch the JBoss install, but as far as I can see this can't be done.

Tomcat does support having the configuration outside the Tomcat install directory. This helps a great deal in case you had installed Tomcat using a package management system. In that case the ownership of the Tomcat install by default denies access to the files. Having the Tomcat configuration in the Eclipse workspace means you can avoid having to add yourself to some Tomcat group and manually changing the Tomcat install directory permissions to group writable.


Conclusion

This is a case where one WTP plugin behaves differently from the other. In the case of Tomcat, setting the port number in Eclipse changes the port number of the actual Tomcat server configuration (which can be held in the workspace), causing it to actually listen on the port specified in Eclipse. Setting the port number for JBoss in Eclipse does not change the actual JBoss port number. It only instructs the plugin to try to connect to JBoss using that port.

If you want to run JBoss, be aware of this. In case you only have one JBoss server that runs everything you have, you'll just want to leave it on port 8080. If you have multiple and different kinds servers, JBoss being one of them, you may want to have JBoss running on port 8080 and the others on different ports. In case this is not feasible, add configurations in the JBoss server directory and configure the correct ports there as well as in Eclipse.


Thursday, June 12, 2008

Server Runtime Problems in Eclipse Ganymede RC2

This post is one of a number of reviews of the upcoming Eclipse Ganymede release. It has been added to the Ganymede Around the World map. Donate and become a Friend of Eclipse!

After such a good start with Ganymede RC2, today was a bad day getting stuff done. I have tried to run various server runtimes, and I am not at all pleased at the current state of affairs with the web tools. Let's start where I left of in my previous post: I was to install Geronimo and see if things on the web tools front were improved. Geronimo comes with lots of cool Apache stuff such as ActiveMQ, so I want to develop using that app server in Eclipse.



Additional server runtimes available for Eclipse

When creating a server, you can opt to download additional runtimes such as GlassFish, Geronimo, WebSphere, etc. I see different versions of Geronimo, but I also see a "core package". I am a bit confused here as to what I am supposed to do. I guess I need both the core package and one of the server versions, so I select both the core package and version 2.1. After specifying a target directory, it downloads the stuff and installs it, or so I thought. Much to my surprise, Geronimo could not be selected as a server yet. It seemed that only the core packages were installed. I had to go through the additional runtime download again, this time only selecting the server. I was now able to add the Geronimo server and decided to add my test web project to it as well while it is prompting me for it. So far so good.



Download and install of Geronimo from within Eclipse

At this stage I want to start the server, but things go wrong from here. It just says that "the server failed to start". There are no additional details in the error log whatsoever. I tried to start Geronimo using bin/gsh geronimo/start-server from within the directory I had selected in Eclipse. This crashes due to some missing dependency. So maybe I did something wrong? Well, after this, I downloaded the minimal Tomcat/ Geronimo 2.1.1, unpacked it and started it without any problem whatsoever using bin/gsh geronimo/start-server. It happily reports "Geronimo Application Server started", so it is most certainly not something I am doing wrong.

Maybe if the download from within Eclipse is somehow incorrect, I can try using that Geronimo I had downloaded myself? Unfortunately no. Creating a server that uses the manually downloaded Geronimo fails, and again it just says that "the server failed to start". No log entries whatsoever. I finally tried to install the plugins manually from Apache's update sites. This informs me that there are all kinds of problems with the dependencies, and I get a feel that this could very well be related with the failure of the server to start. So much for my enthusiastic start with WTP.



Geronimo server failed to start

One problem is that the end user is given the expectation that it can download, install and run additional runtimes automagically. The additional runtimes dialog presents us with a list of available runtimes decorated with their logos. It gives the impression that this is "something that Eclipse can do". The expectation however is far from the reality, and the real issue is obviously with the third party plugins that are downloaded and not so much with WTP.

Conclusion

Some of the server runtime plugins supplied by third parties have problems with (this version of) Eclipse. I was never able to get them to work well or work at all with Europa, and they exhibit problems with this newer Ganymede release as well. So what good is a simultaneous release of the JEE bundle if there is no good support from the third party application servers such as e.g. Geronimo? Why provide fancy options to install stuff that just leads to disaster? What about the willingness and/ or ability of the third party vendor/ community to put effort in getting these plugins to work (in time for the release)? Getting the plugin providers to be part of the simultaneous release is very likely to be a bridge too far.



Trying to get Geronimo to work eventually broke my update manager to the point I had to reinstall Eclipse (clean start didn't help...)

JBoss does not work well either, but this post is getting too long, so I'll go into more details on that in the next one. I've still got many other thoughts on this as well and I intend to add them in a "grand conclusion" of my reviews of Ganymede RC2.


Tuesday, June 10, 2008

Eclipse Ganymede RC2 Data Tools

This post is one of a number of reviews of the upcoming Eclipse Ganymede release. It has been added to the Ganymede Around the World map. Donate and become a Friend of Eclipse!

More Eclipse Ganymede RC2 stuff reviewed, more stuff to blog about, and once again something I really appreciate! I was giving a Java basics course and got to the point of explaining JDBC, iBatis and PostgreSQL. For this course, I could not get the data tools to work with my postgres (8.3.1) database install. Adding the connection and pinging the database worked, but trying to navigate the database in the data source explorer failed miserably. This might have been an issue specific to (this version of) PostgreSQL, but to me it was yet another one of those things that didn't work with Europa. It forced me to switch between Eclipse and psql/ pgAdmin to run the scripts I had created in Eclipse, copying and pasting as I went along.

With Ganymede I have not only been able to add and ping my postgres 8.3.1 databases, I was able to browse them as well! It just works (TM), out of the box (R)! Now I can also set the connection info on my SQL scripts and execute them from within Eclipse: Just right click a .sql file and select "Execute SQL Files". Excellent!! One minor remark is that I would have expected to be able to run the SQL queries from the "Run" toolbar button (the first place I went looking). I'll check and see if a bugzilla exists, and if not, I'll register it as an enhancement and see if this is something worth adding in the future.



Browsing the PostgreSQL database structure

The SQL execution engine does not understand the psql specific \i syntax for including external files, but that's understandable as these queries are fired to the database via JDBC and not via psql. The \i is something psql knows about, the server does not, nor does DTP. As I use \i for my scripts to run in the correct order, I will have to find a way around this or try something completely different. For this one I will also check and see if an "include file" (not necessarily using a \i syntax) bugzilla exists. Again, if not, I'll create one and check if people care about such a thing.



SQL editor connected to a database


Conclusion

Besides these minor usability issues, I am again pleasantly surprised by something that is working rather than not. Like I said in my previous post, I have great hopes that this release will be in many ways more mature than the Europa bundle. I am starting to become more and more enthusiastic the more I use Ganymede! Another case deserving two thumbs up!

Some other things I've already been fiddling around with are the web tools, getting Tomcat to work and run a simple web application. So for my next post I'll have a closer look into WTP and see if this time I will be more successful installing, running and deploying to "Geronimoooooo!!!!!" ;-)


Monday, June 09, 2008

Friend of Eclipse

After all these years of using Eclipse and Eclipse based technology, I decided to do something for the Eclipse foundation and community. There is a friends of Eclipse program where you can donate $35 or more and become a friend. You get access to a friends of Eclipse mirror site and as an individual you are allowed to carry the friends' logo, which is what I'm gonna do on this blog ;-)



Become a friend of Eclipse as well! You'll help out the foundation and community around this great project. Donations can be made here:

http://www.eclipse.org/donate/index.php

Eclipse Ganymede RC2 First Impression

This post is one of a number of reviews of the upcoming Eclipse Ganymede release. It has been added to the Ganymede Around the World map. Donate and become a Friend of Eclipse!

Update regarding Subclipse and Ganymede (June 29th): It seems that a lot of traffic is landing on this page via Google regarding this topic. If you landed here because you are having trouble getting Subclipse to work, you may want to check this article.

The good folks over at Eclipse want reviews of the Ganymede release candidate. Now that's an excellent motivation to download and start using this new version of Eclipse. So without further ado, here's a hands on review of the new Ganymede RC2 build.

After downloading and unpacking the JEE bundle, I started Eclipse with my old workspace to see how the workspace migration would fare. All my Java projects are there, so that's a good sign. It could not fully restore the workbench layout though due to missing plugins that I did not install yet. My bad, time to install the missing Subversion plugin first. The other missing plugin, a LDAP browser, can wait. Setting the proxy now supports the use of the system proxy, a very welcome feature!

The software update and plugin install system has changed. This new system looks good. It is easy to use and get used to. Just go to "Available Software" and "Add Site...". The site configuration only allows for a URL, no longer a name. Entering http://subclipse.tigris.org/update_1.2.x adds the Subclipse update site. I now get an error about Buckminster, it looks like the Buckminster integration repository is gone.



Buckminster error

I also get to see the "Integrations (Optional)" and "Subclipse Plugin" twice. Removing the SVN site and adding it again solves the latter problem. The buckminster error disappeared as well. Checking Subclipse and Mylyn integration, and install!



Strange behavior after the Buckminster error, features are shown twice

Getting the plugin to work without restart causes some problems. I still have the old perspective button, and it is not functioning properly. After a restart, the perspective works (guess I am pushing my luck applying changes on the fly). Getting rid of the LDAP browser perspective button reveals some quirks as well. The "Close" menu on the perspective's button does not work, but I am able switch to it and then close it via the "Window" menu. Weird, but nothing too spectacular.

Checking my Mylyn tasks, I see that I am missing the Trac task repository that I had configured. This is probably due to the fact that the Trac connector is not there yet, so let's install that as well. This is where it gets a bit confusing. The installed software says I have Mylyn 3.0.0, but in the available software I only see version 2.3.2 for Eclipse 3.4. I wouldn't want to downgrade, so let's add the weekly Eclipse 3.4 update site then and see what happens.

After adding http://download.eclipse.org/tools/mylyn/update/weekly/e3.4 and selecting the Mylyn stuff I need, I get the message that my original request was modified, saying things like: "Feature X is already installed, so an update will be performed instead." Great! It will update my existing install with the Mylyn weekly updates! After installation the Trac repository from my old workspace automagically appears, together with the queries I had defined.



Mylyn back in business, old repositories and queries are restored

Java coding adds a range of small but very handy great time saving features, such as the string concatenation to string buffer conversion quick fix, automatic casts in the code completion, a quick fix for getter and setter generation, etc. The breadcrumb feature gives a means to browse source code with full screen editors, so no need to unmaximize to get to the package explorer, and then maximizing again. I can also imagine that this will work well for those who have smaller displays.



Showing off Mylyn active task focus and the String to StringBuffer conversion


Conclusion

This is just a first impression of Ganymede RC2 and I have just converted my old workspace, performed some basic tasks and tested some of the new features. I did run into some quirks here and there, but my overall impression so far is quite good. I was afraid that featurism combined with the daunting task of delivering this combined release would result in below par quality, but I am proven wrong so far. I have not (yet) run into major show stoppers. So there's hope that this release will be a step forward as far as the maturity of the various bundled components is concerned. There are no major changes in the appearance, and that is just fine with me. Java coding works pretty much the same, so I can pick up where I left in my old workspace. Add the time savers to that, and I am a happy coder.

So where is all this going? I have only touched a very small part of what is becoming a huge beast. Eclipse has come a long way ever since I started using version 2. At first it was yet another IDE, now it is a full fledged enterprise application development environment (if you wish, that is!). I have been very, very impressed with Mylyn. I have been using it since the very first release and it's great that it allows you to focus on the task and its associated resources at hand. Being part of an open platform itself, Mylyn integrates with other open platforms such as Trac. I am trying to setup Trac for task tracking and project management. The Trac connector brings all this task management straight into the development environment itself. So besides this beast becoming more technology and enterprisey, it also has the potential of becoming a true collaborative development platform that is connected via the web.

Eclipse has always been my favorite IDE ever since version 2, and by the looks of Ganymede it'll be my favorite IDE for many more years to come. Two thumbs up and let's hope this simultaneous release is going to be a huge success!