Code Tips

Sql Power Architect Java Heap Space Error

Sql Power ArchitectThis is definitely going to be one of those posts where I’m posting this not only for others to find while they are Binging and Googling, but for future Pete to come back and re-figure out how to do something that took him some time to figure out in the first place. I’ve had several posts like that (this gem chief among them), and this sort of situation is a very good reason to have a blog. Blogs are good places for a brain dump.

My issue this time was with a tool called Sql Power Architect. Sql Power Architect is a data modeling tool that I was using kind of as an Erwin-lite due to Erwin’s super high price tag and Architect’s free community edition.

I was trying to make a diagram of a database that I was being asked to examine for issues. I was able to reverse engineer the database and lay it out like so:

Sql Power Architect Test Database Diagram

However, when I tried to generate the PDF of this diagram, I got this error:

Sql Power Architect Java Heapspace Error

So, I did some searching and I wanted to increase the Java heap size, but only for that application if possible. I don’t run that many Java programs on my machine and I definitely didn’t want to upset the delicate balance of the Android environment that I have set up on the Windows side (which, incidentally is way more “picky” that the Android environment on the Mac side).

What I found is the Xmx switch for the java command line. I navigated to the Sql Power Architect install folder and figured out that architect.exe probably just called under the covers, so I executed this command below:

java -Xmx1024m -jar architect.jar

Sql Power Architect With Xmx Switch

That fired up the program with a 1 gig heap size. After that, I loaded my diagram and was able to export it to PDF without any issues.

The finished PDF:
Sql Power Architect Pdf Success

As I said, hopefully this post can be helpful to some poor soul in the future (even if that soul is me).

Leave a Reply

Your email address will not be published. Required fields are marked *