Package org.jboss.forge.furnace.exception

Examples of org.jboss.forge.furnace.exception.ContainerException


         });
      }
      catch (Exception e)
      {
         throw new ContainerException("Failed to create proxy for type [" + delegateType + "]", e);
      }
   }
View Full Code Here


            return type.newInstance();
         }
      }
      catch (Exception e)
      {
         throw new ContainerException("Could not create instance of [" + type.getName() + "] through reflection.", e);
      }
   }
View Full Code Here

                        );
            }
         }
         catch (IOException e)
         {
            throw new ContainerException("Could not load resources from [" + file.getAbsolutePath() + "]", e);
         }
      }
   }
View Full Code Here

                     dependency.isOptional()));
         }
      }

      if (!dependency.isOptional() && (addonId == null || moduleId == null))
         throw new ContainerException("Dependency [" + dependency + "] could not be loaded for addon [" + found
                  + "]");
   }
View Full Code Here

         method.setAccessible(true);
         method.invoke(null);
      }
      catch (Exception e)
      {
         throw new ContainerException("Could not install Modules MBean server", e);
      }
   }
View Full Code Here

                        result = new AddonLifecycleProviderEntry(addon, provider);
                     }

                     if (result != null && iterator.hasNext())
                     {
                        throw new ContainerException("Expected only one [" + AddonLifecycleProvider.class.getName()
                                 + "] but found multiple. Remove all but one redundant container implementations: " +
                                 Iterators.asList(serviceLoader));
                     }
                  }
               }
               return result;
            }
         });
      }
      catch (RuntimeException e)
      {
         throw e;
      }
      catch (Exception e)
      {
         throw new ContainerException("Error occurred while attempting to local instance of ["
                  + AddonLifecycleProvider.class.getName() + "] for addon [" + addon + "].");
      }

      return result;
   }
View Full Code Here

                     result = new AddonLifecycleProviderEntry(dependency, provider);
                  }

                  if (result != null && iterator.hasNext())
                  {
                     throw new ContainerException(
                              "Expected only one ["
                                       + AddonLifecycleProvider.class.getName()
                                       + "] but found multiple. Remove all but one redundant container implementations: "
                                       +
                                       Iterators.asList(serviceLoader));
                  }
               }
            }

            if (result != null)
               results.add(result);
         }
         catch (Throwable e)
         {
            // FIXME Figure out why ServiceLoader is trying to load things from the wrong ClassLoader
            logger.log(Level.FINEST, "ServiceLoader misbehaved when loading AddonLifecycleProvider instances.", e);
         }
      }

      if (results.size() > 1)
      {
         throw new ContainerException("Expected only one [" + AddonLifecycleProvider.class.getName()
                  + "] but found multiple. Remove all but one redundant container implementations: " +
                  results);
      }

      return results.isEmpty() ? null : results.get(0);
View Full Code Here

         Class<Enum> callingType = (Class<Enum>) loader.loadClass(instance.getClass().getName());
         return Enum.valueOf(callingType, ((Enum) instance).name());
      }
      catch (ClassNotFoundException e)
      {
         throw new ContainerException(
                  "Could not enhance instance [" + instance + "] of type [" + instance.getClass() + "]", e);
      }
   }
View Full Code Here

         });
      }
      catch (Exception e)
      {
         throw new ContainerException("Failed to create proxy for type [" + delegateType + "]", e);
      }
   }
View Full Code Here

      {
         return loader.loadClass(typeName);
      }
      catch (ClassNotFoundException | LinkageError e)
      {
         throw new ContainerException("Could not locate class [" + typeName + "] in Loader [" + loader + "]", e);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.furnace.exception.ContainerException

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.