Results 1 to 4 of 4

Thread: Cannot find schemalocation when running offline

  1. #1

    Unhappy Cannot find schemalocation when running offline

    Hi,

    I have to deploy my application to a machine that doesn't have internet connection.
    I'm using spring 3.0 and JDK6 and maven.

    I've checked my schema is inside the jar (I also test it outside the jar, but still doesn't work).

    When I run it I have this error
    Code:
    12:04:51.882 [main] WARN  o.s.b.f.xml.XmlBeanDefinitionReader - 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:schem
    a>.
    I had spring.schema and spring.handlers following this solution http://jira.codehaus.org/browse/MASSEMBLY-360

    It only works if I have internet connection.

    My applicationContext.xml
    Code:
    <?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:tx="http://www.springframework.org/schema/tx" 
    	xmlns:p="http://www.springframework.org/schema/p"
    	xmlns:jms="http://www.springframework.org/schema/jms" 
    	xmlns:amq="http://activemq.apache.org/schema/core"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans 
    		http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    		http://www.springframework.org/schema/context 
    		http://www.springframework.org/schema/context/spring-context-3.0.xsd
    		http://www.springframework.org/schema/jms 
     		http://www.springframework.org/schema/jms/spring-jms.xsd
    		http://www.springframework.org/schema/tx
            http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
            http://activemq.apache.org/schema/core 
    		http://activemq.apache.org/schema/core/activemq-core-5.3.2.xsd">
    Here is my spring.handlers
    Code:
    http\://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler
    http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
    http\://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler
    http\://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler
    http\://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler
    http\://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler
    http\://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler
    http\://activemq.apache.org/schema/core=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
    http\://www.springframework.org/schema/jms=org.springframework.jms.config.JmsNamespaceHandler
    spring.schemas
    Code:
    http\://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd
    http\://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd
    http\://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd
    http\://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd
    http\://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd
    http\://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd
    http\://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
    http\://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd
    http\://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
    http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
    http\://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd
    http\://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd
    http\://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd
    http\://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd
    http\://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd
    http\://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd
    http\://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd
    http\://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd
    http\://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd
    http\://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd
    http\://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd
    http\://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd
    http\://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd
    http\://activemq.org/config/1.0=activemq.xsd
    http\://activemq.org/config/1.0/1.0.xsd=activemq.xsd
    http\://activemq.apache.org/schema/core=activemq.xsd
    http\://activemq.apache.org/schema/core/activemq-core.xsd=activemq.xsd
    http\://www.springframework.org/schema/jms/spring-jms-2.5.xsd=org/springframework/jms/config/spring-jms-2.5.xsd
    http\://www.springframework.org/schema/jms/spring-jms-3.0.xsd=org/springframework/jms/config/spring-jms-3.0.xsd
    http\://www.springframework.org/schema/jms/spring-jms.xsd=org/springframework/jms/config/spring-jms-3.0.xsd
    Can someone please help me with this problem

    Thanks,

  2. #2

    Default

    anyone??

  3. #3

    Default Same issue

    Guys,

    I am also facing exactly same issue.
    Can somebody help?

    Thanks,
    Manish

  4. #4
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,791

    Default

    Hello

    I'm using spring 3.0 and JDK6 and maven.
    copy here your Maven dependencies

    I had spring.schema and spring.handlers following this solution http://jira.codehaus.org/browse/MASSEMBLY-360
    The bug is for Spring 2.2-beta-2 and you work with 3.0, therefore such solution is useless for Spring 3.0

    It only works if I have internet connection.
    It doesn't matter, such xxx.schemas references the xsd files where they are located within the jars

    Failed to read schema document 'http://www.springframework.org/schema/tx/spring-tx-3.0.xsd',
    such schema is located in (how you already can see)

    http\://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
    Which is in the jar org.springframework.transaction-3.0.4.RELEASE.jar, therefore be sure that in your maven dependencies exists the reference to the spring transaction's dependency (according with your version of course)
    Last edited by dr_pompeii; Oct 31st, 2010 at 08:56 AM.
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •