Package org.springframework.beans.factory.parsing

Examples of org.springframework.beans.factory.parsing.Problem


        {
            String element = ((Element) problem.getLocation().getSource()).getLocalName();
            String namespace = ((Element) problem.getLocation().getSource()).getNamespaceURI();
            String message = "The element '" + element + "' does not have an associated Bean Definition Parser."
                    +"  Is the module or transport associated with " + namespace + " present on the classpath?";
            return new Problem(message, problem.getLocation(), problem.getParseState(), problem.getRootCause());
        }
        catch (Exception e)
        {
            // fall back to previous message
            return problem;
View Full Code Here


        {
            String element = ((Element) problem.getLocation().getSource()).getLocalName();
            String namespace = ((Element) problem.getLocation().getSource()).getNamespaceURI();
            String message = "The element '" + element + "' does not have an associated Bean Definition Parser."
                    +"  Is the module or transport associated with " + namespace + " present on the classpath?";
            return new Problem(message, problem.getLocation(), problem.getParseState(), problem.getRootCause());
        }
        catch (Exception e)
        {
            // fall back to previous message
            return problem;
View Full Code Here

            Assert.notNull(uri, "Namespace definition cannot supply a null URI");

            final NamespaceHandler namespaceHandler = namespaceHandlerResolver.resolve(uri);
            if (namespaceHandler == null) {
                throw new BeanDefinitionParsingException(
                      new Problem("No namespace handler found for URI: " + uri,
                            new Location(readerContext.getResource())));
            }
            namespaceHandlers.put(namespace, namespaceHandler);
            namespaces.put(namespace, uri);
        }
View Full Code Here

                GroovyShell shell = classLoader == null ? new GroovyShell(b) : new GroovyShell(classLoader, b);
                shell.evaluate(new InputStreamReader(resource.getInputStream(), "UTF-8"));
            }
            catch (Throwable e) {
                throw new BeanDefinitionParsingException(
                        new Problem("Error evaluating bean definition script: " + e.getMessage(), new Location(resource), null, e));
            }
        }
    }
View Full Code Here

    try {
      GroovyShell shell = new GroovyShell(getResourceLoader().getClassLoader(), binding);
      shell.evaluate(encodedResource.getReader(), encodedResource.getResource().getFilename());
    }
    catch (Throwable ex) {
      throw new BeanDefinitionParsingException(new Problem("Error evaluating Groovy script: " + ex.getMessage(),
          new Location(encodedResource.getResource()), null, ex));
    }
    return getRegistry().getBeanDefinitionCount() - countBefore;
  }
View Full Code Here

        if (uri == null) {
          throw new IllegalArgumentException("Namespace definition must supply a non-null URI");
        }
        NamespaceHandler namespaceHandler = this.xmlBeanDefinitionReader.getNamespaceHandlerResolver().resolve(uri);
        if (namespaceHandler == null) {
          throw new BeanDefinitionParsingException(new Problem("No namespace handler found for URI: " + uri,
              new Location(new DescriptiveResource(("Groovy")))));
        }
        this.namespaces.put(namespace, uri);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.parsing.Problem

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.