2010-02-12

The most beautiful thing

I can think of right now: http://open.spotify.com/track/78LNk4Elk106k22nb90ENS It's killing me

2010-02-11

Jersey in tomcat5.5

Just a quick tip. To get Jersey up and running on Tomcat5.5 without getting the
ClassNotFoundException: javax.persistence.PersistenceUnit
If running the same webapp on Tomcat6.0 works, but you still need it in a 5.5 environment you can copy the file $TOMCAT6_HOME/lib/annotations-api.jar into your webapp WEB-INF/lib directory, and everything should run.

This is the content of my WEB-INF/lib directory:

annotations-api.jar
asm-3.1.jar
groovy-all-1.7.0.jar
jersey-core-1.1.5.jar
jersey-server-1.1.5.jar
jsr311-api-1.1.1.jar
(yes I'm using groovy too, thanks to Creating RESTful services with Jersey and Groovy). This is the web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
  <display-name>JerseyTest</display-name>
    <servlet>
      <display-name>ServletAdaptor</display-name>
      <servlet-name>ServletAdaptor</servlet-name>
      <servlet-class>
        com.sun.jersey.server.impl.container.servlet.ServletAdaptor
      </servlet-class>
    <init-param>
      <param-name>load-on-startup</param-name><param-value>1</param-value></init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>ServletAdaptor</servlet-name>
    <url-pattern>/resources/*</url-pattern>
  </servlet-mapping>
</web-app>