Monday, July 21, 2008

Equinox P2 - Thanks for "Revert Configuration"

You know - there are some problems using P2, but today it was good using P2. After Updating to Mylyn 3.0.1 I couldn't open the Task List View:


(s.a. Bugzilla 241524)

But this is no problem - with P2 you're in luck: you can always revert to previous configurations:

Help | Software Updates | Installed Software | Revert Configuration



Find and select the configuration using Mylyn 3.0.0, hit Finish, restart Eclipse and you're done. Thats all you have to do !



... all runs as before :-)

Some asked why P2 doesn't remove unused bundles - think its clear now: P2 needs them to be able to revert to older configurations. Did you remember the old days before P2 how much time is costs to fix an update disaster ?

Thanks P2 :-) ...I saved much time.

ekke
in german

Friday, July 18, 2008

Logging (Riena - EasyBeans - Equinox) Reloaded



There are some improvements since blogging about

Catch-22 Logging with OSGI Frameworks:


Eclipse Riena:
Eclipse Riena (M3 here for OSX and here for Windows) has changed the dependency to log4J from Require-Bundle into Import-Package - now you can use any log4j bundle, per ex. log4J from SpringSource Enterprise Bundle Repository (S2).

EasyBeans:
EasyBeans Version 1.1.0 (Snapshot here) can now work with installations using Commons Logging and also log4J - the stacktrace „ No suitable Log implementation“ doesn't happen anymore.

Now you can use configurations like:

Riena + log4J + S2-commons-logging + EasyBeans + ow2-commons-logging
If you want to use ow2-commons-logging bundle from EasyBeans distribution, then you need also S2-commons-logging, because Jetty (Riena dependency) needs an import with version number, but ow2-commons-logging exports the packages without a version.

Riena + EasyBeans + log4J + S2-commons-logging
Now you can completely remove ow2-commons-logging and only use commons-logging bundle from SpringSource - this bundle works together with EasyBeans 1.1.0 and also Jetty. (I also prefer not to use ow2-commons-logging in this case, because there's a dynamic-import of log4j and its always good to try to use as less dynamic-imports as possible.)

Remarks:
Riena still uses a special log bundle (equinox.log_1.1.0.HEAD) - details see here.
Instead of commons-logging from S2 (SpringSource) you can also use the commons-logging bundle delivered by Eclipse.


Thanks to the teams of Riena and EasyBeans for soon fixing of bugs making the life of an Enterprise OSGI applications developers easier.

the blog in german

Wednesday, July 2, 2008

Eclipse Ganymede P2 Installer trouble

Today I tried again my workflow to install some shared installations and prepare a new blog about it.

Suddenly P2 Installer doesn't run any more. (you should read my blog Eclipse Ganymede - P2 Shared Installations (Bundle Pool) to understand the whole story ;-)

I deleted /configurations/.settings and /p2 from P2 Installer directory and started P2 Installer again. This time I got a message and was pointed to the .log file to be found in /configurations and there was really an error logged:

java.lang.OutOfMemoryError: Java heap space...

So I modified the p2installer.ini and added:

-Xms256m
-Xmx1000m
-XX:MaxPermSize=256m

Then I started again the P2 Installer

This time the installer downloads all plugins into my bundle pool location and then runs and runs and runs and runs ...

After some time I looked at the OSX activity monitor and noticed:

SWT (= P2 Installer Application) consumes 1 GB physical RAM and runs endless until I killed the task. Then I deleted the content of my bundle pool directory, the /configuration/.settings and /p2 from P2 Installer Directory.

...and started again:

Now it runs perfectly AND the P2 Installer asks at the end if I want to start the SDK :-)

Memory consumed was now only up t0 100 - 200 MB

Of course I did the next test and started P2 Installer again for the second (shared) installation and it also runs without any problems - memory consumed this time only 60 - 170 MB

You remember from my last blog Eclipse Ganymede - P2 Shared Installations (Bundle Pool) that always the first run of P2 Installer for shared installations quits without any message, the second run works well. From my experiences today it seems that it was a memory problem, but nothing was logged by P2 Installer. The installed Eclipse SDK runs without an error - but who knows if all was really correctly installed ?

I used TimeMachine to look back to .log files from previous installations, but never found a error msg that there isn't enough memory.

I added these informations to bugzilla 238947.

conclusion:
  1. add -Xms, -Xmx, -XX to the P2 installer (think the defaults from normal eclipse.app will be ok - not everyone can use 1000m like me ;-)
  2. if P2 Installer hangs: delete /configura/.settings and /p2 before restarting
  3. if P2 Installer disappears without any message: look into .log if there's something reported, dont rely on the installation, extend memory allocation, delete installed SDK and start again
ekke

hello planet eclipse

... perhaps someone has noticed that on monday the first time a blog from me appears at Planet Eclipse: "Eclipse Ganymede - P2 Shared Installations (Bundle Pool)"

I'm glad that I'm now listed at Planet Eclipse where I myself have learned so much from the experience of you all and I hope some of you will enjoy what I'm writing on...

I'm working as an independent software architect / business application developer since 30 years now and I'm using Eclipse since Version 2.

My actual project is a german ERP solution for small and medium sized companies of Waste & Recycling. The core of the application and also the developed openArchitectureWare cartridges will become open source (EPL).

The ERP solution is

  • model-driven (Eclipse Modeling Project, openArchitectureWare)
  • OSGI Client/Server Architecture (Equinox, Eclipse Riena, EasyBeans OSGI)
  • Business Process / Business Rules Driven (jBPM, Drools)
  • RCP Client (SWT/JFace, Eclipse Databinding, Instatiations SWT Designer)
  • ...

I'll report here about all what happens around the development of such a complex business application.

At the moment I'm fighting with P2 ;-)
...but I'm still thinking its worth to try

ekke
my blogs are also available in german