Mar
06
2010

Jetty/Maven2 (Mysql) JDBC Realms – Headache solved (I think)

As said elsewhere…… I’m often left feeling a bit as though I didn’t contribute well to hacking events – It’s not that I can’t hack, but it seems so often problems I want to attack require more infrastructure that I have time to assemble. Most often this revolves around simple user functionality. For reasons best understood by the universe, php “Frameworks” seem to provide this sort of thing out of the bag. The trouble for a middleware developer is that most of our really cool tools are in languages like c++, java, etc. php makes a great front end development environment, but having several technologies in the mix is a pain when you’re just trying to hack something together. On top of that, most of the java “Frameworks” tend to be infrastructure rather than application frameworks. After last weeks #dev8d I decided what I really needed was an “Application” framework in java. Something that I could easily add restful services to, but provided out of the box registration, login, user home, etc. The idea is I can copy this empty template app for each project and then get on with the business of “Hacking” (Hopefully this will be handy for me at the rewired state – culture event).

So, long story short, I’m putting together three framework apps: (One that uses OpenURL and the dyu library for authentication (Great for deployment to google app engine), One that uses spring security, and one that uses a home grown identity service that we already use in loads of k-int open source projects). They are being “Incubated” here. feel free to copy/edit. They contain some app specific stuff at the moment, but my plan is to keep on cleaning up / adding default functionality to make the process of java-based-hackathon activity as easy as it is in python/ruby/etc.

On the road to this, I also decided it was time to get busy with jetty as a test tool and quick prototyping aid. All was wonderful (JDBC resources in JNDI context etc) right up to the point I tried to configure the jetty JDBCRealm. I’d configured the mysql connector jar as a dependency of the plugin as per the jetty docs, set up the etc/realm.properties yet the app consistently delivers java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver. 2 days of digging around, and a read through JETTY-574 made me realise that the jetty container filters some classes. Switching the jdbc driver to com.mysql.jdbc.Driver seems to make everything work just fine. I’m not so sure about the heritage of this particular driver class, but it’s a step forwards. I suspect that adding the right elements to the pom will enable the old style org.gjt driver to be found. Pushing on with the hacking for now.

Specifics of the JDBCRealm are in this project

tags: , , ,
posted in java, maven2 by ianibbo

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

5 visitors online now
5 guests, 0 members
Max visitors today: 5 at 10:35 pm UTC
This month: 5 at 09-04-2010 10:35 pm UTC
This year: 32 at 08-31-2010 10:32 am UTC
All time: 32 at 08-31-2010 10:32 am UTC
 
Powered by Wordpress and MySQL. Theme by openark.org