Thursday, 11 February 2010

Jettison

I'm back! Been busy the past days, not able to work on my favourite stuff. But now, here I am again. Well, want to take the opportunity to thank the creator of my lovely avatar rock tux. Got it from http://tux.crystalxp.net, creative commons license. Thanks a lot guys! You rock.

Back on topic. I'm still trying to get Jetty 7 to run, after things failed with Eclipse. Switched back to my old solution, which looks like this.
What you absolutely want to have is hot deployment. Now how to achieve that if you're not actually starting your app server from within Eclipse? The neatest way I've found so far is to go to Jetty's webapps directory and create a symlink to your workspace web folder. Call the symlink foo.war for the looks, and done you are. What, you can't symlink, you're on Windows? Wrong blog mate, go get yourself an operating system :)

Finally, hot deployment, no more restarts. At least that's how it used to work, bracing myself for some surprises here too, you never know.

But first, Spring is spitting in my soup again. I got Spring Security on, quite excited about the shiny new configuration, waaay neater than stuff in the bad old Acegi days. But it doesn't start, and I get "Unable to locate Spring NamespaceHandler for XML schema namespace". Huh? Why not? Checking the xml, it's there. Jar is in lib.

Now I don't even try and run after that anymore, straight to google. And bingo, a gazillion of people are having the very same problem. Why is that? because the smart people at Spring Security found it a good idea to pack the namespace handler into an own jar. So shifting spring-security-core.jar and spring-security-web.jar over to your lib doesn't do anything, you need spring-security-config.jar as well.

So in order to use Spring Security with Spring, you need spring-security-config. I don't even rant about this anymore, I'm sooo close to just copying all jars over and done with it. But hell, I'd like a clean classpath if I'm given the opportunity.

No comments:

Post a Comment