Package org.apache.webbeans.exception

Examples of org.apache.webbeans.exception.WebBeansException


            field.set(instance, object);

        }
        catch (IllegalAccessException e)
        {
            throw new WebBeansException(e);
        }

        return null;
    }
View Full Code Here


                }
            }                       
        }
        catch (Exception e)
        {
                throw new WebBeansException(e);
        }
        finally
        {
            //Destory bean instance
            if (component.getScope().equals(Dependent.class) && object != null)
View Full Code Here

        {
            return AroundTimeout.class;
        }
        else
        {
            throw new WebBeansException("Undefined interceotion type");
        }
    }
View Full Code Here

                throw e;
            }

            catch (Exception e)
            {
                throw new WebBeansException(e);
            }
        }
    }
View Full Code Here

    {
        //Load class
        Class<?> clazz = ClassUtil.getClassFromName(singletonName);
        if (clazz == null)
        {
            throw new WebBeansException("Class not found exception in creating instance with class : " + singletonName,
                    new ClassNotFoundException("Class with name: " + singletonName + " is not found in the system"));
        }
        return get(clazz);

    }
View Full Code Here

                Constructor<T> constructor = clazz.getConstructor();
                return constructor.newInstance();
            }
            catch (NoSuchMethodException e)
            {
                throw new WebBeansException("No suitable constructor : " + clazz.getName(), e.getCause());
            }
        }
        catch (InstantiationException e)
        {
            throw new WebBeansException("Unable to instantiate class : " + clazz.getName(), e.getCause());
        }
        catch (InvocationTargetException e)
        {
            throw new WebBeansException("Unable to instantiate class : " + clazz.getName(), e.getCause());
        }
        catch (IllegalAccessException e)
        {
            throw new WebBeansException("Illegal access exception in creating instance with class : " + clazz.getName(), e);
        }
    }
View Full Code Here

                        }
                        catch (SecurityException e)
                        {
                            logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0006, decClazz.getName(),method.getName(), e));
                            throw new WebBeansException(e);

                        }
                        catch (NoSuchMethodException e)
                        {
                            continue;
View Full Code Here

                cause = e.getCause();
            }
           
            String error = "Error occurred while creating an instance of class : " + clazz.getName();
            logger.log(Level.SEVERE, error, cause);
            throw new WebBeansException(error,cause);
       
        }
    }
View Full Code Here

            return method.invoke(instance, args);

        }
        catch (Exception e)
        {
            throw new WebBeansException("Exception occurs in the method call with method : " + method.getName() + " in class : " + instance.getClass().getName(), e);
        }

    }
View Full Code Here

            }
            catch (SecurityException e)
            {
                logger.log(Level.SEVERE, OWBLogConst.ERROR_0011, WebBeansLoggerFacade.args(method.getName(), decorator.getClass().getName()));
                throw new WebBeansException(e);

            }
            catch (NoSuchMethodException e)
            {
                continue;
            }
            catch (InvocationTargetException e)
            {
                Throwable cause = e.getCause();
                //If the wrapped exception tells us the method didn't exist, continue
                if(cause instanceof NoSuchMethodException)
                {
                    continue;
                }

                logger.log(Level.SEVERE, OWBLogConst.ERROR_0012, WebBeansLoggerFacade.args(e.getTargetException(), method.getName(), decorator.getClass().getName()));

                if (cause instanceof Exception)
                {
                    throw (Exception) cause;
                }
                else if (cause instanceof Error)
                {
                    throw (Error) cause;
                }
                else
                {
                    throw new WebBeansException(e);
                }
            }
            catch (IllegalAccessException e)
            {
                logger.log(Level.SEVERE, OWBLogConst.ERROR_0014, WebBeansLoggerFacade.args(method.getName(), decorator.getClass().getName()));
                throw new WebBeansException(e);
            }

        }

        position.remove();
View Full Code Here

TOP

Related Classes of org.apache.webbeans.exception.WebBeansException

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.