1 Reply Latest reply on Jun 25, 2010 2:00 PM by Tim Bennen

    Could not load AnnotationConfiguration

    Tim Bennen Newbie

      Hello to all!

       

      I have a problem with "Run SchemaExport" with these lines in my hibernate.cfg.xml:

      <!-- Envers -->
        <event type="post-insert">
         <listener/>
        </event>
        <event type="post-update">
         <listener/>
        </event>
        <event type="post-delete">
         <listener/>
        </event>
        <event type="pre-collection-update">
         <listener/>
        </event>
        <event type="pre-collection-remove">
         <listener/>
        </event>
        <event type="post-collection-recreate">
         <listener/>
        </event>
      

       

      I get this error:

       

      org.hibernate.console.HibernateConsoleRuntimeException: Could not load AnnotationConfiguration
      
      org.hibernate.console.HibernateConsoleRuntimeException: Could not load AnnotationConfiguration
          at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:630)
          at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:619)
          at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:287)
          at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
          at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:269)
          at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:103)
          at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:61)
          at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:105)
          at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: org.hibernate.MappingException: invalid configuration
          at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:371)
          at org.hibernate.console.ConsoleConfiguration.configureStandardConfiguration(ConsoleConfiguration.java:672)
          at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:624)
          ... 9 more
      Caused by: org.xml.sax.SAXParseException: Attribute "type" with value "pre-collection-update" must have a value from the list "auto-flush merge create create-onflush delete dirty-check evict flush flush-entity load load-collection lock refresh replicate save-update save update pre-load pre-update pre-insert pre-delete post-load post-update post-insert post-delete post-commit-update post-commit-insert post-commit-delete ".
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.validateDTDattribute(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at org.dom4j.io.SAXReader.read(SAXReader.java:465)
          at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:369)
          ... 11 more
      
      Error
      Fri Jun 25 19:17:27 CEST 2010
      org.hibernate.console.HibernateConsoleRuntimeException: Could not load AnnotationConfiguration
      
      org.hibernate.console.HibernateConsoleRuntimeException: Could not load AnnotationConfiguration
          at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:630)
          at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:619)
          at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:287)
          at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
          at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:269)
          at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:103)
          at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:61)
          at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:105)
          at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: org.hibernate.MappingException: invalid configuration
          at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:371)
          at org.hibernate.console.ConsoleConfiguration.configureStandardConfiguration(ConsoleConfiguration.java:672)
          at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:624)
          ... 9 more
      Caused by: org.xml.sax.SAXParseException: Attribute "type" with value "pre-collection-update" must have a value from the list "auto-flush merge create create-onflush delete dirty-check evict flush flush-entity load load-collection lock refresh replicate save-update save update pre-load pre-update pre-insert pre-delete post-load post-update post-insert post-delete post-commit-update post-commit-insert post-commit-delete ".
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.validateDTDattribute(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at org.dom4j.io.SAXReader.read(SAXReader.java:465)
          at org.hibernate.console.ConsoleConfiguration.loadConfigurationXML(ConsoleConfiguration.java:369)
          ... 11 more
      

       

      So what's wrong with the type attribute?

      What should I do to solve this problem?

       

      Best Regards PHANTOMIAS