Results 1 to 3 of 3

Thread: Spring JPA error on persistence.xml

  1. #1
    Join Date
    Aug 2006
    Posts
    28

    Default Spring JPA error on persistence.xml

    I am trying to run sample Spring JPA application. But, I am getting the below error - l

    og4j:WARN No appenders could be found for logger (org.springframework.beans.factory.access.Singleto nBeanFactoryLocator).
    log4j:WARN Please initialize the log4j system properly.
    org.springframework.beans.factory.access.Bootstrap Exception: Unable to return specified BeanFactory instance: factory key [hello-jpa], from group with resource name [classpath*:beanRefFactory.xml]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'crr-xcm' defined in URL [file:/C:/MyProjects/beanRefFactory.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlAp plicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 1 in XML document from class path resource [config/persistence.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'persistence'.

    persistence.xml
    ----------------

    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
    <persistence-unit name="my-pu" transaction-type="RESOURCE_LOCAL">
    <class>com.test.Student</class>
    </persistence-unit>
    </persistence>

    Please suggest hoe to get rid of this error.

    Thanks

  2. #2
    Join Date
    Aug 2006
    Posts
    28

    Default

    Still struggling ... any help?

  3. #3
    Join Date
    Aug 2006
    Posts
    28

    Default

    Can someone help me to resolve this issue?

    Thanks !!!

Posting Permissions

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