Loading

Monthly Archives: August 2009

STaX: OutOfMemoryError when parsing big files

Java 6 includes STaX , when I tried to parse a Evernote backup file with it, I got a “OOME” error.

java.lang.OutOfMemoryError: Java heap space
at com.sun.org.apache.xerces.internal.util.XMLStringBuffer.append(XMLStringBuffer.java:205)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.refresh(XMLDocumentScannerImpl.java:1520)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.invokeListeners(XMLEntityScanner.java:2070)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(XMLEntityScanner.java:486)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2679)
[...]

JTable, Beans Binding and JPA pagination

In my previous post I talk about JTable and JPA pagination through a custom TableModel.
Now working directly with TableModel is not want you want to do, you want to use Beans Bindings because it means less manual coding and a lot of help from the IDE (like Netbeans).
With netbeans you can easily bind [...]

JTable and JPA Pagination through custom TableModel

I really want to talk about JTable, Beans Binding and JPA pagination but I think I need to write about JTable and JPA pagination first. So I will take the Beans binding stuff in another post.
By the way, choose wisely your JPA Provider/DB Provider combination, as some combinations will not give you any real paginations [...]

Fixing “Invalid XML: too many tags” [Google webmaster tools]

I tried to use my blog feed as a sitemap in Google Webmaster Tools, but it Google complains about “Invalid XML: too many tags describing this tags” in several points in the feed.
I found in several places that this due to the format of the feed, a simple change to ATOM will fix it. [...]

Import delicious bookmarks into Evernote

I tried to use the delicious online import tool from Evernote and I have to say that I’m not satisfied with it. It’s limited to 1000 tags (that’s due to important performance issues in Evernote when the number of tags is big) and if you don’t import the tags the tag information is lost.
I [...]

CGLib, NetBeans Modules and class loaders

My first try at using CGLib from a Netbeans RCP ended up in a ClassNotFoundException for net.sf.cglib.proxy.Factory
I had two modules, MainModule and cglib and MainModule was depending on cglib. And the following snippet was raising the ClassNotFoundException.

Enhancer enhancer = new Enhancer();
[...]