I’m using PDFBOX to generate images from PDFs.
I’ve added a few modifications to PDJpeg so that PDFs with CMYK JPEGs are exported correctly.
Some images still have a wrong background (black).

public BufferedImage getRGBImage() throws IOException { // TODO PKOCH
File imgFile = null;
BufferedImage bi = null;
boolean readError = false;
try {
imgFile = File.createTempFile(“pdjpeg”, “.jpeg”);
try {
bi = ImageIO.read(imgFile);
} catch […]

Fitnesse WebFixture and JQuery Slider Support

Fitnesse + Selenium Extensions:

I have extended the WebTest Class with:

public void userMovesTo(String elementCaption, String value) {
instance.dragAndDrop(getLocator(elementCaption, elementLocators), value);


“xpath=//input[@type=’radio’ and @value=’%1$s’]”, “xpath=//input[@type=’radio’ and @name=’%1$s’ and @value=’%2$s’]” };

for Radio-Group click support (by name and value)

Eclipse Helios & WTP

What’s wrong with it? After a view configuration or file  changes it is getting slower and slower – freezing at 100% cpu usage. It takes a minute to get normal again… (!?)

A Thread Dump always shows:

“Worker-32” prio=6 tid=0x0000000059ded000 nid=0x1920 runnable [0x000000006a10e000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapter.getAdapter(ResourceIsLoadingAdapter.java:76)
at org.eclipse.wst.common.internal.emf.utilities.ResourceIsLoadingAdapter.findAdapter(ResourceIsLoadingAdapter.java:44)
– locked <0x00000000181cd098> (a org.eclipse.wst.common.internal.emf.resource.ReferencedXMIResourceImpl$ESynchronizedAdapterList)
at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.waitForResourceToLoadIfNecessary(CompatibilityXMIResourceImpl.java:381)
at org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl.getContents(TranslatorResourceImpl.java:251)
at org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl.getRootObject(TranslatorResourceImpl.java:96)
at org.eclipse.wst.common.componentcore.internal.ModuleStructuralModel.resNeedsMigrating(ModuleStructuralModel.java:362)
at org.eclipse.wst.common.componentcore.internal.ModuleStructuralModel.prepareProjectModulesIfNecessary(ModuleStructuralModel.java:241)
at org.eclipse.wst.common.componentcore.internal.ModuleStructuralModel.getPrimaryRootObject(ModuleStructuralModel.java:119)
at org.eclipse.wst.common.componentcore.internal.StructureEdit.getComponentModelRoot(StructureEdit.java:436)
– […]

Eclipse WTP and Tomcat 7 Problems

If someone having problems with a META-INF/context.xml file and T7 start error with Eclipse Helios:


Tomcat 7 Beta

switched to Tomcat 7.0.2 for


JPA2 Count(*) Criteria API

Example of using JPA2 Criterial Builder and Count(*) Function:

CriteriaBuilder cb = entityManager.getCriteriaBuilder();
CriteriaQuery<Long> cq = cb.createQuery(Long.class);
Root<Company> company = cq.from(Company.class);
Path<NaceCode> naceCodes = null;
naceCodes = company.join(Company_.topNaceCode);
Predicate naceCodeEqual = cb.equal(naceCodes, naceCode);
Expression<Long> count = cb.count(company);
Long size = entityManager.createQuery(cq).getSingleResult();
return size.intValue();

More Examples: Google Books

CKEditor & JSF + Tomahawk

..i’m getting a “invalid array length” when i press a CKEditor button…  seems like there is a compatibility problem with the prototype library used in Apache MyFaces Tomahawk..

-> exception in:

shift: function() {

461 var result = this[0];
462 for (var i = 0; i < this.length – 1; i++)
463 this[i] […]

Eclipse RCP / OSGI Hell with Spring & OpenJPA

everyone(?) has problems with classloader/security issues when working with osgi…

org.apache.openjpa.persistence.PersistenceException: Error extracting class information from “bundleresource://3:1
Caused by: java.io.FileNotFoundException:……

if you want to load a custom persistence.xml (with another name) via springs DefaultPersistenceUnitManager you will probably get a problem with osgi which tries to find you persistence.xml, but can’t (see exception above)

i finally solved the problem writing […]

Introduction to Web Beans, JSR-299

see examples and docs at jboss

Comparing Wicket and JSF

JSF isn’t easy. It isn’t easy because you have to combine a couple of frameworks to get productive (e.g. facelets for a clean view and templating, a strategy for persistent data handling in the view avoiding lazy initialization errors and using correct transaction demarcation, some gui frameworks or helpers for dynamic image loading, file uploads, ajax […]