• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Error starting spring application

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
This is my schema definition

<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:flex="http://www.springframework.org/schema/flex"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:oxm="http://www.springframework.org/schema/oxm"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schem...ontext-3.0.xsd
http://www.springframework.org/schema/flex http://www.springframework.org/schem...g-flex-1.0.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schem...g-jdbc-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schem...curity-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schem...ing-tx-3.0.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schem...ng-oxm-3.0.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schem...spring-jms.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">




When I run the aplication without internet I see the folllowing error


org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/flex/spring-flex-1.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 org.apache.xerces.util.ErrorHandlerWrapper.createS AXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.warning (Unknown Source)



Any idea please ?

Thanks
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably missing the Flex-Spring integration jar?
http://www.springsource.org/spring-flex

Are you using maven or ant for build management?
 
Maya Manoj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am using maven to build application
This is the flex related jars I have

<dependency>
<groupId>org.springframework.flex</groupId>
<artifactId>spring-flex-core</artifactId>
<version>1.5.2.RELEASE</version>
</dependency>


Thanks
 
Maya Manoj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The application works fine if its connected to the internet.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which means that locally you don't have the .xsd file in your classpath of your war. Typically that comes in the jar file of the project. So in the Spring-flex jar file. Are you sure this jar file is being included?

Even though it is in the maven pom file, there might have been some other issue with it downloading, only in your classpath for compile. etc

Or the fact that your POM says you are using the 1.5.2 jar file, but your xml is using the flex 1.0 xsd file. That could very well be the problem. Make sure version numbers match, or don't include version numbers in your xml for the xsd and Spring will just take the latest version of the xsd that is in your classpath when running.

Mark
 
Maya Manoj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried adding the jar locally doesnot make any difference(spring-flex-1.5.2).
When I added spring-flex-1.0.0 locally I get

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_flexRemotingAnnotationPostProcessor': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.flex.config.json.JsonConfigMapPropertyEditor]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/codehaus/jackson/JsonFactory

When I removed the version or making same as in pom in xml,I get following compilation error at
<flex:message-broker>

Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/flex/spring-flex.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>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'flex:message-broker'.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
 
It runs on an internal combustion engine. This ad does not:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic