Archive for the ‘Eclipse’ Category

How to use Eclipse on ActiveMQ

January 26, 2008

ActiveMQ projectsSee ActiveMQ site to get started. You’ll need subversion, maven and of course eclipse before you begin. By default the maven repository is in your home directory, e.g., ~/.m2/repository.

Here are the steps:

svn co activemq
cd activemq
mvn eclipse:eclipse

Now fire up Eclipse and import the root folder of the ActiveMQ source folder. This will create about a dozen projects. But the Eclipse build will fail due to the variable M2_REPO not being defined. Just get the Properties of one of these projects, go to the Java Build Path and Add a Variable. Define this variable to be the location of your maven repository. After you do this all of the errors will disappear, you’ll still get 1700 or so warnings. But you know that in a lot of projects warnings are intended to be ignored.

You’ll also need to get the activeio sources. 

svn co activeio

You’ll need to import this project to Eclipse too (activeio/activeio-core).

Eclipse and Perforce plug-in

October 23, 2007

This morning, eclipse refused to start again on my Mac laptop. The following lines were in the .metadata/.log file:

!SUBENTRY 1 org.eclipse.ui.workbench 2 0 2007-10-23 14:50:10.999
!MESSAGE Conflict for '':

Deleting the .metadata/.lock file fixed the problem. I’m not sure what caused this problem, but deleting the .lock file did fix it.

Eclipse startup problem again

September 17, 2007

Yesterday I ran the MAC OS X Disk Utility program and Repaired the Permissions and the Disk. This morning Eclipse wont start. I get this error (~/your-workspace/.metadata/.log):

!ENTRY org.eclipse.osgi 2 0 2007-08-28 14:57:04.550
!MESSAGE While loading class "org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter",
     thread "Thread[Worker-1,5,main]" timed out waiting (5000ms) for thread
     "Thread[Worker-3,5,main]" to finish starting bundle
     "update@plugins/org.eclipse.mylyn.tasks.ui_2.0.0.v20070627-1400.jar [125]".
     To avoid deadlock, thread "Thread[Worker-1,5,main]" is proceeding but
     "org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter" may not be fully initialized.
!STACK 0 org.osgi.framework.BundleException: State change in progress for bundle
     "update@plugins/org.eclipse.mylyn.tasks.ui_2.0.0.v20070627-1400.jar" by thread "Worker-3".

There may be an easier way to fix this problem short of a re-download and re-install of eclipse and all of the plugins that you use. Re-install of eclipse and all of its plugins is the options that I took (Perforce, Tomcat, Mylyn, Subclipse/Mylyn integration and Subversion plugins). The Subversion plugin, however, wont install. It complains about missing Mylar integration component. I’ve installed Mylyn integration component (Mylyn is the new name for Mylar). There must be a more recent version of Subversion….

Eclipse startup problem

July 19, 2007

This morning I fired up eclipse on OS X, and it just disappeared after I selected my workspace. Searching the workspace log file in your-workspace/.metadata/.log showed the following error:

!ENTRY 4 0 2007-07-19 09:51:03.988
!MESSAGE Could not instantiate provider
for project your-project.

The only way out was to delete the .metadata folder and start eclipse again. Of course, once you’ve done this you’ll need to import your projects again. I’m not sure what has caused the perforce plugin for eclipse to fail, but it is really annoying that a failed attempt to instantiate the perforce plugin brings down the entire eclipse.

Eclipse Java builds on OS X

July 17, 2007

I fired up eclipse on OS X today and much to my surprise the project I’m working on failed to build by eclipse 3.2. In the Problems view, I saw this error:

Project XXX is missing the required library:

I’m not sure what this library is supposed to do and why all of sudden is missing. Here is how you can fix this problem:

  1. Upgrade to eclipse 3.3
  2. Open the eclipse Preferences... menu and select Java > Installed JREs...; make sure that eclipse can locate the OS X Java 1.5. If it cannot (as was in my case), you manually add it. It is in the following folder:
  3. Now open the project properties, and make sure that the QTJSupport.jar is no longer referenced in Java Build Path > Libraries > JRE System Libraries. If it is, you’ll need to remove the JRE System Library and add it again.

How to install Alfresco on OS X

April 25, 2007

Alfresco On OS XIt took a couple of tries to get Alfresco running on OS X with Tomcat 5.5.23, MySQL 5.0.37, and Eclipse 3.2.2. Here are the steps that you need to follow.

  1. Install MySQL (it is handy to also install the MySQL Administrator 1.2.11 and MySQL Query Browser 1.2.11)
  2. Install the latest supported Eclipse (3.2.2), the Subversion plugin and the Sysdeo’s Tomcat plugin.
  3. Download the source code for Alfresco 2.0 (via subversion). Build the the alfresco.war file. In Eclipse open the Alfresco’s common folder, right click on the build.xml file and select Run As… (or Debug As…) menu item. Tomcat/Virtual Tomcat Select the default Ant target but 1st you’ll need to define TOMCAT_HOME and VIRTUAL_TOMCAT_HOME environment variables. The VIRTUAL_TOMCAT_HOME is a new feature of Alfresco 2.0’s WCM (Web Content Management). What I did is to copy the Tomcat folder (called it apache-tomcat-5.5.23-virtual) and assigned VIRTUAL_TOMCAT_HOME to this folder.
  4. Initialize the database for Alfresco:
    create database alfresco;
    grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
  5. Configure Tomcat to run with bigger heap: -Xmn128M -Xms256M -Xmx640M Alfresco recommends a heap size of 512MB of heap (or more)
    JVM setting

  6. That is it. Now fire off Tomcat. You’ll see a three exceptions when Alfresco tries to set it self up as a NetBIOS (CIFS), FTP and SMB servers. You’ll need to either turn these Alfresco’s features off or take the steps (documented by Alfresco) to properly activate them.



April 7, 2007

ActiveMQ is a stand-alone JMS messaging service written in 100% Java. Spring, Tomcat and ActiveMQ offer a light weight alternative to a full blown application server. Here are the steps I took to configure this stack on my Thinkpad.

Here are the basic prerequisites:

  1. Download latest version of Tomcat (5.x or 6.x). Update the tomcat-users.xml file and add the “manager” rolename, and add this tole to the “tomcat” username. This change is required so that you can view the manager application: http://localhost:8080/manager/html
  2. Download the latest version of ActiveMQ (4.1.1).
  3. You’ll also need Maven to build ActiveMQ. Read the build instructions. Install the Eclipse plug-in for Maven using the Eclipse’s Software Update mechanism:
  4. Import the ActiveMQ projects in Eclipse and fire off a maven build. You can deploy the activemq-web-console servlet in Tomcat and then visit the ActiveMQ sample web monitor: http://localhost:8080/activemq-web-console-4.1.1/
    The web console also starts the ActiveMQ system, you can then send it messages and browse the messages using this web application.
  5. Download latest version of Spring (2.0.3) and install the Spring Eclipse plug-in from