0 Replies Latest reply on Feb 6, 2007 7:04 AM by Vitaly Vinogradov

    I deploy my old portlets - raise error

    Vitaly Vinogradov Newbie

      Hello!

      I deploy my old portlets (for release jboss-portal-2.4.1 - without error) - raise error on jboss-portal-2.6-ALPHA*.

      My xml-file is very simple:

      jboss-app.xml
      <jboss-app>
      <app-name>testHeaderApp</app-name>
      </jboss-app>

      jboss-portlet.xml
      <portlet-app>

      <portlet-name>testHeader</portlet-name>

      </portlet-app>

      portlet.xml
      <portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
      xmlns="http://java.sun.com/xml/ns/portlet">

      <portlet-name>testHeader</portlet-name>
      <portlet-class>ru.nvg.TestHeader</portlet-class>
      <portlet-info>
      test header
      </portlet-info>

      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>


      </portlet-app>

      testHeader-object.xml
      <?xml version="1.0" encoding="UTF-8"?>


      <parent-ref>default</parent-ref>
      <if-exists>overwrite</if-exists>

      <instance-name>testHeader</instance-name>
      <component-ref>testHeaderApp.testHeader</component-ref>



      <parent-ref>default</parent-ref>
      <if-exists>overwrite</if-exists>

      <page-name>testHeader</page-name>

      <window-name>testheaderWindow</window-name>
      <instance-ref>testHeader</instance-ref>
      true
      center
      0





      error:
      15:01:20,119 INFO [TomcatDeployer] deploy, ctxPath=/testHeader, warUrl=.../tmp/
      deploy/tmp54019testHeader-exp.war/
      15:01:20,229 ERROR [PortletAppDeployment] Error when creating instances
      java.lang.ClassCastException
      at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.buildInst
      ances(PortletAppDeployment.java:244)
      at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(Por
      tletAppDeployment.java:99)
      at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(Depl
      oymentContext.java:99)
      at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.
      start(PortalDeploymentInfoContext.java:210)
      at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerD
      eployer.java:217)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl...


      My portlet:

      package ru.nvg;
      import java.io.PrintWriter;
      import java.io.IOException;

      import javax.portlet.GenericPortlet;
      import javax.portlet.PortletConfig;
      import javax.portlet.PortletSecurityException;
      import javax.portlet.RenderRequest;
      import javax.portlet.RenderResponse;
      import javax.portlet.PortletException;
      public class TestHeader extends GenericPortlet
      {

      public void init(PortletConfig config) throws PortletException
      {
      // TODO Auto-generated method stub
      super.init(config);
      }
      protected void doView(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException
      {
      // TODO Auto-generated method stub
      response.setContentType("text/html");
      PrintWriter writer = response.getWriter();
      writer.print("Content goes here\n");
      writer.close();
      }
      }


      Where is my error?

      thanks...

      WBR
      Vitaly