org.springframework.beans.factory.BeanCreationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When attempting to run the filecopy samples (bytecopy) for example was routinely receiving error about unable to resolve URI when using the as released configuration. The failure makes sense since this directory does not yet exist. If the tool won't make them for you then perhaps some instructions indicating that it needs to be created would be helpful. Or, better yet, since this is in temporary space appropriate for the running user perhaps auto create the dirs. It cannot be done in the FileCopyDemoCommon.displayDirectories() call as is because the app context is built before that is called. If the FileCopyDemoCommon.displayDirectories() is called before constructing the context and that method is updated to auto create the dirs then it should be good. There is a related problem that is the FileCopyDemoCommon.displayDirectories() class displays paths which are not at all associated with the context configuration. If a user tries different context configurations then the FileCopyDemoCommon impl as it is won't be too helpful. Also, FileCopyDemoCommon constructs a URL using the Path.seperator when using the built-in constructor of File(File,string) would probably be more 'pure Java'. Full Stack Trace From byte copy sample run... --------------------------------------------------------- Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filesOut.adapter': Cannot resolve reference to bean 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:197) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:172) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158) at org.springframework.integration.samples.filecopy.BinaryFileCopyDemo.main(BinaryFileCopyDemo.java:33) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) ... 20 more Caused by: java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.integration.file.FileWritingMessageHandler.<init>(FileWritingMessageHandler.java:91) at org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean.initHandler(FileWritingMessageHandlerFactoryBean.java:142) at org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean.getObject(FileWritingMessageHandlerFactoryBean.java:122) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) ... 28 more Caused by: java.io.FileNotFoundException: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] cannot be resolved to URL because it does not exist at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:163) at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:175) at org.springframework.integration.file.FileWritingMessageHandler.<init>(FileWritingMessageHandler.java:83) ... 31 more
    via by Joe Witt,
  • When attempting to run the filecopy samples (bytecopy) for example was routinely receiving error about unable to resolve URI when using the as released configuration. The failure makes sense since this directory does not yet exist. If the tool won't make them for you then perhaps some instructions indicating that it needs to be created would be helpful. Or, better yet, since this is in temporary space appropriate for the running user perhaps auto create the dirs. It cannot be done in the FileCopyDemoCommon.displayDirectories() call as is because the app context is built before that is called. If the FileCopyDemoCommon.displayDirectories() is called before constructing the context and that method is updated to auto create the dirs then it should be good. There is a related problem that is the FileCopyDemoCommon.displayDirectories() class displays paths which are not at all associated with the context configuration. If a user tries different context configurations then the FileCopyDemoCommon impl as it is won't be too helpful. Also, FileCopyDemoCommon constructs a URL using the Path.seperator when using the built-in constructor of File(File,string) would probably be more 'pure Java'. Full Stack Trace From byte copy sample run... --------------------------------------------------------- Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filesOut.adapter': Cannot resolve reference to bean 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:197) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:172) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158) at org.springframework.integration.samples.filecopy.BinaryFileCopyDemo.main(BinaryFileCopyDemo.java:33) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) ... 20 more Caused by: java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.integration.file.FileWritingMessageHandler.<init>(FileWritingMessageHandler.java:91) at org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean.initHandler(FileWritingMessageHandlerFactoryBean.java:142) at org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean.getObject(FileWritingMessageHandlerFactoryBean.java:122) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) ... 28 more Caused by: java.io.FileNotFoundException: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] cannot be resolved to URL because it does not exist at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:163) at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:175) at org.springframework.integration.file.FileWritingMessageHandler.<init>(FileWritingMessageHandler.java:83) ... 31 more
    via by Joe Witt,
  • Struts 2 - Struts 2 testing with jUnit plugin
    via by Unknown author,
  • get File from JAR
    via Stack Overflow by D&#243;nal
    ,
  • Gilead is working
    via gilead by aalbericio
    ,
  • After adding some test cases that call domainObject.validate() (to test my custom validations), I am seeing lots of stack traces for missing message resource bundles in the console output. It doesn't appear to prevent the tests from running. Stack traces from 0.2.2 codebase are: [java] Using DataSource [org.apache.commons.dbcp.BasicDataSource@16321e6] of Hibernate SessionFactory for HibernateTransactionManager [java] CGLIB2 available: proxyTargetClass feature enabled [java] Job execution threads will use class loader of thread: main [java] Quartz Scheduler v.1.5.2 created. [java] RAMJobStore initialized. [java] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' [java] Quartz scheduler version: 1.5.2 [java] Starting Quartz scheduler now [java] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. [java] .Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] [java] SQLErrorCodes loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL, Sybase] [java] ....Couldn't determine real path of resource class path resource [WEB-INF/grails-app/i18n/messages.properties] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages.properties] cannot be resolved to URL because it does not exist [java] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:157) [java] at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169) [java] at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:213) [java] at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:158) [java] at org.springframework.web.context.support.ServletContextResource.getFile(ServletContextResource.java:124) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:46) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:433) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't open InputStream for class path resource [WEB-INF/grails-app/i18n/messages.properties] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages.properties] cannot be opened because it does not exist [java] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137) [java] at org.springframework.mock.web.MockServletContext.getResourceAsStream(MockServletContext.java:167) [java] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:97) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:433) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't determine real path of resource class path resource [WEB-INF/grails-app/i18n/messages.xml] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages.xml] cannot be resolved to URL because it does not exist [java] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:157) [java] at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169) [java] at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:213) [java] at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:158) [java] at org.springframework.web.context.support.ServletContextResource.getFile(ServletContextResource.java:124) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:46) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:437) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't open InputStream for class path resource [WEB-INF/grails-app/i18n/messages.xml] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages.xml] cannot be opened because it does not exist [java] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137) [java] at org.springframework.mock.web.MockServletContext.getResourceAsStream(MockServletContext.java:167) [java] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:97) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:437) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't determine real path of resource class path resource [WEB-INF/grails-app/i18n/messages_en.properties] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en.properties] cannot be resolved to URL because it does not exist [java] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:157) [java] at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169) [java] at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:213) [java] at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:158) [java] at org.springframework.web.context.support.ServletContextResource.getFile(ServletContextResource.java:124) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:46) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:433) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't open InputStream for class path resource [WEB-INF/grails-app/i18n/messages_en.properties] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en.properties] cannot be opened because it does not exist [java] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137) [java] at org.springframework.mock.web.MockServletContext.getResourceAsStream(MockServletContext.java:167) [java] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:97) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:433) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't determine real path of resource class path resource [WEB-INF/grails-app/i18n/messages_en.xml] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en.xml] cannot be resolved to URL because it does not exist [java] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:157) [java] at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169) [java] at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:213) [java] at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:158) [java] at org.springframework.web.context.support.ServletContextResource.getFile(ServletContextResource.java:124) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:46) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:437) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't open InputStream for class path resource [WEB-INF/grails-app/i18n/messages_en.xml] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en.xml] cannot be opened because it does not exist [java] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137) [java] at org.springframework.mock.web.MockServletContext.getResourceAsStream(MockServletContext.java:167) [java] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:97) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:437) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't determine real path of resource class path resource [WEB-INF/grails-app/i18n/messages_en_GB.properties] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en_GB.properties] cannot be resolved to URL because it does not exist [java] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:157) [java] at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169) [java] at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:213) [java] at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:158) [java] at org.springframework.web.context.support.ServletContextResource.getFile(ServletContextResource.java:124) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:46) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:433) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't open InputStream for class path resource [WEB-INF/grails-app/i18n/messages_en_GB.properties] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en_GB.properties] cannot be opened because it does not exist [java] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137) [java] at org.springframework.mock.web.MockServletContext.getResourceAsStream(MockServletContext.java:167) [java] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:97) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:433) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't determine real path of resource class path resource [WEB-INF/grails-app/i18n/messages_en_GB.xml] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en_GB.xml] cannot be resolved to URL because it does not exist [java] at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:157) [java] at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:169) [java] at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:213) [java] at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:158) [java] at org.springframework.web.context.support.ServletContextResource.getFile(ServletContextResource.java:124) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:46) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:437) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] Couldn't open InputStream for class path resource [WEB-INF/grails-app/i18n/messages_en_GB.xml] [java] java.io.FileNotFoundException: class path resource [WEB-INF/grails-app/i18n/messages_en_GB.xml] cannot be opened because it does not exist [java] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137) [java] at org.springframework.mock.web.MockServletContext.getResourceAsStream(MockServletContext.java:167) [java] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:97) [java] at org.springframework.core.io.AbstractResource.exists(AbstractResource.java:51) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.refreshProperties(ReloadableResourceBundleMessageSource.java:437) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getProperties(ReloadableResourceBundleMessageSource.java:418) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.getMergedProperties(ReloadableResourceBundleMessageSource.java:313) [java] at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:270) [java] at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:240) [java] at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:170) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.getDefaultMessage(ConstrainedProperty.java:257) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$NullableConstraint.processValidate(ConstrainedProperty.java:346) [java] at org.codehaus.groovy.grails.validation.ConstrainedProperty$AbstractConstraint.validate(ConstrainedProperty.java:247) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.ConstrainedPersistentProperty.validate(ConstrainedPersistentProperty.java:208) [java] at org.codehaus.groovy.grails.orm.hibernate.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:88) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.ValidatePersistentMethod.doInvokeInternal(ValidatePersistentMethod.java:70) [java] at org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:49) [java] at org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethods.invokeMethod(AbstractDynamicMethods.java:146) [java] at org.codehaus.groovy.grails.commons.metaclass.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:55) [java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:158) [java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85) [java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175) [java] at BookmarkTests.testValidate(BookmarkTests:24) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at junit.framework.TestCase.runTest(TestCase.java:154) [java] at junit.framework.TestCase.runBare(TestCase.java:127) [java] at junit.framework.TestResult$1.protect(TestResult.java:106) [java] at junit.framework.TestResult.runProtected(TestResult.java:124) [java] at junit.framework.TestResult.run(TestResult.java:109) [java] at junit.framework.TestCase.run(TestCase.java:118) [java] at org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:47) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.framework.TestSuite.runTest(TestSuite.java:208) [java] at junit.framework.TestSuite.run(TestSuite.java:203) [java] at junit.textui.TestRunner.doRun(TestRunner.java:116) [java] at junit.textui.TestRunner.doRun(TestRunner.java:109) [java] at junit.textui.TestRunner.run(TestRunner.java:72) [java] at grails.util.RunTests.main(RunTests.java:56) [java] F....
    via by Maurice Nicholson,
  • When I use the "classpath:" syntax, for example in <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="mappingDirectoryLocations"> <list> <value>classpath:/com/my/data</value> </list> </property> </bean> the following exception is raised when I run the application from the jar (e.g. deploy it to JBoss as EAR): org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto ry' defined in ServletContext resource [/WEB-INF/classes/com/bmw/tw2/server/hibernateContext.xml]: I nitialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [com/my/data] cannot be resolved to absolute file path because it does not r eside in the file system: jar:file:/C:/jboss-4.0.1sp1/server/default/tmp/deploy/tmp13967my .ear-contents/my-server.jar!/com/my/data java.io.FileNotFoundException: class path resource [com/my/data] cannot be re solved to absolute file path because it does not reside in the file system: jar:file:/C:/jboss-4.0.1 sp1/server/default/tmp/deploy/tmp13967my.ear-contents/my-server.jar!/com/my/data at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:172) at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:154) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessio nFactoryBean.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMe thods(AbstractAutowireCapableBeanFactory.java:1077) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A bstractAutowireCapableBeanFactory.java:347) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(A bstractAutowireCapableBeanFactory.java:255) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory .java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory .java:145) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingle tons(DefaultListableBeanFactory.java:285) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio nContext.java:317) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh( AbstractRefreshableWebApplicationContext.java:131) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j ava:224) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav a:150) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis tener.java:48) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343) I can't see why this should not work, as classpaths can point inside JAR files AFAIK.
    via by Andreas Schildbach,
    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filesOut.adapter': Cannot resolve reference to bean 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:197) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:172) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158) at org.springframework.integration.samples.filecopy.BinaryFileCopyDemo.main(BinaryFileCopyDemo.java:33) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) ... 20 more Caused by: java.lang.IllegalArgumentException: Unexpected IOException when looking for destination directory: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] at org.springframework.integration.file.FileWritingMessageHandler.<init>(FileWritingMessageHandler.java:91) at org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean.initHandler(FileWritingMessageHandlerFactoryBean.java:142) at org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean.getObject(FileWritingMessageHandlerFactoryBean.java:122) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) ... 28 more Caused by: java.io.FileNotFoundException: class path resource [C:/DOCUME~1/Joseph/LOCALS~1/Temp//spring-integration-samples/output] cannot be resolved to URL because it does not exist at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:163) at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:175) at org.springframework.integration.file.FileWritingMessageHandler.<init>(FileWritingMessageHandler.java:83) ... 31 more

    Users with the same issue

    Unknown User
    7 times, last one,
    linxiaolong
    1 times, last one,
    Unknown visitor1 times, last one,
    batwalrus76
    3 times, last one,
    tvrmsmith
    1 times, last one,
    19 more bugmates