Thursday, September 3, 2009

zktodo2 failed - but fixed again

I've installed NetBeans 6.7.1 on Ubuntu running on my Sun VirtualBox. Preferred to do so in stead of messing up my own computer ...

Got subversion and maven2 installed by using some magical
sudo apt-get commands ;-)

Got the zktodo2 installed by running mvn co (checkout).

Got the a nice dependency graph to display - WOW!!
http://mediacast.sun.com/users/ken_g/media/maven-dependecies-screencast/
fixed an error and got the project to build.

But the deployment failed with an error telling me that the
element type "listener" must match "(listener-class)"
Found the reason here:
http://www.coderanch.com/t/82686/Tomcat/listener-listener-class

So I changed the head of my web.xml from:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>

to:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

and it worked!

Now I can go home and tell my wife tonight - and I am sure she'll fall asleep at once ;-)

P.S.
So I took an exported appliance home - and imported my new environment into the VirtualBox on my laptop. And it did not work!
Could not create the entity manager! Clean and build - then run. Nope - still problems! I had to undeploy the context, then redeploy - to make it work.

1 comment:

Anonymous said...

Hi Fred,

I was thrilled to google zktodo2 and see the code come up on your blog. I just committed a change to fix those web.xml schema issues. I also updated it to zk5.0.5 and spring3.0.5. I also got around to calling the two approaches in the codebase by their names Model View Presenter (MVP) and Model View Controller (MVC).

Simon