Package org.springframework.beans.factory.parsing

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


            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


            try {
                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

     * {@inheritDoc}
     */
    public void fatal(Problem problem) {
      problems.add(new ValidationProblem(IMarker.SEVERITY_ERROR, getMessage(problem), getCurrentResource(),
          getLine(problem)));
      throw new BeanDefinitionParsingException(problem);
    }
View Full Code Here

TOP

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

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.