As a side project, a couple of friends and I for a long time have been working on the Elysium role-playing game. I had an idea yesterday for a character generator and campaign builder. I remember from years past when I used to play Dungeons and Dragons that there was a free software character generator called PCGen. I took a look at it to see how easily I could develop plug-ins or data sets that applied to our game system. I didn't get a warm fuzzy about this looking at the PCGen docs.
Jonathan Hawk's Rule of Programming #0 states that you will try to extend or reuse something, but find out it sucks and end up doing it yourself anyway. I'm not saying that PCGen sucks by any stretch, but I don't think our non-d20 game system will be easily implementable there. Time to roll our own.
I toyed with the idea of implementing it using Eclipse RCP, even going so far as to downloading the RCP environment and doing a tutorial. I was pretty impressed how easy it was to get a simple app going with Eclipse RCP. It was at this point that a few sudden realizations hit me.
- I hate Java. I do it all day at work and with each keystroke, a little bit of my soul is stolen.
- I run Linux. If we wanted to distribute this cross-platform, I would have to do some leg work to get it built on Windows and Mac OS X machines.
- I gave thought to recent trends in computing of late: mobile and distributed applications. Nothing new and exciting is happening with native desktop programs anymore.
I decided to abandon the idea that this application needs to be locally-installed on a person's computer, instead realizing that with HTML 5, I can create an app that runs across different devices (including phones and tablets) and would allow people to store their created characters and game information both locally on their device and remotely.
To the ☁! Desktop Apps Be Damned!
I'm using Spring Framework version 3.0.0 (although, I'll bet the same problem would happen with 2.x). I'm using Hibernate Search 3.1.0 (That's what's in Maven. I wonder why there's no 3.1.1).
Trying to use the configuration as follows inside of a Spring configuration document.
Upon running some unit tests, I get a nasty Exception stack, with the following at the root.
Caused by: java.lang.ArrayStoreException at java.lang.System.arraycopy(Native Method) at java.util.ArrayList.toArray(ArrayList.java:306) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:759) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398) ... 57 more
The root cause of the problem (and I needed to debug the Spring/Hibernate internals to figure this out) is that
FullTextIndexEventListener does not implement the FlushEventListener interface in version 3.1.0, but it does in 3.1.1.
Solution: upgrade (if you're using Maven, try the JBoss repository which has the latest stuff) or omit the "flush" event from the configuration.
Page 1 of 1, totaling 2 entries