Package org.jboss.portal.portlet.container

Examples of org.jboss.portal.portlet.container.PortletInitializationException


         // Let invocation flow in
         valve.open();
      }
      catch (IllegalAccessException e)
      {
         throw new PortletInitializationException("Portlet class not accessible " + className, e);
      }
      catch (ClassNotFoundException e)
      {
         throw new PortletInitializationException("Portlet class not found " + className, e);
      }
      catch (InstantiationException e)
      {
         throw new PortletInitializationException("Portlet class cannot be instantiated " + className, e);
      }
      catch (PortletException e)
      {
         throw new PortletInitializationException("The portlet " + getId() + " threw a portlet exception during init", e);
      }
      catch (RuntimeException e)
      {
         throw new PortletInitializationException("The portlet " + getId() + " threw a runtime exception during init", e);
      }
      catch (Error e)
      {
         throw new PortletInitializationException("The portlet " + getId() + " threw an error during init", e);
      }
   }
View Full Code Here


            instance = ctor.newInstance();
         }
         else
         {
            String msg = "Cannot create " + type + " with class " + className + " because it does not implement the expected interface " + expectedClass.getName();
            throw new PortletInitializationException(msg);
         }
      }
      catch (InvocationTargetException e)
      {
         String msg = "Cannot create " + type + " with class " + className + " because the class contructor threw an exception";
         throw new PortletInitializationException(msg, e.getCause());
      }
      catch (IllegalAccessException e)
      {
         String msg = "Cannot create " + type + " with class " + className + " because the class is not accessible";
         throw new PortletInitializationException(msg, e);
      }
      catch (NoSuchMethodException e)
      {
         String msg = "Cannot create " + type + " with class " + className + " because it does not have an no argument constructor";
         throw new PortletInitializationException(msg, e);
      }
      catch (ClassNotFoundException e)
      {
         String msg = "Cannot create " + type + " with class " + className + " because the class cannot be loaded";
         throw new PortletInitializationException(msg, e);
      }
      catch (InstantiationException e)
      {
         String msg = "Cannot create " + type + " with class " + className + " because it cannot be instantiated";
         throw new PortletInitializationException(msg, e);
      }
      catch (Error e)
      {
         String msg = "Cannot create " + type + " with class " + className + " because of an error";
         throw new PortletInitializationException(msg, e);
      }

      //
      final ClassLoader previousLoader = Thread.currentThread().getContextClassLoader();
      try
      {
         Thread.currentThread().setContextClassLoader(classLoader);

         //
         start(instance);
      }
      catch (Exception e)
      {
         String msg = "The " + type + " threw an exception during init";
         throw new PortletInitializationException(msg, e);
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(previousLoader);
      }
View Full Code Here

TOP

Related Classes of org.jboss.portal.portlet.container.PortletInitializationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.