Eclipse not starting (no error message)

Recently, I had a strange behaviour with my Eclipse installation. I think the error occurred after I had to kill Eclipse due to some issue during a build. Afterwards Eclipse was unable to restore the workspace.

If you run into the same issue try these three things:

  1. Try to delete the following folder:
    <Workspace DIR>/.metadata/.plugins/org.eclipse.core.resources/.snap
  2. If error still persists and using Eclipse 4 delete following file aswell:
    <Workspace DIR>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
  3. Create a new workspace and import projects. If you did set the broken workspace as default open the following file:
    <Eclipse Home>\configuration\.settings\org.eclipse.ui.ide.prefs

    In this file search for preference SHOW_WORKSPACE_SELECTION_DIALOG and set it to true.

git svn – Subversion repository moved, what should I do?

As I prefer Git as version control system I often end up working with it as client for Subversion (SVN) repositories. Recently, I had to interact with a SVN repository which was moved to another location after my initial cloning.

As Git stores the SVN URL and includes it into the SHA-1 hash calculation you can end up having the following problem as soon as you change the repository URL and try to push your changes to the remote repository:

Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at /usr/libexec/git-core/git-svn line 519.

The problem is that by changing the SVN repository URL calculated SHA-1 hashes differ and Git cannot determine the proper commit to push to. In order to overcome these problems you can add the rewriteRoot option to your configuration file and afterwards change the URL:

git config --replace-all svn-remote.svn.rewriteRoot
git config --replace-all svn-remote.svn.url

Next time you try to push your changes they will be pushed to the new repository destination (newURL) but Git pretends it to be the old repository destination (oldURL).

Simple SVN to Git repository migration

Recently I wanted to migrate an existing Subversion (SVN) repository trunk to a new Git repository. Here is a short description how you can do it in four simple steps.

First of all, create a new bare repository:

$ mkdir NewGitRepo
$ cd NewGitRepo/
$ git init --bare

Secondly, checkout the old SVN repository using Git and enter the repository folder. For this post I created a sample SVN repository on my local hard drive:

$ git svn clone file:///some/file/path/OldSVNRepo/trunk ./OldSVNRepoGit
$ cd OldSVNRepoGit

Thirdly, add your new Git repository as additional remote branch to the checked out SVN repository:

 $ git remote add origin /some/file/path/NewGitRepo/

Finally, push SVN contents to new Git bare repository:

$ git push -u origin master
Counting objects: 12, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (12/12), 1016 bytes, done.
Total 12 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (12/12), done.
To /some/file/path/NewGitRepo/
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

As stated in the heading, this is just a simple way. Additional information regarding this topic can be found in the Pro Git book by Scott Chacon:

SoapUI: Setting all web service endpoints for a test suite

When working on SOA projects I am used to create some developer test suites for myself in order to do some initial web service QA. For this purpose SoapUI is a commonly used functional testing tool. Depending on the project these “small” test suites can actually become quite big. That is fine as long only one service endpoint has to be tested, however most likely you end up with several endpoints for different development stages (development, integration, production). Gladly SoapUI provides a functionality to set web service endpoints for all service request. Only problem is to find this functionality 😉

To demonstrate the functionality I took a standard global weather service and created a small SoapUI project.

Global Weather Service
Global Weather Service

Within the project I created some requests and test suites for both operations. Furthermore, I added some additional endpoints to the GlobalWeatherSoap Interface. You can access this view by double clicking the respective web service interface.

GlobalWeather service interface
GlobalWeather service interface

In order to set the endpoint required for the next test run, you have to select it from the list and click the Assign button in the top menu. As result an additional dialogue opens which provides several options.

Assign endpoint dialogue
Assign endpoint dialogue

In this example we want to set the new endpoint for all requests and test requests, therefore this option has to be selected. Afterwards all requests point to the new endpoint and the test suite can be executed.

Assigned endpoints
Assigned endpoints

Creating your own Oracle Metadata Repository (MDS) partitions

Just required some Oracle Metadata Repository (MDS) partitions for some testing. If you ever get to the same situation just use MDS_INTERNAL_COMMON.getOrCreatePartitionID procedure which is shipped with the MDS Schema when installing it using the Repository Creation Utility (rcu):

 lv_partitionExists integer;


After the anonymous block is completed you can check out your brand new partitions:

Created partitions
Created partitions

Script for basic git configuration

While setting up my new developer VM I came to the point where I had to configure git again. As I keep on configuring git on several VMs and systems required for and provided by my clients, I thought it might be a good idea to create a small shell script which sets up my standard configuration.

Options I normally use are:

# Set username
git config

# Set user email
git config

# Set standard editor
git config core.editor

# Activate colors in output
git config color.ui true

# Some helpful aliases
git config alias.s status
git config '!git add -u && git status'
git config alias.spull 'svn rebase'
git config alias.spush 'svn dcommit'

Based on this collection I developed a small shell script which you can find here (released under GNU GPLv3): git-init-config

It asks for user name, email and your favourite editor. You can either apply the configuration per git repository or globally (see option –global).

Problems with DataControls.cpx after package structure refactoring

When building modern IT systems one has to consider many areas prior to project start. A common area within Java projects is the definition of a proper project package structure in order to prevent package/naming conflicts. However, from time to time you still run into some conflicts due to changes in project structure, design or the usage of third party libraries.

Recently, I encountered some DataControl conflicts in a small ADF project of mine. In order to solve it I used JDeveloper’s package structure refactoring capabilities in order to move the affected classes and DC definitions. I was pleased to see that all references seemed to be amended appropriately. Nevertheless I ran into some problems regarding the DataControls.dcx file when trying to run the application the next time:

oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/com/foo/bar/DataControls.dcx"

I recognised that the error message still presented the old DataControls.dcx path to me. So I used JDevelopers search in files tool which can be found under “Search -> Find in Files…”.

JDeveloper - Search in Files
JDeveloper – Search in Files


However, I could not find any file which contained the path displayed. As the problems occurred after a package structure refactoring I changed my search string to package notation and finally found something within the DataBindings.cpx file.

  SomeBean" path="" />

Within the path attribute the package structure still pointed to an old location. After amending the structure properly the application could be deployed again.