Mobile Signatur am Smartphone

Wir entwickeln gerade eine Gemeindelösung für die Mobile Signatur auf den Smartphones (iPhone, Windows Phone, Android). Die App ermöglicht den Login via Handy# und Passwort und identifiziert den Bürger am mobilen Endgerät.

Wicket Performance Tips

great memory tips @

Reset Hilft – auch bei Android

Nach dem Update des Galaxy S auf 2.2 hat jetzt nur mehr ein Wipe&Reset geholfen damit die Performanz wieder akzeptabel wurde.

PDFBOX CMYK Support

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).

@Override
public BufferedImage getRGBImage() throws IOException { // TODO PKOCH
File imgFile = null;
BufferedImage bi = null;
boolean readError = false;
try {
imgFile = File.createTempFile("pdjpeg", ".jpeg");
write2file(imgFile);
try {
bi = ImageIO.read(imgFile);
} catch (IIOException iioe) {
// try CMYK
try {
Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName("JPEG");
ImageReader reader = null;
while (readers.hasNext()) {
reader = readers.next();
if (reader.canReadRaster()) {
break;
}
}
// Stream the image file (the original CMYK image)
ImageInputStream input = ImageIO.createImageInputStream(imgFile);
reader.setInput(input);
try {
bi = reader.read(0);
} catch (Exception e) {
Raster raster = reader.readRaster(0, null);
// ...and hope thats a CMYK, take a CMYK-Profile,
// there exists lots of, look at:
// http://www.eci.org/eci/de/060_downloads.php
// if you don't know take: ISOcoated.icc ...
String cmykProfile = "c:\\temp\\ISOcoated_v2_eci.icc";
ICC_Profile p = ICC_Profile.getInstance(new FileInputStream(cmykProfile));
// ... and convert it to sRGB
bi = cmykRasterToSRGB(raster, p);
}
} catch (IIOException iioe2) {
// cannot read jpeg
readError = true;
} catch (Exception ignore) {
}
}

// 2. try to read jpeg again. some jpegs have some strange header
// containing
// “Adobe ” at some place. so just replace the header with a valid
// jpeg header.
// TODO : not sure if it works for all cases
if (bi == null && readError) {
byte[] newImage = replaceHeader(imgFile);

ByteArrayInputStream bai = new ByteArrayInputStream(newImage);

// persist file temporarely, because i was not able to manage
// to call the ImageIO.read(InputStream) successfully.
FileOutputStream o = new FileOutputStream(imgFile);
byte[] buffer = new byte[512];
int read;
while ((read = bai.read(buffer)) > 0) {
o.write(buffer, 0, read);
}

bai.close();
o.close();

bi = ImageIO.read(imgFile);
}
} finally {
if (imgFile != null) {
imgFile.delete();
}
}

// If there is a ‘soft mask’ image then we use that as a transparency
// mask.
PDXObjectImage smask = getSMaskImage();
if (smask != null) {
BufferedImage smaskBI = smask.getRGBImage();

COSArray decodeArray = smask.getDecode();
CompositeImage compositeImage = new CompositeImage(bi, smaskBI);
BufferedImage rgbImage = compositeImage.createMaskedImage(decodeArray);

return rgbImage;
} else {
// But if there is no soft mask, use the unaltered image.
return bi;
}
}

Mobile Marketing für Android und iPhone/iPad

Die neue Applikation von it-fabrik ist gerade in Entwicklung.

Mehr News wird auf der Facebook Seite veröffentlicht:

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);
}

and

“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)

Migrating Eclipse RCP 3.6 Project to Eclipse 4.0 (e4)

Config.ini

TODO

Migration Layer:

  • https://bugs.eclipse.org/bugs/show_bug.cgi?id=317912

Using e4 Themes within migrated projects:

TODO

JBoss Seam 3

If you looked at the Seam Status Page the last several months you have to be worried that Seam 3 does not make any real progress (?). Perhaps JSF2 is enough?

a good comparison matrix anywhere?

SEAM 3 extends JSF2 with:

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)
– locked <0x00000000181d6be0> (a org.eclipse.wst.common.componentcore.internal.ModuleStructuralModel)
at org.eclipse.wst.common.componentcore.internal.StructureEdit.getWorkbenchModules(StructureEdit.java:471)
at org.eclipse.wst.common.componentcore.internal.StructureEdit.getComponent(StructureEdit.java:914)
at org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent.getMetaResources(VirtualComponent.java:314)
at org.eclipse.wst.common.componentcore.internal.resources.VirtualContainer.members(VirtualContainer.java:162)
at org.eclipse.wst.common.componentcore.internal.resources.VirtualContainer.members(VirtualContainer.java:142)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembersInternal(VirtualComponentFlattenUtility.java:88)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembersInternal(VirtualComponentFlattenUtility.java:95)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembersInternal(VirtualComponentFlattenUtility.java:95)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembersInternal(VirtualComponentFlattenUtility.java:95)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembersInternal(VirtualComponentFlattenUtility.java:95)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembersInternal(VirtualComponentFlattenUtility.java:95)
at org.eclipse.wst.common.componentcore.internal.flat.VirtualComponentFlattenUtility.addMembers(VirtualComponentFlattenUtility.java:50)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.treeWalk(FlatVirtualComponent.java:163)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.cacheResources(FlatVirtualComponent.java:121)
at org.eclipse.wst.common.componentcore.internal.flat.FlatVirtualComponent.getChildModules(FlatVirtualComponent.java:111)
at org.eclipse.wst.web.internal.deployables.FlatComponentDeployable.getExportModelChildren(FlatComponentDeployable.java:172)
at org.eclipse.wst.web.internal.deployables.FlatComponentDeployable.getModules(FlatComponentDeployable.java:183)
at org.eclipse.jst.server.tomcat.core.internal.TomcatServer.getChildModules(TomcatServer.java:316)
at org.eclipse.wst.server.core.internal.Server.getChildModules(Server.java:2383)
at org.eclipse.wst.server.core.internal.Server.visitModule(Server.java:2780)
at org.eclipse.wst.server.core.internal.Server.isModuleDeployed(Server.java:858)
at org.eclipse.wst.server.core.internal.Server.handleModuleProjectChange(Server.java:818)
at org.eclipse.wst.server.core.internal.ResourceManager.publishHandleProjectChange(ResourceManager.java:987)
at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener$1.visit(ResourceManager.java:123)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener.resourceChanged(ResourceManager.java:117)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:311)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:147)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

My Environment:

Win7, 64-bit
JVM: Java HotSpot(TM) 64-Bit Server VM (17.0-b17, mixed mode)
-Xms512m
-Xmx1024m
-XX:PermSize=256m
-XX:MaxPermSize=256m

Eclipse WTP and Tomcat 7 Problems

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