XML error when running a spring-GWT app in development mode - java

I'm using eclipse and when I try to run my spring-GWT application in development mode I get the following Exception when parsing the applicationContext.xml file:
Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/tx/spring-tx-3.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
(...)
Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 51 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
And my applicationContext.xml file starts like this:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
(...)
Line 51 ---> <tx:annotation-driven transaction-manager="transactionManager"/>
Does anyone know what's happening??

Check you have spring-tx dependencies (or any other spring dependency) in your class path for it to use your schema. All schemas referenced should map to a spring dependency.
xmlns:tx="http://www.springframework.org/schema/tx"
Check this:
http://www.dashaun.com/2010/03/10/springframework-applicationcontext-woes-unable-to-locate-spring-namespacehandler/

Found workaround:
When running GWT devmode, there is an issue starting the spring appcontext,
the tx...xsd cannot be found. This is related to the classloader defined
in this Devmode class of GWT, which delegates to the systemclassloader
(override of jetty)
see: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/ac495ee6605d21b4
This occurs only when defining the tag in spring which is needed for
processing #Transactional annotations for transactions.
The only way to solve it I found (after 2 days) is to look in the stacktrace and find which class of Spring
invoked xerces (since it is xerces which can't find the file). This was "DefaultDocumentLoader"
This class is in spring-beans.jar.
=> So what I did is, I copied all classes from spring-tx.jar into the new spring-beans.jar
so those classes will be loaded by the same classloader
Then I also merged the META-INF/spring.handlers, spring.schemas, spring.tooling files,
All is now in a new jar i've created: spring-beans-tx-3.0.5.RELEASE.jar
This new jar is the first in the classpath of my project.
In this case it works !!

Related

Spring 5 mixing versioned and unversioned schemas due to third party java library

I have recently migrated code from spring 4 (4.1.7) to spring 5(5.1.4).
During this spring migration I have removed version numbers from project spring Xmls and this is xml schema from library i cannot update:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd"
default-lazy-init="true"
>
After upgrade getting below Exception while loading bean definitions due to library XML I have given above:
Caused by: org.xml.sax.SAXParseException; lineNumber: XX;
columnNumber: XX; : XML-24500: (Error) Can not
build schema 'http://www.springframework.org/schema/context' located
at
'http://www.springframework.org/schema/context/spring-context-3.1.xsd'
Detailed stack trace is :
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 16 in XML document from class path resource [xxxlib-core-spring-main.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 16; columnNumber: 5; <Line 16, Column 5>: XML-24500: (Error) Can not build schema 'http://www.springframework.org/schema/context' located at 'http://www.springframework.org/schema/context/spring-context-3.1.xsd'
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:622)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:518)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:95)
at com.xxxxxxxx.dataaccess.xxx.util.SpringHelper.init(SpringHelper.java:41)
at com.xxxxxxxx.dataaccess.xxx.util.SpringHelper.getBean(SpringHelper.java:69)
at com.xxxxxxxx.dataaccess.xxx.api.xxxAPILoader.<clinit>(xxxAPILoader.java:339)
... 30 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 16; columnNumber: 5; <Line 16, Column 5>: XML-24500: (Error) Can not build schema 'http://www.springframework.org/schema/context' located at 'http://www.springframework.org/schema/context/spring-context-3.1.xsd'
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:428)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:290)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:425)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:242)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:175)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
... 46 more
Caused by: oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
at oracle.xml.parser.schema.XSDBuilder.buildSchema(XSDBuilder.java:1122)
at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:673)
at oracle.xml.parser.schema.XSDValidator.processSchemaLocation(XSDValidator.java:1063)
at oracle.xml.parser.schema.XSDValidator.startElement(XSDValidator.java:668)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1635)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:458)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:404)
Does it mean we can move to Spring 5 only if all of our libraries
are also on spring 5 ? (I can't believe spring can introduce such problem)
Is there any workaround available for this problem ?
Am I missing some configuration due to this getting this Exception
I have come across github-issue which suggests in spring 5 version is dropped but old versions are still supported.
Edit1:
I came across another question: , since I am also using xmlparserv2-12.1.0.2.jar after using below workaround (looks like) it seems to pass this exception (XSDException: Duplicated definition for: 'identifiedType') but still not able to load bean from library, now it throws Exception org.springframework.beans.factory.NoSuchBeanDefinitionException
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
Edit2:
Above Edit1 solves my problem, bean exception was my local setup problem. I came across another good answer, it says we can not mix unversioned and versioned schemas. But in my case I can not remove version number from third party library, in this case I will have to go through solution given in Edit1, although that looks bad hack.
Is there any other better way to fix this problem ?

camel: Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/spring]

I am developing a spring-camel application. My beans.xml looks like below.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
</beans>
When I launching the application, I am end up in below error.
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/spring]
Offending resource: class path resource [beans.xml]
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:72)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:119)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:111)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1363)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1352)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:178)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:148)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:98)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:223)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:194)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:258)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:621)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:522)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:85)
at com.sample.app.Application.main(Application.java:10)
I added 'camel-core', camel-spring' library in my maven dependency. Since these are added as maven dependency, I can confirm that the camel-spring library is in my classpath.
Reference links.
Apache Camel Spring configuration error - Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/spring]
http://camel.apache.org/manual/camel-manual-2.6.0.html

Gradle Fat Jar Plugin and Spring: Error Loading XML bean definitions from class path resource

After build my application with grade fat jar plugin as is configured bellow:
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'PACMAN',
'Implementation-Version': version,
'Main-Class': 'com.y.y.z.Mainclass'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
And running this app (fat-jar with all dependencies) as follow:
-bash-3.2$ java -Dconf.properties=/app/home/wasa/sat/bin/app.properties -jar app-all-1.0.jar
Two thinks happens:
First is received the spring bootstrap start messages:
11/01/2016 11:38:59 org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext#11f23e5: startup date
[Mon Jan 11 11:38:59 BRST 2016]; root of context hierarchy
11/01/2016 11:39:00 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [applicationContext.xml]
And then after a while thi error/exception raises as described bellow:
11/01/2016 11:42:12 org.springframework.beans.factory.xml.XmlBeanDefinitionReader warning
Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document
'http://www.springframework.org/schema/beans/spring-beans.xsd', because
1) could not find the document;
2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
...
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:287)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
I also have tried to download the spring-beans.xsd file definition and included it in the resources folder in my project without success.
I'm load the spring xml configuration files as showed bellow:
public static void main(String[] args) throws Exception {
AbstractApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
getAllActiveUsersInPeople(context);
}
My appicationContext.xml is defined as bellow:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:ldap="http://www.springframework.org/schema/ldap"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/ldap http://www.springframework.org/schema/ldap/spring-ldap.xsd">
Someone has the similar problem or a possible solution to fix this issue?
Thanks

Apache Camel CXF

Camel Configuration was working fine with v 2.13.4. After migrating to v 2.15.1 I am getting following error:
Caused by: org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.apache.camel.component.cxf.spring.NamespaceHandler] for namespace [http://camel.apache.org/schema/cxf]: problem with handler class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/camel/component/cxf/spring/NamespaceHandler, offset=6
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:140)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1422)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:174)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
... 45 more
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/camel/component/cxf/spring/NamespaceHandler, offset=6
In camel configuration I am using following schemas:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<cxf:cxfEndpoint id="soapProxy"
address="/data" endpointName="s:dataManagementSOAP"
serviceName="s:dataManagement"
wsdlURL="/path/to/proxy.wsdl"
xmlns:s="http://www.test.com/integration/referencedata" />
......
bean definitions
.....
You seem to be running your application on Java 6.0, and Apache Camel has dropped support of Java 6.0 since 2.14.0 (see "Important changes to consider when upgrading" section)
Recompiling camel in Java 6.0 wont be feasible, I believe your options are either to upgrade to Java 7.0 or to downgrade Camel to a version pre 2.14.0

Spring context:property-placeholder file not found

I am trying to build a stand alone Spring based Java application.
I am using Maven assembly plugin to build the JAR with dependencies. The strcture of the JAR ends up looking like this (Just a subset):
com
META-INF
org
properties
- taskexecutor.properties
spring
- properties.xml
.
.
.
Manifest looks like this:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: authorname
Build-Jdk: 1.6.0_30
Main-Class: com.company.utilities.task.TaskLauncher
When the application runs the property placeholder should be configured by including the properties.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<context:property-placeholder location="classpath:/properties/taskExecutor.properties"/>
</beans>
It runs fine in Eclipse, but when I run the JAR I get this error:
Exception in thread "main" org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileN
otFoundException: class path resource [properties/taskExecutor.properties] cannot be opened because it does not exist
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.company.utilities.task.TaskLauncher.main(TaskLauncher.java:28)
Caused by: java.io.FileNotFoundException: class path resource [properties/taskExecutor.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
... 6 more
Any ideas?
move taskExecutor.properties to root and try it
<context:property-placeholder location="taskExecutor.properties"/>
It appears running through the command line is case sensitive but Eclipse is not when loading these resources.
Renaming taskexecutor.properties to taskExecutor.properties fixed the issue. Oops. Hopefully this helps someone equally as stupid as me in the future ;-)

Categories