title: Deploying a simple Portlet to Liferay - ClassCastException
body: <p>I'm deploying the most basic Portlet possible to Liferay:</p>
  
  <pre><code>public class FirstPortlet extends GenericPortlet
  {
      @RenderMode(name="VIEW")
      public void welcomeWelcome(RenderRequest request, 
              RenderResponse response) throws  
              PortletException, IOException
      {       
          PrintWriter out = response.getWriter();
          out.println ("This is a portlet, &lt;em&gt;within a Portal&lt;/em&gt;");
      }
  }
  </code></pre>
  
  <p>On deployment, I'm getting a ClassCastException:</p>
  
  <pre><code> Caused by: java.lang.ClassCastException: FirstPortlet cannot be cast to javax.po
  rtlet.Portlet
  </code></pre>
  
  <p>After Googling, it appears that deploying portlet.jar is a mistake - I've made sure I'm not accidentally doing this.</p>
  
  <p>javax.portlet.Portlet is implemented by GenericPortlet, and all Portlet examples seem to extend GenericPortlet so I assume that's ok.</p>
  
  <p>Can anyone help?</p>