Announcement Announcement Module
Collapse
No announcement yet.
Unable to locate Spring NamespaceHandler... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to locate Spring NamespaceHandler...

    Hi together,

    I am new to the spring framework and I encounter serious problems. I use
    Eclipse and my project using Spring 2.5.1 works very well. But the
    application I develop will be an OpenOffice extension and here the
    problems beginn. An OpenOffice Extension is a zip compressed file with
    the extension .oxt. Here the relevant part of my extension (name:
    JudasComponent.oxt):
    JudasComponent.oxt
    |-> conf/
    | |-> applicationContext-YaCupDB.xml
    | |-> jdbc.properties
    | |-> log4j.properties
    |-> lib/
    | |-> spring.jar
    | |-> other relevant jars
    |-> META-INF/
    | |-> manifest.xml
    |-> JudasComponent.uno.jar
    | |-> de/
    | | |-> classes of the OpenOffice Extension
    | |-> META-INF/
    | | |-> MANIFEST.MF
    |-> other files, irrelevant for spring

    When starting my OpenOffice Extension, i get the following error:
    -----%<-----
    org.springframework.beans.factory.parsing.BeanDefi nitionParsingException:
    Configuration problem: Unable to locate Spring NamespaceHandler for XML
    schema namespace [http://www.springframework.org/schema/tx]
    Offending resource: URL
    [file:/home/tobias/.openoffice.org2/user/uno_packages/cache/uno_packages/g9A3TQ_/JudasComponent.oxt/conf/applicationContext-YaCupDB.xml]
    ...
    -----%<-----

    This is the relevant part of my XML configuration file (applicationContext-YaCupDB.xml):
    -----%<-----
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-2.5.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
    -----%<-----

    As far I researched, the reason for this error is that the
    spring.handlers file is not found. Why does it work when starting my
    application within Eclipse and not as an OpenOffice Extension? Can
    someone help me to solve this issue? Can I manually point the xsd file?

    Help is highly appreciated!

    Greetings, Tobias

  • #2
    Must have some classpath or other issue....Is the classpath the same for the extension vs. eclipse?

    Comment


    • #3
      Hi Jonnio,

      Originally posted by jonnio View Post
      Must have some classpath or other issue....Is the classpath the same for the extension vs. eclipse?
      I added the spring.jar within my manifest.mf of my JudasComponent.uno.jar:
      -----%<-----
      Manifest-Version: 1.2

      RegistrationClassName: de.twc.oocom.comp.JudasComponent

      Class-Path: lib/antlr-2.7.6.jar lib/asm.jar lib/cglib-2.1.3.jar lib/co

      mmons-collections-2.1.1.jar lib/commons-dbcp.jar lib/commons-logging-

      1.0.4.jar lib/commons-pool.jar lib/dom4j-1.6.1.jar lib/easymock.jar l

      ib/hibernate3.jar lib/hibernate-annotations.jar lib/hibernate-commons

      -annotations.jar lib/jaybird-full-2.1.1.jar lib/jta.jar lib/junit.jar

      lib/log4j-1.2.14.jar lib/persistence.jar lib/spring.jar lib/oolib.ja

      r

      Created-By: 1.6.0_03 (Sun Microsystems Inc.)


      -----%<-----
      In Eclipse I simply added the spring.jar and the other jars to the build path.

      The spring.jar is added successfully in both cases, otherwise, there would be an other exception. But spring does not find certain files within the jar. Is it really a classpath problem?

      Greetings, Tobias

      Comment


      • #4
        Originally posted by jonnio View Post
        Must have some classpath or other issue....Is the classpath the same for the extension vs. eclipse?
        Hi Jonnio,

        further research highlighted, that you are right. For different reasons, the OpenOffice Extension I created is not in the classpath of the JVM.

        My problem now is: I am a Spring newbie. Is there a possiblity, to tell Spring the folder where the spring.jar is located in the filesystem?

        Greetings, Tobias

        Comment


        • #5
          Reason found

          Hi together,

          someone told me the reason of the error:
          http://www.openoffice.org/issues/show_bug.cgi?id=80100

          Greetings, Tobias

          Comment


          • #6
            A solution to a similar problem

            We were seeing the same error using the lastest spring framework 3.x, but for us it was just a missing dependency:

            http://www.dashaun.com/2010/03/10/sp...espacehandler/

            Comment


            • #7
              If you are using spring 3.0.X try using the jar

              org.springframework.transaction-3.0.4.RELEASE.jar

              may be could help you.

              Comment

              Working...
              X