Package com.opensymphony.xwork2

Examples of com.opensymphony.xwork2.XWorkException


        if (ret == null) {
            if (shouldLogNoSuchPropertyWarning(e)) {
                LOG.warn("Could not find property [" + ((NoSuchPropertyException) e).getName() + "]");
            }
            if (throwExceptionOnFailure) {
                throw new XWorkException(e);
            }
        }
        return ret;
    }
View Full Code Here


        }

        try {
            return objectFactory.buildResult(resultConfig, actionContext.getContextMap());
        } catch (Exception e) {
            throw new XWorkException("Unable to build result", e, resultConfig);
        }
    }
View Full Code Here

        Boolean reportError = (Boolean) context.get(ValueStack.REPORT_ERRORS_ON_NO_PROP);

        final String msg = "No object in the CompoundRoot has a publicly accessible property named '" + name + "' (no setter could be found).";

        if ((reportError != null) && (reportError.booleanValue())) {
            throw new XWorkException(msg);
        } else {
            if (devMode) {
                LOG.warn(msg);
            }
        }
View Full Code Here

                        return OgnlRuntime.getProperty(ognlContext, o, name);
                    }
                } catch (OgnlException e) {
                    if (e.getReason() != null) {
                        final String msg = "Caught an Ognl exception while getting property " + name;
                        throw new XWorkException(msg, e);
                    }
                } catch (IntrospectionException e) {
                    // this is OK if this happens, we'll just keep trying the next
                }
            }
View Full Code Here

                }
                try {
                    list.add(index, result = objectFactory.buildBean(beanClass, context));
                } catch (Exception exc) {
                    throw new XWorkException(exc);
                }
                return result;
            } else if (list.get(index) == null) {
                Object result = null;
                try {
                    list.set(index, result = objectFactory.buildBean(beanClass, context));
                } catch (Exception exc) {
                    throw new XWorkException(exc);
                }
                return result;
            }
        }
        return super.getProperty(context, target, name);
View Full Code Here

                    classReader.accept(new InfoBuildingVisitor(), ClassReader.SKIP_DEBUG);
                } finally {
                    in.close();
                }
            } else {
                throw new XWorkException("Could not load " + className);
            }
        } catch (IOException e) {
            throw new XWorkException("Could not load " + className, e);
        }

    }
View Full Code Here

    public synchronized Object get(int index) {
        while (index >= this.size()) {
            try {
                this.add(getObjectFactory().buildBean(clazz, ActionContext.getContext().getContextMap()));
            } catch (Exception e) {
                throw new XWorkException(e);
            }
        }

        return super.get(index);
    }
View Full Code Here

                if (userLoggerFactory != null) {
                    try {
                        Class clazz = Class.forName(userLoggerFactory);
                        factory = (LoggerFactory) clazz.newInstance();
                    } catch (Exception e) {
                        throw new XWorkException("System property [" + XWorkConstants.XWORK_LOGGER_FACTORY +
                                "] was defined as [" + userLoggerFactory + "] but there is a problem to use that LoggerFactory!", e);
                    }
                }
                try {
                    Class.forName("org.apache.commons.logging.LogFactory");
View Full Code Here

     */
  public Vector<String> findMatches() {
    Vector<String> matches = new Vector<String>();
    URLClassLoader cl = getURLClassLoader();
    if (cl == null ) {
      throw new XWorkException("unable to attain an URLClassLoader") ;
    }
    URL[] parentUrls = cl.getURLs();
    compiledPattern = (int[]) patternMatcher.compilePattern(pattern);
    for (URL url : parentUrls) {
      if (!"file".equals(url.getProtocol())) {
View Full Code Here

        SAXParser parser = null;
        try {
            parser = factory.newSAXParser();
        } catch (Exception ex) {
            throw new XWorkException("Unable to create SAX parser", ex);
        }
       
       
        DOMBuilder builder = new DOMBuilder();

        // Enhance the sax stream with location information
        ContentHandler locationHandler = new LocationAttributes.Pipe(builder);
       
        try {
            parser.parse(inputSource, new StartHandler(locationHandler, dtdMappings));
        } catch (Exception ex) {
            throw new XWorkException(ex);
        }
       
        return builder.getDocument();
    }
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.XWorkException

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.